power-flow-card-plus icon indicating copy to clipboard operation
power-flow-card-plus copied to clipboard

[BUG] Solar `display_zero_tolerance` prevents Grid-->Battery flow line/animation

Open mkanet opened this issue 6 months ago • 12 comments

Describe the bug If I add: display_zero_tolerance to Solar: in the card code below, the flow line Grid-->Battery will immediately disappear (if below flows are active):

Solar-->Battery AND Grid-->Battery AND Grid-->House : 1

Card Code:

  - type: custom:power-flow-card-plus
    entities:
      grid:
        name: PG&E
        entity: sensor.powerwall_site_power
        secondary_info:
          entity: sensor.pge_electric_cost_to_date
          unit_of_measurement: $
          unit_white_space: false
          color_value: true
        display_state: one_way
        color_circle: true
        color_icon: true
        color_value: true
        power_outage:
          entity: binary_sensor.powerwall_grid_status
          state_alert: 'off'
      solar:
        entity: sensor.powerwall_solar_power
        display_zero_tolerance: 20        #<----this is the line that causes the bug!!
        icon: mdi:solar-panel-large
        secondary_info:
          entity: sensor.openweathermap_forecast_cloud_coverage
          unit_of_measurement: '%'
          unit_white_space: false
          color_value: true
        color_icon: true
        color_value: true
      battery:
        entity: sensor.powerwall_battery_power
        state_of_charge: sensor.powerwall_charge_actual
        state_of_charge_unit: '%'
        state_of_charge_unit_white_space: false
        display_state: one_way
        color_state_of_charge_value: true
        color_icon: true
        color_circle: true
      home:
        entity: sensor.powerwall_load_power
        color_icon: true
        color_value: true
    watt_threshold: 999
    calculate_flow_rate: true
    w_decimals: 1
    kw_decimals: 1
    min_flow_rate: 2.2
    max_flow_rate: 6
    display_zero_lines:
      mode: hide
    clickable_entities: true
    use_new_flow_rate_model: true
    max_expected_power: 5000`

Expected behavior:
When I remove display_zero_tolerance: 20 from the above solar: section, the flow line/animation will display again, Below, is how it is supposed to look: 2

Additional context

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

  • [X] I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • [X] I have the latest version of the card installed.

  • [X] I have cleared my browser cache after installing, updating and configuring the card.

  • [X] The issue is not related to the UI-Editor not being rendered: "s.entries is not a function". This is a known bug, and is caused by Card Mod. Check the warning this readme section for more information on how to fix it.

mkanet avatar Dec 18 '23 01:12 mkanet