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

[BUG] Any value for Display Zero Tolerance for Grid hides all values.

Open BJReplay opened this issue 3 months ago • 1 comments

Describe the bug Any value for Display Zero Tolerance for Grid hides all values. Even 0.

To Reproduce Steps to reproduce the behavior:

  1. Configure the card. Add in the Grid Consumption and Production Entities
  2. Configure other Entities
  3. Leave Display Zero Tolerance blank for Grid
  4. Confirm that Grid Displays
  5. Enter 0 (or any other value such as 10 - which is what I had to supress low value noise) and confirm that Grid reports 0Wh for both import and export even though both values are higher than 0 or the threshold

Expected behavior Values above 0 (or 10, or the chosen threshold, should display).

Screenshots Screenshot showing 0 suppresses values: image

Screenshot showing blank allows low values (100Wh consumption) to show. image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Edge Dev
  • Version 124.0.2478.6

Smartphone (please complete the following information):

  • Device: Samsung S22U
  • OS: Android 14
  • Home Assistant App

Additional context Problem displays on both HA app on Android and on Web Browser.

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.

BJReplay avatar Mar 27 '24 06:03 BJReplay

Seems that the logic ist inverted. If i set "display_zero_tolerance" to 5000 all values above 5kW are set to Zero (instead of all vallues below)

must be something in energy-flow-card-plus.ts near line 630:

    // Reset Grid Consumption if it is below the tolerance
    if (entities.grid?.display_zero_tolerance !== undefined && entities.grid?.display_zero_tolerance <= grid.state.fromGrid) {
      grid.state.fromGrid = 0;
    }

RrPt avatar Apr 30 '24 11:04 RrPt