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

[BUG] subtract_individual not working #93

Closed northalpha closed 1 year ago

northalpha commented 1 year ago

Describe the bug I am trying to use subtract_individual: true in the home section as per documentation, but it is not working.

To Reproduce Install Card and use the option

Expected behavior all configured individual entity would be subtracted as expected

Screenshots Side-by-side view:

Bildschirmfoto 2023-04-17 um 11 08 16

Desktop (please complete the following information):

Additional context It may also an issue that not all configured "individuals" are shown in the card view, although configured and display_zero: true set

Config

type: custom:power-flow-card-plus
entities:
  home:
    entity: sensor.home_consumption
    color_icon: solar
    subtract_individual: true
  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
    icon: mdi:pine-tree
    color_icon: true
    display_zero: true
    name: Non Fossil
    state_type: power
  grid:
    icon: mdi:transmission-tower
    color_icon: true
    display_zero: true
    entity:
      production: sensor.stromexport_leistung
      consumption: sensor.strombezug_leistung
  solar:
    icon: mdi:solar-panel-large
    entity: sensor.tripower_dc_leistung_gesamt
  battery:
    icon: mdi:home-battery-outline
    color_icon: true
    display_zero: true
    entity:
      consumption: sensor.batterieladung
      production: sensor.batterieentladung
    state_of_charge: sensor.batterieladezustand
  individual1:
    entity: sensor.openwb_cp1_ladeleistung
    icon: mdi:car-electric
    color: '#80b8ff'
    name: ID3
    color_icon: true
    display_zero: true
    secondary_info:
      entity: sensor.id_3_pro_state_of_charge
      unit_of_measurement: '%'
  individual2:
    entity: sensor.nous_sd1_trockner_active_power
    icon: mdi:tumble-dryer
    color: '#80b8ff'
    name: Trocker
    color_icon: true
    display_zero: true
  individual3:
    entity: sensor.nous_sd2_waschmaschiene_active_power
    icon: mdi:washing-machine
    color: '#80b8ff'
    name: WaMa
    color_icon: true
    display_zero: true
  individual4:
    entity: sensor.nous_sd3_spulmaschine_active_power
    icon: mdi:dishwasher
    color: '#80b8ff'
    name: Spüli
    color_icon: true
    display_zero: true
  individual5:
    entity: sensor.nous_sd4_rack_active_power
    icon: mdi:server-network
    color: '#80b8ff'
    name: Rack
    color_icon: true
    display_zero: true
w_decimals: 0
kw_decimals: 2
min_flow_rate: 0.9
max_flow_rate: 6
watt_threshold: 10000
clickable_entities: true
title: Energieübersicht

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

Awesome card, this is the one i was looking form hopefully this can be sorted out and will be may new "home" screen for HA! Thanks!

flixlix commented 1 year ago

I am very sorry for the inconvenience, but this is a feature that will only be released in the next version of the Card. I accidentally updated the README before the next release. I'll leave this issue open, and we'll see if the issue persists in the next version

northalpha commented 1 year ago

No worries, i can wait, no problem :) Thanks!

ungrim97 commented 1 year ago

@flixlix You have now twice beaten me to implementing features I want. Once in creating the Plus version with individual loads, and once by adding the subtract_individual feature which was my plan for this morning now work is lighter.

Let me know if you need any other pair of hands on anything

flixlix commented 1 year ago

Just published a new Release with this functionality! 🥳 (still in beta) New Release - v0.1beta

northalpha commented 1 year ago

can confirm it is working in 0.1beta

Bildschirmfoto 2023-04-21 um 10 43 56

THANKS!