ulic75 / power-flow-card

A power distribution card inspired by the official Energy Distribution card for Home Assistant
160 stars 27 forks source link

Full example, I seem to be missing something #105

Closed philipmather closed 1 year ago

philipmather commented 1 year ago

Could I ask for the fullest possible example to be added to the documentation, I think I must be missing something as I have this config...

type: custom:power-flow-card
entities:
  battery:
    consumption: sensor.givtcp_ce2208g084_battery_to_house
    production: sensor.givtcp_ce2208g084_solar_to_battery
  grid:
    consumption: sensor.givtcp_ce2208g084_grid_to_house
    production: sensor.givtcp_ce2208g084_solar_to_grid
  solar:
    consumption: sensor.givtcp_ce2208g084_solar_to_house
    production: sensor.givtcp_ce2208g084_solar_to_grid
  battery_charge: sensor.givtcp_dy2216g450_battery_soc
watt_threshold: 1000

...but I don't see anything going from Solar to House? Obviously I've just sort of assumed Solar can be done as a split entity? I also have grid_to_battery (we have cheap times to import power so people charge their batteries overnight and then discharge later, called load shifting).

ulic75 commented 1 year ago

Hey Philip,

Minimal/full examples either way can cause confusion. As minimal can vary depending on your setup, it could literally just be a consumption entity. While with full examples people think they need all the options, but they don't.

Looking at your example snippet, it appears that you are using entities the represent the flow from point A to point B. The entities don't represent the flow between two things. They are the input and output from each, battery, grid, and solar. As such solar would only ever have a single value, the output.

When I have some time I'll try to bring further clarity to the documentation. I'm also converting this to a discussion as it's not a code issue.