Skip to content

Commit

Permalink
Merge pull request #3 from treynaer/master
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
ryanm101 authored Mar 16, 2023
2 parents e75f2b1 + 6a028b2 commit a833fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/electricity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ template:
{% set i1_dc_power = states('sensor.solaredge_i1_dc_power') | float(0) %}
{% if (i1_ac_power <= -25 and b1_dc_power > 0) %} {#added -25 instead of 0#}
{{ i1_dc_power|abs }} {# Changed to i1_dc_power #}
{{ i1_dc_power * -1 }} {# Changed to i1_dc_power #}
{% else %}
0
{% endif %}
Expand Down Expand Up @@ -275,4 +275,4 @@ sensor:
source: sensor.solar_house_consumption_w
method: left
unit_prefix: k
name: solar_house_consumption_kwh
name: solar_house_consumption_kwh
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 is_state('sensor.solar_battery_effectiveness', 'unknown') 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 a833fe7

Please sign in to comment.