Scenario: I have an automation called John’s AC. John’s AC has four separate triggers. Max, minimum lower temperature, lower temperature, upper temperature, and max upper temperature. If the room temperature is below max lower temperature or lower temperature and it warms up to either of those two triggers, the automation gets triggered and creates a log event.

Question: Is there some way to make triggers enable and disable other triggers in their conditions? What I was thinking about doing is having upper temperature and max upper temperature be the only two active triggers. If either was hit, John’s AC would then turn on and the triggers for lower temperature and max lower temperature would be enabled until one of those two triggers was hit, at which point John’s AC would turn off, and those two triggers would be disabled. until upper temperature got hit again.

Admittedly, it’s a lot of work, just to avoid a couple of log messages, but just for shits and giggles, I wonder if it’s possible.

  • surewhynotlem@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    I think you could create a toggle entity. When the high automation goes off, set it to True. Have logic in the high automation that says don’t go off if true. For the low automation, have it only go off if true. And then set it to false when it’s done.

    I’m not sure if I explain that well. But basically the toggle entity would act as a switch that enabled the automation to run, because the automation would check the state of the toggle every time.

      • SayCyberOnceMore@feddit.uk
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        2 days ago

        If I’ve understood @[email protected] correctly, this won’t need 2 automations

        When you exceed a max, I presume you’re triggering the AC to heat / cool, at this point you’d also set the “dontlogthisagain” boolean.

        Then, when you’d reached the correct temp range, then you can turn off the AC and reset the “dontlogthisagain” boolean.

        The conditional statements would then be “(is the temp outsode of range) AND (dontlogthisagain=True)”

        You’d need to check the logic is the right way around there, but - in my head - thst should work.

        Edit: actually, thinking anout this some more, you might not need the boolean, you could use the on/off state of the AC unit itself