4

Currently, I have an automation that turns on my air conditioner for 37 minutes, every 3 hours. However, during that time, I cannot do anything like update, HAOS, etc. Because it breaks the timer, and then I have to manually shut it off.

top 5 comments
sorted by: hot top controversial new old
[-] CompactFlax@discuss.tchncs.de 2 points 1 week ago* (last edited 1 week ago)

Save stop time to a helper. Helper state persists through automation restarts, ha restarts, and OS restarts.

Check the helper every minute. Or, just run until the stop time is reached, and create an automation to check and restart the timer when HA restarts.

[-] KairuByte@lemmy.dbzer0.com 1 points 1 week ago

This is the way. It’s a little annoying, but much more reliable. If you set an actual date and time, you can also ensure an old timer kicks off if HA was down for more than the minute it needed to hit.

[-] Bryan065@kbin.earth 1 points 1 week ago

i would probably do it with two+ automations. Something like:

ON automation:

  • trigger:
    • time pattern - beginning of every 3 hours
  • then:
    • start timer with duration 37 minutes (select your timer helper)
    • Turn on AC unit

OFF automation:

  • trigger:
    • Manual Event
      • event type: timer.finished (case sensitive!)
      • event data : entity_id: timer.[timer_helper_entity]
  • then:
    • turn off AC unit

STARTUP_CHECK automation:

  • trigger:
    • when home assistant is started
  • if:
    • state - timer helper is idle
    • AC is on
  • then:
    • turn AC off

Note 1: make sure the timer helper has restore state and time when HA starts enabled

note 2: automations using the timer.finished event will not trigger on startup if the timer expires when Home Assistant is not running.

note 2a: the third automation is for your edge case that you reboot/shutdown HA when the OFF automation was supposed to fire. it should ensure the AC turns off after the timer was supposed to be finished and HA is started. this automation does not account for if the AC is turned on manually and you restart HA.

i can get you the .YAML or pictures when I'm at a computer.

[-] AreaKode@lemmy.world 0 points 1 week ago

Make sure you have this option checked:

[-] roofuskit@lemmy.world 1 points 1 week ago

Been using home assistant from the very early days and I did not realize this function existed. Thank you.

this post was submitted on 30 Sep 2025
4 points (100.0% liked)

homeassistant

16474 readers
8 users here now

Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation

Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk

founded 2 years ago
MODERATORS