mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Update tado docs; added default for float in example (#20843)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
a29b3b4983
commit
56f33bf2c8
@ -178,13 +178,13 @@ automation:
|
||||
- sensor.temp_sensor_room
|
||||
- sensor.tado_temperature
|
||||
|
||||
# Check if the room temp is more than 0.5 higher than the tado thermostat reading
|
||||
# Check if the room temp is more than 0.5 away from the tado thermostat reading condition. The sensors default to room temperature (20) when the reading is in error:
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% set tado_temp = states('sensor.tado_temperature')|float %}
|
||||
{% set room_temp = states('sensor.temp_sensor_room')|float %}
|
||||
{{ (tado_temp - room_temp) > 0.5 }}
|
||||
{% set tado_temp = states('sensor.tado_temperature')|float(20) %}
|
||||
{% set room_temp = states('sensor.temp_sensor_room')|float(20) %}
|
||||
{{ (tado_temp - room_temp) | abs > 0.5 }}
|
||||
|
||||
# Work out what the new offset should be (tado temp less the room temp but add the current offset value) and turn that to a negative value for setting as the new offset
|
||||
action:
|
||||
@ -193,9 +193,9 @@ automation:
|
||||
entity_id: climate.tado
|
||||
data:
|
||||
offset: >
|
||||
{% set tado_temp = states('sensor.tado_temperature')|float %}
|
||||
{% set room_temp = states('sensor.temp_sensor_room')|float %}
|
||||
{% set tado_temp = states('sensor.tado_temperature')|float(20) %}
|
||||
{% set room_temp = states('sensor.temp_sensor_room')|float(20) %}
|
||||
{% set current_offset = state_attr('climate.tado', 'offset_celsius') %}
|
||||
{{ (-(tado_temp - room_temp) + current_offset)|round }}
|
||||
{{ (-(tado_temp - room_temp) + current_offset)|round(1) }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user