flixlix / energy-flow-card-plus

An upgraded Energy Distribution Card for Home Assistant, with added features like Individual Devices and refined UI enhancements, while maintaining the Energy Dashboard's original design.
152 stars 8 forks source link

[BUG] #57

Closed mihmihmih1988 closed 1 year ago

mihmihmih1988 commented 1 year ago

Describe the bug unable to control the number of digits of secondary entity for solar. I configured entity for 1 digit but card keeps displaying 3 digits

To Reproduce Steps to reproduce the behavior: I use the solar forecast integration that is integrated with HA energy dashboard sensor.energy_production_today and copy past it in the card.

type: custom:energy-flow-card-plus
entities:
  grid:
    name: Grid
    icon: mdi:transmission-tower
    color_icon: false
    color_circle: true
    color:
      production:
        - 244
        - 182
        - 11
      consumption:
        - 64
        - 177
        - 247
    entity:
      consumption: sensor.p1_meter_total_power_import_day
      production: sensor.p1_meter_total_power_export_day
  solar:
    entity: sensor.solar_meter_day_from_w
    display_zero_state: true
    icon: mdi:white-balance-sunny
    color_value: true
    color_icon: true
    color:
      - 244
      - 182
      - 11
    secondary_info:
      entity: sensor.sensor_energy_forecast_today_mppt1_2
      unit_of_measurement: kWh
      display_zero: true
  individual1:
    entity: sensor.nous_socket_airco_summation_delivered
    name: Airco
    icon: mdi:ev-station
    color_value: true
    color_icon: true
    color:
      - 56
      - 199
      - 47
    display_zero: true
  individual2:
    entity: sensor.shelly_jacuzzi_energy
    name: Jacuzzi
    icon: mdi:pool
    color_value: true
    color_icon: true
    color:
      - 56
      - 199
      - 47
    display_zero: true
clickable_entities: true
display_zero_lines: true
use_new_flow_rate_model: true
energy_date_selection: true
wh_decimals: 0
kwh_decimals: 1
min_flow_rate: 1
max_flow_rate: 6
max_expected_energy: 50000
min_expected_energy: 1
wh_kwh_threshold: 0

Expected behavior I expect to see 1 digit kWh

Screenshots image image image

Desktop (please complete the following information):

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

flixlix commented 1 year ago

Changing that option will have no effect on the entity's state that gets passed on to the card. If you want to have certain decimals, add this line:

decimals: 1

into the secondary_info object