I am new to Home Assistant but I’ve been pleasantly surprised at how easy at has been to get all of my devices set up and automated.
I have a Home Assistant Green with OS version 15.2, Core 2025.4.3.
I have created many automations, scripts and scenes for various devices but I am stuck trying to automate my air conditioning system.
I have created automations for both heating and cooling that have start and end times and with conditions for the current temperature outside and inside to be met. I can make that part work.
The problem I have is where the conditions are not met at the start time, I need the automation to keep checking those conditions periodically so that the AC turns on when they are met.
I have searched the forum and google many times but I have struggled to find an answer that seemed relevant or that I could understand. At one point I found a reference to a Repeat Until variable that I have added to my automation but it doesn’t seem to have had any effect. Maybe I’m not using it correctly.
My preference is to use the UI to set up the automations and my understanding of YAML is close to zero, so that is also making it hard to find an answer I think.
This is my Automation for Cooling so far:
alias: AC Cooling
description: Turn on AC Cooling if Temp above 24
triggers:
- event: start
trigger: homeassistant
- at: "12:00:00"
trigger: time
- at: "23:00:00"
trigger: time
conditions:
- type: is_temperature
condition: device
device_id: 4cfa8550e4cfad042f89d45a354147c1
entity_id: b54ce541d02b7746d314f21b1cf303d4
domain: sensor
above: 26
- condition: and
conditions:
- type: is_temperature
condition: device
device_id: 4cfa8550e4cfad042f89d45a354147c1
entity_id: b54ce541d02b7746d314f21b1cf303d4
domain: sensor
above: 26
- condition: or
conditions:
- condition: numeric_state
entity_id: climate.ac_living_kitch
above: 24.8
attribute: current_temperature
- condition: numeric_state
entity_id: climate.ac_wayne_s_bed
above: 24.8
attribute: current_temperature
actions:
- repeat:
sequence:
- choose:
- conditions:
- condition: time
after: "12:00:00"
before: "23:00:00"
sequence:
- action: scene.turn_on
metadata: {}
data: {}
target:
entity_id: scene.ac_cooling_default
default:
- device_id: 3f0c27a4da710809b6d2b5416976f33d
domain: climate
entity_id: 89ffbea87e57c381734e9568a6c5113b
type: set_hvac_mode
hvac_mode: "off"
until:
- condition: and
conditions:
- type: is_temperature
condition: device
device_id: 4cfa8550e4cfad042f89d45a354147c1
entity_id: b54ce541d02b7746d314f21b1cf303d4
domain: sensor
above: 26
- condition: or
conditions:
- condition: numeric_state
entity_id: climate.ac_living_kitch
above: 24.8
attribute: current_temperature
- condition: numeric_state
entity_id: climate.ac_wayne_s_bed
above: 24.8
attribute: current_temperature
mode: single
To summarise what I’m trying to achieve:
Start time: 12:00
End Time: 23:00
If outside temperature is above 26
and either
climate.ac_living_kitch is above 24.8
climate.ac_wayne_s_bed is above 24.8
Then
Turn on Scene scene.ac_cooling_default
My current attempts result in either the cooling mode being activated at the start time if the conditions are met or else it never activates.
I’d really appreciate any help that can be offered. Thanks.
4 posts - 3 participants