Add printer energy measurement
This commit is contained in:
parent
b4eafb9fbd
commit
e9c9580027
@ -570,6 +570,19 @@ template:
|
||||
{% endif%}
|
||||
attributes:
|
||||
last_reset: '1970-01-01T00:00:00+00:00'
|
||||
- name: "Printer kWh"
|
||||
unit_of_measurement: "kWh"
|
||||
state_class: measurement
|
||||
device_class: energy
|
||||
state: >
|
||||
{% set power = states('sensor.printer_energy') | float %}
|
||||
{% if (power > 0) %}
|
||||
{{ power }}
|
||||
{% else %}
|
||||
{{ states('sensor.printer_kWh') }}
|
||||
{% endif%}
|
||||
attributes:
|
||||
last_reset: '1970-01-01T00:00:00+00:00'
|
||||
- name: "washing_machine_kWh"
|
||||
unit_of_measurement: "kWh"
|
||||
state_class: measurement
|
||||
|
Loading…
Reference in New Issue
Block a user