Thanks for reading and helping. I’m pretty new with HA and I am trying to understand some automations. One of the automations that I can’t figure out is the following: I want the thermostat to be set to, say, 18 degrees between 5 p.m. and 10 p.m. and only when someone is home. If someone from the group is not at home, the temperature is set to 13 (this automation works), but the temperature may only be set to 18 in that period when someone comes home or is at home.
What I’ve set up now doesn’t work and I can’t figure out why not. Does anyone have a solution?
Here is my automation:
alias: 'Thermostat: at 18 from 17.00 PM'
description: ''
trigger:
- platform: state
entity_id: group.everyone
to: home
condition:
- condition: time
after: '17:00:00'
before: '22:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: climate.set_temperature
data:
temperature: 18
target:
entity_id: climate.honeywell
mode: single
I have this divided in 2 parts: The switching times for comfort and standby temps
In which i check if anyone is home before setting the temperature for comfort.
So in this case the trigger is time.
The 2nd automation triggers if anyone is at home or nobody is and sets the temperature.
That way there will always be a check at a certain time and when the family pressent or not
You could (and i should) put this in 1 automation.
Set the times and presence as triggers, give them an ID and use Choose.
For example this checks if the family is home and is triggered by the morning time (5:50)
alias: Heating Times
description: ''
trigger:
- platform: time
at: '05:50'
id: Morning_Weekday
- platform: time
at: '07:00'
id: Morning_Weekend
- platform: time
id: Evening_Weekday
at: '22:00'
- platform: time
id: Evening_Weekend
at: '23:30'
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: group.family
state: home
- condition: trigger
id: Morning_Weekday
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
sequence:
- service: climate.set_temperature
target:
entity_id: climate.woonkamer
data:
temperature: '{{ states.input_number.setpoint_woonkamer_comfort.state }}'
In any case, I have merged 2 automations on your instructions:
1: If someone is at home, set the temperature to 17 at 8 am
2: If someone is at home, set the temperature to 18 at 5 pm
Is my new automation correct?
…
Then I still have no solution for when everyone is gone and the temperature is at 13. This has to go back to 17 during the day and to 18 in the evening when someone comes/is home.
trigger:
- platform: state
entity_id: group.family
to: not_home
for:
hours: 0
minutes: 30
seconds: 0
id: nothome30min
- platform: state
entity_id: group.family
to: home
id: home
And use that with the condition time to decide if to set the temp.
- condition: time
after: '17:00:00'
before: '22:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
Looking at this made me decide to redo my automation into 1, will get right on it when i’m home.
There is prob a much cleaner way todo this someone will post if so