A Home Assistant lovelace card to display a sankey chart. For example for power consumption
Name | Type | Requirement | Default | Description |
---|---|---|---|---|
type | string | Required | custom:sankey-chart |
|
sections | list | Required | Entities to show divided by sections, see sections object for additional options. | |
height | number | Optional | 200 | The height of the card in pixels |
wide | boolean | Optional | false | Set this to true if you see extra empty space in the right side of the card. This will expand it horizontally to cover all the available space. |
show_icons | boolean | Optional | false | Display entity icons |
show_names | boolean | Optional | false | Display entity names |
Name | Type | Requirement | Default | Description |
---|---|---|---|---|
entities | list | Required | Entities to show in this section. Could be just the entity_id as a string or an object, see entities object for additional options. Note that the order of this list matters |
Name | Type | Requirement | Default | Description |
---|---|---|---|---|
entity_id | string | Required | Entity id of the sensor | |
children | list | Required | List of entity ids describing child entities (branches). Only entities from the next section will be connected. | |
color | string | Optional | --primary-color | Color of the box |
npm i
npm start
- The compiled
.js
file will be accessible onhttp://127.0.0.1:5000/ha-sankey-chart.js
. - On a running Home Assistant installation add this to your Lovelace
resources:
- url: 'http://127.0.0.1:5000/ha-sankey-chart.js'
type: module
Change "127.0.0.1" to the IP of your development machine.