1
0
Fork 0

Add computer measurement

This commit is contained in:
Przemek Grondek 2021-08-24 16:34:17 +02:00
parent 33b0d9a91f
commit 6ca8a1ddf7

View file

@ -342,6 +342,11 @@ sensor:
unit_prefix: k
unit_time: h
source: sensor.washing_machine_electrical_measurement
- platform: integration
name: "Computer energy Total"
unit_prefix: k
unit_time: h
source: sensor.computer_outlet_electrical_measurement
binary_sensor:
- name: Desktop
@ -591,7 +596,15 @@ template:
{{ states('sensor.washing_machine_energy_total') }}
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
- name: "all_kWh"
- name: "Computer kWh"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
state: >
{{ states('sensor.computer_energy_total') }}
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
- name: "All kWh"
unit_of_measurement: "kWh"
state_class: measurement
device_class: energy
@ -600,6 +613,7 @@ template:
{% set power = power + states('sensor.3d_printer_kWh') | float %}
{% set power = power + states('sensor.printer_kWh') | float %}
{% set power = power + states('sensor.washing_machine_kWh') | float %}
{% set power = power + states('sensor.computer_kWh') | float %}
{{ power }}
attributes:
last_reset: '1970-01-01T00:00:00+00:00'