Hi,
Below is my current Automation for my heating. Whilst this may look a bit long winded, ultimately it works quite well. However, I’m looking to make some improvements specifically around adjusting the temperature according to whether someone is home or not. As you can see, at the moment the temperature is set to 20degC based on time. However, I’d like to keep the times but add a condition such that if someone is home the temperature set point will go to 20degC but if not, it will only be 18degC.
The issue I seem to have is to get the temperature set point to change at any point in time according to a person’s location.
eg. The Heating is set to come on between 1700 & 2100. If at 1700, there’s no one in the house, the temp is set to 18degC. If at 1730 I arrive home from work, the heating (set point) rises to 20degC. If I decide to then go out again at 1900, the heating should revert to 18degC
Could someone point me in the direction of the best way to right this as an automation??
`- alias: Raise Living Room thermostat target temperature Morning
trigger:
- platform: time
at: 07:30:00
- platform: homeassistant
event: start
condition:
condition: time
after: 06:45:00
before: 08:30:00
action:
service: climate.set_temperature
entity_id: climate.living_room
data:
temperature: 20
id: 996b63926322423ea85a5aeb889e0e6f
- alias: Lower Living Room thermostat target temperature Morning
trigger:
- platform: time
at: 08:30:00
- platform: homeassistant
event: start
condition:
condition: time
after: 08:30:00
before: '18:00:00'
action:
service: climate.set_temperature
entity_id: climate.living_room
data:
temperature: 16
id: a2794a1e8b2744ac85646f7d2d3dcc42
- alias: Raise Living Room thermostat target temperature evening
trigger:
- platform: time
at: '18:00:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '18:00:00'
before: '21:30:00'
action:
service: climate.set_temperature
entity_id: climate.living_room
data:
temperature: 20
id: 30b46af77e7e4addba3b512921d2b973
- alias: Lower Living Room thermostat target temperature evening
trigger:
- platform: time
at: '21:30:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '21:30:00'
before: 07:00:00
action:
service: climate.set_temperature
entity_id: climate.living_room
data:
temperature: 16
id: e3543aa9eb85409d9eb4ccdb25c9a3cc
- alias: Raise Kitchen thermostat target temperature Morning
trigger:
- platform: time
at: 06:45:00
- platform: homeassistant
event: start
condition:
condition: time
after: 06:45:00
before: 09:00:00
action:
service: climate.set_temperature
entity_id: climate.kitchen
data:
temperature: 20
id: 996b63926322423ea85a5aeb889e0e6e
- alias: Lower Kitchen thermostat target temperature Morning
trigger:
- platform: time
at: 09:00:00
- platform: homeassistant
event: start
condition:
condition: time
after: 09:00:00
before: '17:00:00'
action:
service: climate.set_temperature
entity_id: climate.kitchen
data:
temperature: 16
id: a2794a1e8b2744ac85646f7d2d3dcc43
- alias: Raise Kitchen thermostat target temperature evening
trigger:
- platform: time
at: '17:00:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '17:00:00'
before: '21:30:00'
action:
service: climate.set_temperature
entity_id: climate.kitchen
data:
temperature: 20
id: 30b46af77e7e4addba3b512921d2b972
- alias: Lower Kitchen thermostat target temperature evening
trigger:
- platform: time
at: '21:30:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '21:30:00'
before: 06:45:00
action:
service: climate.set_temperature
entity_id: climate.kitchen
data:
temperature: 16
id: e3543aa9eb85409d9eb4ccdb25c9a3cd
- alias: Raise TV Room thermostat target temperature Morning
trigger:
- platform: time
at: 07:30:00
- platform: homeassistant
event: start
condition:
condition: time
after: 07:30:00
before: 09:00:00
action:
service: climate.set_temperature
entity_id: climate.tv_room
data:
temperature: 20
id: 996b63926322423ea85a5aeb889e0e6g
- alias: Lower TV Room thermostat target temperature Morning
trigger:
- platform: time
at: 09:00:00
- platform: homeassistant
event: start
condition:
condition: time
after: 09:00:00
before: '17:00:00'
action:
service: climate.set_temperature
entity_id: climate.tv_room
data:
temperature: 16
id: a2794a1e8b2744ac85646f7d2d3dcc41
- alias: Raise TV Room thermostat target temperature evening
trigger:
- platform: time
at: '17:30:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '17:30:00'
before: '21:30:00'
action:
service: climate.set_temperature
entity_id: climate.tv_room
data:
temperature: 20
id: 30b46af77e7e4addba3b512921d2b975
- alias: Lower TV Room thermostat target temperature evening
trigger:
- platform: time
at: '21:30:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '21:30:00'
before: 07:00:00
action:
service: climate.set_temperature
entity_id: climate.tv_room
data:
temperature: 16
id: e3543aa9eb85409d9eb4ccdb25c9a3ce
- alias: Raise Upstairs thermostat target temperature Morning
trigger:
- platform: time
at: 06:00:00
- platform: homeassistant
event: start
condition:
condition: time
after: 06:00:00
before: 08:00:00
action:
service: climate.set_temperature
entity_id: climate.upstairs
data:
temperature: 20
id: c5bd9d3c6245480ab6c5bc2716f28ce5
- alias: Lower Upstairs thermostat target temperature Morning
trigger:
- platform: time
at: 08:00:00
- platform: homeassistant
event: start
condition:
condition: time
after: 08:00:00
before: '18:30:00'
action:
service: climate.set_temperature
entity_id: climate.upstairs
data:
temperature: 16
id: 2a0edef6240f420684cc279313489b1e
- alias: Raise Upstairs thermostat target temperature evening
trigger:
- platform: time
at: '18:30:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '18:30:00'
before: '21:00:00'
action:
service: climate.set_temperature
entity_id: climate.upstairs
data:
temperature: 20
id: 8326204c1fd6497ca1d20bc050424b99
- alias: Lower Upstairs thermostat target temperature evening
trigger:
- platform: time
at: '21:00:00'
- platform: homeassistant
event: start
condition:
condition: time
after: '21:00:00'
before: 06:00:00
action:
service: climate.set_temperature
entity_id: climate.upstairs
data:
temperature: 16
id: 7eb84da45e454825b36e9268f4d34270`
Again, as you can see this is quite long winded, so if you can suggest a way of streamlining this, that’d be appreciated too