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

Battery Production / Consumpsion issue with flows #35

Closed tomcoleman closed 1 year ago

tomcoleman commented 1 year ago

I have the battery code set as the following..

` type: custom:power-flow-card-plus entities: grid: entity: consumption: sensor.solax_grid_import production: sensor.solax_grid_export solar: entity: sensor.solax_pv_power_total battery: entity: consumption: sensor.solax_battery_power_charge production: sensor.solax_battery_power_charge state_of_charge: sensor.solax_battery_capacity

`

In this example battery consumption: sensor.solax_battery_power_charge and battery production: sensor.solax_battery_power_charge are the same value.

My Solax battery does not show the real time in/out the sensor just shows realtime usage which at the time can be + or -

So if i use the above code for the batts it screws with the flow of the balls & maths.

flixlix commented 1 year ago

From the readme: image

tomcoleman commented 1 year ago

so using the above what would the code be for

entity: consumption: sensor.solax_battery_power_charge production: sensor.solax_battery_power_charge state_of_charge: sensor.solax_battery_capacity

flixlix commented 1 year ago

It would look like this:

[...]

battery:
  entity: sensor.solax_battery_power_charge
  state_of_charger: sensor.solax_battery_capacity

[...]

And in case the values for the battery are going in the opposite way:

[...]

battery:
  entity: sensor.solax_battery_power_charge
  state_of_charger: sensor.solax_battery_capacity
# at the end of the config
inverted_entities: battery
tomcoleman commented 1 year ago

It would look like this:

[...]

battery:
  entity: sensor.solax_battery_power_charge
  state_of_charger: sensor.solax_battery_capacity

[...]

And in case the values for the battery are going in the opposite way:

[...]

battery:
  entity: sensor.solax_battery_power_charge
  state_of_charger: sensor.solax_battery_capacity
# at the end of the config
inverted_entities: battery

using this code

            type: custom:power-flow-card-plus
            entities:
              grid:
                entity:
                  consumption: sensor.solax_grid_import
                  production: sensor.solax_grid_export
              solar:
                entity: sensor.solax_pv_power_total
              battery:
                entity:
                   #consumption: sensor.solax_battery_power_charge
                   #production: sensor.solax_battery_power_charge
                state_of_charge: sensor.solax_battery_capacity

shows only the % of the battery not what is going in/out in terms of power.

image

flixlix commented 1 year ago

you forgot to put the entity id next to the entity: property. Try this:

            type: custom:power-flow-card-plus
            entities:
              grid:
                entity:
                  consumption: sensor.solax_grid_import
                  production: sensor.solax_grid_export
              solar:
                entity: sensor.solax_pv_power_total
              battery:
                entity: sensor.solax_battery_power_charge
                state_of_charge: sensor.solax_battery_capacity
tomcoleman commented 1 year ago

ok put that in and now shows house load as 0 and balls flying from solar > batt ( which isnt right)

image

tomcoleman commented 1 year ago

ignore that got it working image

how ever when i add the BMW i3 in it thinks its charging it

image

entity: sensor.i3_120_remaining_battery_percent

flixlix commented 1 year ago

Please read the readme, it's right there. https://github.com/flixlix/power-flow-card-plus#secondary-info-configuration The entity providing the battery percentag should be in secondary_info. The Main entity is the power of the individual device

tomcoleman commented 1 year ago

Please read the readme, it's right there. https://github.com/flixlix/power-flow-card-plus#secondary-info-configuration The entity providing the battery percentag should be in secondary_info. The Main entity is the power of the individual device

THANK YOU!!

me being a muppet i have put the % sign on it but it still thinks energy is going into the car with the blue ball going from house to car

image


              individual1:
                entity: sensor.myenergi_zappi_20197616_internal_load_ct1
                entity: sensor.i3_120_remaining_battery_percent
                unit_of_measurement: "%"
                icon: mdi:car-electric
                color: '#80b8ff'
                name: BMW i3
                color_icon: false
flixlix commented 1 year ago

You can't have two entity properties. Please try this:


              individual1:
                entity: sensor.myenergi_zappi_20197616_internal_load_ct1
                secondary_info:
                  entity: sensor.i3_120_remaining_battery_percent
                  unit_of_measurement: "%"
                icon: mdi:car-electric
                color: '#80b8ff'
                name: BMW i3
                color_icon: false
tomcoleman commented 1 year ago

You can't have two entity properties. Please try this:


              individual1:
                entity: sensor.myenergi_zappi_20197616_internal_load_ct1
                secondary_info:
                  entity: sensor.i3_120_remaining_battery_percent
                  unit_of_measurement: "%"
                icon: mdi:car-electric
                color: '#80b8ff'
                name: BMW i3
                color_icon: false

image

that code makes the icon disapear

image

flixlix commented 1 year ago

Please read the documentation, you would save both of us time.


              individual1:
                entity: sensor.myenergi_zappi_20197616_internal_load_ct1
                secondary_info:
                  entity: sensor.i3_120_remaining_battery_percent
                  unit_of_measurement: "%"
                icon: mdi:car-electric
                color: '#80b8ff'
                name: BMW i3
                color_icon: false
                display_zero: true

The icon is not appearing, because your car isn't charging. Set display_zero to true to always show the device

tomcoleman commented 1 year ago

Please read the documentation, you would save both of us time.

              individual1:
                entity: sensor.myenergi_zappi_20197616_internal_load_ct1
                secondary_info:
                  entity: sensor.i3_120_remaining_battery_percent
                  unit_of_measurement: "%"
                icon: mdi:car-electric
                color: '#80b8ff'
                name: BMW i3
                color_icon: false
                display_zero: true

The icon is not appearing, because your car isn't charging. Set display_zero to true to always show the device

sorry thanks , one of those days. got about 600 windows open.

flixlix commented 1 year ago

No problem 👍 Can the issue be closed?

tomcoleman commented 1 year ago

No problem 👍 Can the issue be closed?

just one more I used to have a cloud sensor showing % of cloud for the day

if i add this to the solar section is that right?

              solar:
                name: Solar Panels
                icon: mdi:solar-power
                entity: sensor.solax_pv_power_total
                secondary_info:
                  entity: sensor.openweathermap_cloud_coverage
                  unit_of_measurement: "%"
flixlix commented 1 year ago

Unfortunately, secondary_info is not yet available for sections other than the individual devices. But yes, when this feature is eventually released, that would be how you would configure it