flixlix / power-flow-card-plus

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

Inverted_state not working #196

Closed finalbillybong closed 1 year ago

finalbillybong commented 1 year ago

Perhaps I have not got my config correct but the new interted_state is not working correctly for me.

Old yaml that worked:

type: custom:power-flow-card-plus
entities:
  battery:
    entity: sensor.battery_usage_template
    state_of_charge: sensor.solis_battery_soc
  grid:
    entity: sensor.solis_grid_active_power
  solar:
    entity: sensor.solis_inverter_dc_power
  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
  individual1:
    entity: sensor.utility_usage_template
    icon: mdi:washing-machine
    name: Utilities
    color: '#FF3333'
    color_icon: false
    display_zero: true
  individual2:
    entity: sensor.myenergi_zappi_21782493_internal_load_ct1
    icon: mdi:car-electric
    name: Car
    color: '#33FF58'
    color_icon: false
    display_zero: true
dashboard_link: /energy
watt_threshold: 999
title: Real Time Power Usage
inverted_entities: battery, grid, fossil_fuel_percentage

New yaml that does not work:

type: custom:power-flow-card-plus
entities:
  battery:
    inverted_state: true
    entity: sensor.battery_usage_template
    state_of_charge: sensor.solis_battery_soc
  grid:
    inverted_state: true  
    entity: sensor.solis_grid_active_power
  solar:
    entity: sensor.solis_inverter_dc_power
  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
  individual1:
    entity: sensor.utility_usage_template
    icon: mdi:washing-machine
    name: Utilities
    color: '#FF3333'
    color_icon: false
    display_zero: true
  individual2:
    entity: sensor.myenergi_zappi_21782493_internal_load_ct1
    icon: mdi:car-electric
    name: Car
    color: '#33FF58'
    color_icon: false
    display_zero: true
dashboard_link: /energy
watt_threshold: 999
title: Real Time Power Usage
flixlix commented 1 year ago

I had a typo in the readme.

It's supposed to be invert_state

Does the issue persist?

finalbillybong commented 1 year ago

Thats sorted it. Thanks.

Any chance of adding this for fossil_fuel_percentage?

finalbillybong commented 1 year ago

Also, while I'm here the flow dots seem broken on Firefox and Safari Desktop yet working fine on Safari on iOS - I can open a new issue if you'd prefer.

flixlix commented 1 year ago

Works for me on Chrome, Firefox, Brave and Safari...

Feel free to open a new issue, in the meantime, check wethe this is a cache problem.

Closing this issue as completed.