Skip to content

Commit

Permalink
Update energy_stats.yaml
Browse files Browse the repository at this point in the history
Fix for Solar Battery Effectiveness not being available
  • Loading branch information
treynaer authored Mar 15, 2023
1 parent eeba0ae commit 9b5332d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/energy_stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ template:
{% set b1_dc_power = states('sensor.solaredge_b1_dc_power') | float(0) %}
{% set battery_effectiveness = states('sensor.solar_battery_effectiveness') %}
{% if (is_state('sensor.solar_battery_effectiveness', 'unknown') or (solar_battery_effectiveness == 0)) %}
{% if (is_state('sensor.solar_battery_effectiveness', 'unavailable') or (battery_effectiveness == 0)) %}
1
{% elif (i1_dc_power + b1_dc_power <= 0) %}
{% if (b1_dc_power >= 0 or i1_dc_power <= 0) %}
Expand Down Expand Up @@ -144,4 +144,4 @@ sensor:
sampling_size: 1200
max_age:
hours: 24
entity_id: sensor.solar_inverter_effectiveness
entity_id: sensor.solar_inverter_effectiveness

0 comments on commit 9b5332d

Please sign in to comment.