Oops. Rounded the wrong sensors.
This commit is contained in:
parent
1ade598c97
commit
8b43bf239b
@ -74,7 +74,7 @@
|
||||
source: sensor.power_import
|
||||
name: energy_import_sum
|
||||
unit_prefix: k
|
||||
round: 1
|
||||
round: 2
|
||||
method: left
|
||||
|
||||
# Sensor for Riemann sum of energy export (W -> Wh)
|
||||
@ -82,7 +82,7 @@
|
||||
source: sensor.power_export
|
||||
name: energy_export_sum
|
||||
unit_prefix: k
|
||||
round: 1
|
||||
round: 2
|
||||
method: left
|
||||
|
||||
# Sensor for Riemann sum of energy consumption (W -> Wh)
|
||||
@ -90,5 +90,5 @@
|
||||
source: sensor.power_consumption
|
||||
name: energy_consumption_sum
|
||||
unit_prefix: k
|
||||
round: 1
|
||||
round: 2
|
||||
method: left
|
||||
|
@ -29,7 +29,7 @@
|
||||
unit_of_measurement: 'W'
|
||||
state: >
|
||||
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) > 0 %}
|
||||
{{ states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float }}
|
||||
{{ (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float)|round(1) }}
|
||||
{% else %}
|
||||
{{ 0 }}
|
||||
{% endif %}
|
||||
@ -44,7 +44,7 @@
|
||||
unit_of_measurement: 'W'
|
||||
state: >
|
||||
{% if (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) < 0 %}
|
||||
{{ (states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) * -1 }}
|
||||
{{ ((states('sensor.line_power_channel_a_power')|float + states('sensor.line_power_channel_b_power')|float + states('sensor.line_power_channel_c_power')|float) * -1 ) | round(1) }}
|
||||
{% else %}
|
||||
{{ 0 }}
|
||||
{% endif %}
|
||||
@ -60,9 +60,9 @@
|
||||
state: >
|
||||
{% if (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) < 0 %}
|
||||
{% elif (states('sensor.power_export')|float(0)) > 0 and (states('sensor.balkonkraftwerk_power')|float(0) - states('sensor.power_export')|float(0)) > 0 %}
|
||||
{{ (states('sensor.balkonkraftwerk_power')|float(0)) - states('sensor.power_export')|float(0) }}
|
||||
{{ ((states('sensor.balkonkraftwerk_power')|float(0)) - states('sensor.power_export')|float(0)) | round(1) }}
|
||||
{% else %}
|
||||
{{ states('sensor.power_import')|float(0) + states('sensor.balkonkraftwerk_power')|float(0) }}
|
||||
{{ (states('sensor.power_import')|float(0) + states('sensor.balkonkraftwerk_power')|float(0)) | round(1) }}
|
||||
{% endif %}
|
||||
device_class: power
|
||||
state_class: measurement
|
||||
|
Loading…
Reference in New Issue
Block a user