flixlix / power-flow-card-plus

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

Individual item not displaying value (but click shows the value) #56

Closed richsimpson closed 1 year ago

richsimpson commented 1 year ago

Hi, great item for my dash. I was after something like this to show individual devices.

My issue - I have set up for a current live and a day so far view. The live works as expected. Day so far, the individual items show 0 instead of the correct entity value (in this case Immersion is at 5.9kw . If I click on the item it goes to the usual graph with the value shown. Suggest the entity is right?

image

This is when I click on Immersion on bottom chart: image

Code I have for this bottom chart is:

type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.solax_today_s_import_energy
      production: sensor.solax_today_s_export_energy
  solar:
    entity: sensor.solax_today_s_solar_energy
  battery:
    entity:
      consumption: sensor.solax_battery_output_energy_today
      production: sensor.solax_battery_input_energy_today
    state_of_charge: sensor.solax_battery_capacity
  individual1:
    entity: sensor.immersion_water_today
    icon: mdi:water-thermometer
    color: '#80b8ff'
    name: Immersion
    color_icon: true
    display_zero: true
  individual2:
    entity: sensor.ev_charger_today
    name: EV
    color_icon: true
    display_zero: true
    color: '#ff8080'
    icon: mdi:car-electric
clickable_entities: true

PS - If I change the entity to one of the working ones (Solar total) it also remains a 0 again suggesting my sensor is ok etc. PPS - As the true value is 5 there is also a 'blob' flowing from the home to the Immersion. Seems to be just the value displayed not working.

flixlix commented 1 year ago

Hi there, this card was made for display power, not energy. If you want to use it with energy sensors, don't expect it to work without issues. Furthermore, the unit of measurement for energy is kWh, not kW. I'll check later for more details, but from what I'm seeing, you can use the official energy distribution card for your application (excluding individual devices, since that feature is not part of the official card).

richsimpson commented 1 year ago

Maybe I need to make a different sensor? With a total of the W used?

I already use the original Powerflow card and so replicated my config. Of course the individual sensors are not in the original but otherwise everything else matches.

Maybe I have used it in an incorrect way and yes it incorrectly says kW instead of kWh but is doing what I need it to. Be great to be able to display those items in the similar way to the other days usage.

richsimpson commented 1 year ago

Ah, figured it out, reading the info again I can add the "unit_of_measurement" line to get it to do what I want. image

flixlix commented 1 year ago

Very good! Glad you got it working 👍