Skip to content

Commit

Permalink
Merge pull request #237 from gilder0/Fix-HA-Errors
Browse files Browse the repository at this point in the history
Fix HA Errors and Warnings
  • Loading branch information
Egyras authored Dec 30, 2021
2 parents fef5ef9 + 8caf426 commit ab3d893
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Integrations/Home Assistant/heishamon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,20 @@ sensor:
friendly_name: "Aquarea COP"
unit_of_measurement: "x"
value_template: >-
{%- if states('sensor.heishamon_w_production') != "Unknown" -%}
{%- if states('sensor.heishamon_w_consumption') > "0" -%}
{{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float)) }}
{%- else -%}
0.0
{%- endif -%}
{%- if states('sensor.heishamon_w_consumption') | float > 0 -%}
{{ '%0.1f' % ((states('sensor.heishamon_w_production') | float ) / (states('sensor.heishamon_w_consumption') | float )) }}
{%- else -%}
n/a
0.0
{%- endif -%}
availability_template: >-
{%- if is_number(states('sensor.heishamon_w_consumption')) and is_number(states('sensor.heishamon_w_production')) %}
true
{%- else %}
false
{%- endif %}
#Calculation Energy consumed (kWh) - DHW
- platform: integration
source: sensor.aquarea_dhw_power_consumed
Expand All @@ -647,6 +652,7 @@ sensor:
method: left



# switch #
##########
switch:
Expand Down

0 comments on commit ab3d893

Please sign in to comment.