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.

  • roofuskit@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    19 days ago

    Have the script generate the time and save it as a number or other variable, have the script start when home assistant does and check the variable, if the time has passed toggle the state of the AC and generate the next run time. If it time is in the future run the script again at that time.

    The logic would look something like this: Start with home assistant or at the next interval of the script Check stored time, if it has elapsed toggle the state of the AC Generate new time and store it repeat the script at that time