Hello,
I would like to define a variable as “away_temp” based on the “temperature” attribute of the climate.
The idea is, if I set XX degrees on the climate, I want 2 degrees less when I leave my home (triggered when my “home” entity switch from on to off).
I though about something like this:
- platform: generic_thermostat
name: Bureau
heater: light.qubino_goap_zmnhjd1_flush_dimmer_pilot_wire_level_3
target_sensor: sensor.fibaro_system_fgsd002_smoke_sensor_temperature_4
min_temp: 15
max_temp: 30
away_temp: 18.5 <<<< I would like to replace by "away_temp: {{ state_attr('climate.desk','temperature') - 2 }}"
But right now it’s not possible. On my logs, I have the error message below:
2020-10-29 17:26:34 ERROR (MainThread) [homeassistant.components.homeassistant] Invalid config for [climate.generic_thermostat]: expected float for dictionary value @ data['away_temp']. Got "{{ state_attr('climate.desk','temperature') - 2 }}". (See ?, line ?).