flixlix / power-flow-card-plus

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

[OTHER] - Configuration question #164

Closed tubalainen closed 1 year ago

tubalainen commented 1 year ago

How can I configure state_of_charge for an individual Configuration - just like in the example GIF "Random Configuration"?

Here´s my card: image

And my code:

type: custom:power-flow-card-plus
entities:
  battery:
    entity: sensor.ferroamp_battery_power
    state_of_charge: sensor.ferroamp_system_state_of_charge
  grid:
    entity: sensor.p1_momentary_active
  solar:
    entity: sensor.ferroamp_solar_power
    display_zero_state: true
  individual1:
    entity: sensor.teslan_battery
#    state_of_charge: sensor.teslan_battery <-- Doesnt work
    icon: mdi:car-electric
    color: '#80b8ff'
    name: Teslan
    color_icon: true
  individual2:
    entity: sensor.brytare_zigbee_tuya_04_power
    name: Electric Bike
    color_icon: true
    display_zero: true
    color: '#ff8080'
    icon: mdi:motorbike-electric
clickable_entities: true
display_zero_lines: true
use_new_flow_rate_model: true
w_decimals: 0
kw_decimals: 1
min_flow_rate: 0.75
max_flow_rate: 6
max_expected_power: 2000
min_expected_power: 0.01
watt_threshold: 1000
flixlix commented 1 year ago

You can use the secondary_info option for that. This option is also available in the UI editor for an easier setup process. Do you need help setting up this option?

tubalainen commented 1 year ago

You can use the secondary_info option for that. This option is also available in the UI editor for an easier setup process. Do you need help setting up this option?

I managed to figure it out, thanks :)

And for someone else that might be struggling, here is my code.

type: custom:power-flow-card-plus
entities:
  battery:
    entity: sensor.ferroamp_battery_power
    state_of_charge: sensor.ferroamp_system_state_of_charge
  grid:
    entity: sensor.p1_momentary_active
  solar:
    entity: sensor.ferroamp_solar_power
    display_zero_state: true
  individual1:
    entity: sensor.sparsnas_bilen_energy_consumption_momentary
    secondary_info:
      entity: sensor.teslan_battery
      unit_of_measurement: '%'
    icon: mdi:car-electric
    color: '#80b8ff'
    name: Teslan
    color_icon: true
  individual2:
    entity: sensor.brytare_zigbee_tuya_04_power
    name: Electric Bike
    color_icon: true
    display_zero: true
    color: '#ff8080'
    icon: mdi:motorbike-electric
clickable_entities: true
display_zero_lines: true
use_new_flow_rate_model: true
w_decimals: 0
kw_decimals: 1
min_flow_rate: 0.75
max_flow_rate: 6
max_expected_power: 2000
min_expected_power: 0.01
watt_threshold: 1000

image

flixlix commented 1 year ago

I'm glad I was able to point you in the right direction 😊