homeassistant/template.yaml
2023-01-20 23:48:35 +01:00

59 lines
2.6 KiB
YAML

- sensor:
- name: "Energy Total"
unique_id: energy_total
state: >-
{{ states('sensor.shelly3em_channel_a_energy')|float +
states('sensor.shelly3em_channel_b_energy')|float +
states('sensor.shelly3em_channel_c_energy')|float }}
unit_of_measurement: kWh
device_class: energy
state_class: measurement
attributes:
last_reset: "1970-01-01T00:00:00+00:00"
- name: "Power Total"
unique_id: power_total
state: >-
{{ (states('sensor.shelly3em_channel_a_power')|float +
states('sensor.shelly3em_channel_b_power')|float +
states('sensor.shelly3em_channel_c_power')|float) }}
unit_of_measurement: W
device_class: power
state_class: measurement
- name: "Power Factor Total"
unique_id: power_factor_total
state: >-
{{ (((states('sensor.shelly3em_channel_a_power')|float) * (states('sensor.shelly3em_channel_a_power_factor')|float) +
(states('sensor.shelly3em_channel_b_power')|float) * (states('sensor.shelly3em_channel_b_power_factor')|float) +
(states('sensor.shelly3em_channel_c_power')|float) * (states('sensor.shelly3em_channel_c_power_factor')|float)) /
(states('sensor.shelly3em_channel_a_power')|float + states('sensor.shelly3em_channel_b_power')|float + states('sensor.shelly3em_channel_c_power')|float))
|int }}
unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
# Klimatizace - aktuální teplota
- name: "AC Livingroom Current temperature"
unique_id: ac_livingroom_current_temperature
unit_of_measurement: "°C"
state: >
{{ state_attr('climate.ac_livingroom', 'current_temperature') }}
- name: "AC Bathroom Current temperature"
unique_id: ac_bathroom_current_temperature
unit_of_measurement: "°C"
state: >
{{ state_attr('climate.ac_bathroom', 'current_temperature') }}
- name: "AC Bedroom Current temperature"
unique_id: ac_bedroom_current_temperature
unit_of_measurement: "°C"
state: >
{{ state_attr('climate.ac_bedroom', 'current_temperature') }}
- name: "AC Childrensroom Current temperature"
unique_id: ac_childrensroom_current_temperature
unit_of_measurement: "°C"
state: >
{{ state_attr('climate.ac_childrensroom', 'current_temperature') }}
- name: "AC Guestroom Current temperature"
unique_id: ac_guestroom_current_temperature
unit_of_measurement: "°C"
state: >
{{ state_attr('climate.ac_guestroom', 'current_temperature') }}