ulic75 / power-flow-card

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

Card not showing energy being used by house #117

Closed dorgan closed 1 year ago

dorgan commented 1 year ago

Currently I have more solar power being generated than is being used by the house, but the card is showing that its all going to the grid. Screen Shot 2022-11-17 at 3 47 25 PM And here is a similar card I have that shows it correctly: Screen Shot 2022-11-17 at 3 47 34 PM

ulic75 commented 1 year ago

What are the values of the 3 entities shown?

In a similar test, I have

entities:
  grid:
    consumption: input_number.grid_cons # 0
    production: input_number.grid_prod # 2000
  solar: input_number.solar # 3000
kw_decimals: 3
watt_threshold: 10000

The left over 1000 flows to the house. Are perhaps some of your values negative numbers? There is an inverted_entities option that might be what you need.

Screen Shot 2022-11-17 at 2 08 31 PM

dorgan commented 1 year ago

sensor.grid_power_production can be negative or positive, what change to you recommend?

ulic75 commented 1 year ago

If one means consumption and the other means production, then you don't need two entities, you can just use grid: sensor.grid_power_production. And if they are the opposite then you can add inverted_entities: grid. I tried to design to use the least amount of entities possible.

dorgan commented 1 year ago

yup that worked perfectly!