Hi,
I’m implementing “away_mode”, basically controlled by external button.
The logic is simple: when helper “away_mode” is on, automation sets climate temperature to numeric helper eco_temp, and when off, to numeric helper “boost_temp” (plus some lights controll) - easy. But I want to turn off “away_mode” on any manual climate temperature change. The problem is when “away_mode” is set to on, it changes climate temperature, wchich turns “away_mode” back off
So I try to filter only manual climate temperature changes - it can be done by condition on temperature change trigger from: (eco_temp). And actually it works OK when I put temperature directly in automation.
But I can’t manage to put helper value instead of direct value.
My automation:
alias: Termostat lab away mode
description: ""
trigger:
- platform: state
entity_id:
- climate.lab
attribute: temperature
id: temp
from:
value_template: "{{states('input_number.heating_eco_temp')|float}}" #Does not work, but "17.0" works ok.
- platform: state
entity_id:
- input_boolean.lab_away_mode
condition: []
action:
- if:
- condition: trigger
id: temp
then:
- condition: state
entity_id: input_boolean.lab_away_mode
state: "on"
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.lab_away_mode
else:
- if:
- condition: state
entity_id: input_boolean.lab_away_mode
state: "on"
then:
- service: climate.set_temperature
data_template:
temperature: "{{states('input_number.heating_eco_temp')|float}}"
entity_id: climate.lab
- service: light.turn_off
data: {}
target:
entity_id: light.lab_lights_2
else:
- service: climate.set_temperature
data_template:
temperature: "{{states('input_number.heating_boost_temp')|float}}"
entity_id: climate.lab
- if:
- condition: state
entity_id: sensor.controller1_light_level
state: ">10"
then:
- service: light.turn_on
data:
brightness: 206
target:
entity_id: light.midesklamp1s_67ca
mode: single
So my question is, how to template from: in trigger, or can I achieve such logic in other way?