Last active
July 8, 2024 04:54
-
-
Save lennon101/53aa770aea9db00cd731b51bd910885b to your computer and use it in GitHub Desktop.
template sensor for total power
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: template | |
sensors: | |
total_energy: | |
friendly_name: "Total Energy" | |
unit_of_measurement: 'Wh' | |
value_template: > | |
{% set device_a_energy = states('sensor.device_a_energy') | float %} | |
{% set device_b_energy = states('sensor.device_b_energy') | float %} | |
{% set device_c_energy = states('sensor.device_c_energy') | float %} | |
{{ (device_a_energy + device_b_energy + device_c_energy) | round(2) }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment