Skip to content

A Home Assistant lovelace card to display a sankey chart. For example for power consumption

License

Notifications You must be signed in to change notification settings

MindFreeze/ha-sankey-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

646446a · Mar 24, 2022

History

29 Commits
Mar 23, 2022
Feb 5, 2022
Mar 24, 2022
Feb 5, 2022
Mar 18, 2022
Feb 5, 2022
Feb 5, 2022
Mar 24, 2022
Mar 24, 2022
Mar 23, 2022
Mar 22, 2022
Mar 23, 2022
Mar 23, 2022
Mar 23, 2022
Mar 18, 2022

Repository files navigation

This project is new and under development !!!

Sankey Chart Card

A Home Assistant lovelace card to display a sankey chart. For example for power consumption

GitHub Release License hacs_badge

Project Maintenance GitHub Activity

Example card

Options

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

Sections object

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

Entities object

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

Development

  1. npm i
  2. npm start
  3. The compiled .js file will be accessible on http://127.0.0.1:5000/ha-sankey-chart.js.
  4. 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.