Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template:
- - sensor:
- - name: "Sauna valmis"
- unit_of_measurement: "min"
- state: >-
- {% set living_room_temp = states('sensor.ruuvitag_olohuone_temperature')|float|round(1, default=0) %}
- {% set sauna_temp = states('sensor.ruuvitag_sauna_temperature')|float|round(1, default=0) %}
- {% set target = states('input_number.sauna_valmis')|float|round(1, default=0) %}
- {% set change = states('sensor.sauna_temperature_change_per_hour')|float|round(1, default=0) %}
- {% set eta = ((target - sauna_temp) * 60 / change)|round(0, default=0) %}
- {% if (sauna_temp - 5) > living_room_temp and sauna_temp < target and eta < 120 %}
- {{ eta }}
- {% else %}
- 0
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement