orrionis
(Orrionis)
February 18, 2022, 5:53pm
1
Hello ;
i have a little question ,
for my radiator i try to automate lot of stuff,
my first idea i t was use the preset of climate entity to activate action.
my climate entity:
- platform: simple_thermostat
name: Thermostat test
heater: switch.test_radiateur
target_sensor: sensor.lumi_lumi_weather_6f614005_temperature
min_temp: 15
max_temp: 24
ac_mode: false
target_temp: 21
cold_tolerance: 0.3
hot_tolerance: 0
min_cycle_duration:
seconds: 5
keep_alive:
minutes: 3
initial_hvac_mode: "heat"
precision: 0.1
the climate it 's ok, it will work for long time it’s not problem.
i found how to get the preset state.
{{state_attr('climate.thermostat_test','preset_mode')}}
in developpement tools the value is “away”, “eco”…
my question how i can use in automation for my test i try this
- id: '1645205985532'
alias: Nouvelle automatisation 2
description: ''
trigger:
- platform: template
value_template: '{{state_attr(''climate.thermostat_test'',''preset_mode'')}}'
condition:
- condition: template
value_template: '{{state_attr(''climate.thermostat_test'',''preset_mode'')}} ==
away'
action:
- type: turn_on
device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
entity_id: switch.relais_cuisine
domain: switch
mode: single
But when i change the state like eco to away , nothing happen
do you have any idea what is wrong
ps: sorry for my english , it’s not verry good
thanks ALL
tom_l
February 18, 2022, 11:34pm
2
Try this:
- id: '1645205985532'
alias: Nouvelle automatisation 2
description: ''
trigger:
- platform: state
entity_id: climate.thermostat_test
attribute: preset_mode
to: away
action:
- type: turn_on
device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
entity_id: switch.relais_cuisine
domain: switch
mode: single
orrionis
(Orrionis)
February 18, 2022, 11:47pm
3
it’s good
i have been found this
- platform: template
value_template: '{{is_state_attr(''climate.thermostat_test'',''preset_mode'',''away'')}}'
condition: []
action:
it’s the same , i know but you solution it’s more simple,
Now i want to tiggrer for all mode like an input select .
it’s possible ??
like
condition: []
action:
- choose:
- conditions:
option 1 away, option 2 eco …
tom_l
February 18, 2022, 11:52pm
4
I think this will trigger on all changes of the preset_mode attribute:
- id: '1645205985532'
alias: Nouvelle automatisation 2
description: ''
trigger:
- platform: state
entity_id: climate.thermostat_test
attribute: preset_mode
to:
I’m a little unclear on your new action requirement. Do you want to always switch the same device on depending on the preset_mode matching the input_select?
Or do you want to turn on different devices depending on the preset_mode matching the input_select?
orrionis
(Orrionis)
February 19, 2022, 12:08am
5
In fact , i want when i change, the preset, i Will activa or no the schéma of my scheduler.
I have 2 scheduler for my, thermostat, on away on eco
Before i have à input-select. .
If i sélect " auto confort" scheduler auto was activate and the scheduler eco was deactivate
If i sélect manuel, all scheduler was deactivitated
If i select auto ,eco . Scheduler away off, scheduler eco on.
But this automation require an input-select in additionn my thermostat.
I want remove the input sélect, and replace by native preset of climate entity
tom_l
February 19, 2022, 12:16am
6
I think I understand:
- id: '1645205985532'
alias: Nouvelle automatisation 2
description: ''
trigger:
- platform: state
entity_id: climate.thermostat_test
attribute: preset_mode
to:
action:
- choose:
- conditions:
- condition: state
entity_id: climate.thermostat_test
attribute: preset_mode
state: eco
sequence:
- # do your eco actions here
- choose:
- conditions:
- condition: state
entity_id: climate.thermostat_test
attribute: preset_mode
state: away
sequence:
- # do your away actions here