It seems like an MQTT button would be the way to go for that. Or one of those z-wave remote controls. I don’t know if an automation can control another automation though.
I have some Xiaomi Buttons so I may make them switch on a script that stops the alarm… adds a 10mins delay… then starts the alarm sound again. Should be quite easy actually. I haven’t used my alarm since because I couldn’t find a simple solution at the time. Thanks for reminding me! I’ll add this to the list of things to do.
What I would really love is to continue using my sleep cycle app and integrate it into Emulated Hue. The app can turn on/turn off a Hue bulb when the alarm is set/goes off. But I haven’t found a way of making that work with emulated Hue.
I’m not quite sure what you are trying to accomplish here. What is your goal with this automation? Turning on an automation doesn’t mean it gets triggered, you are aware of that?.
Hi Bob,
Yes I know turning on the automation doesn’t trigger it :).
What I’m trying to accomplish is that the first automation turns on the heating.
Then the second automation should trigger after the starting time + duration minutes occurs, and should turn off the heating.
I copied it from this thread (hmmm, maybe I should post my question there then :))
Unless I did not understand your request, if you simply want to turn your heating off x minutes after it’s been turned on, why not add a delay to your first automation then turn the heating off?
I want it to be variable and to be set through the UI. So 1 day I may want it to stay on 15minutes, the other day 60minutes.
Can I use input_numbers as the delay variable?
in that case I’d personally stick with 2 automations indeed.
The 2nd should run periodically (e.g. every 1 min) and have a condition to check against.
I’d say make sure you’re on you can use release 0.55 or later and use input_datetime in your condition. I would not use the == operator but the >= operator to make sure your automation still runs in the event where there is a delay.
I’d use something like this:
I’ve not tested the above code so can’t guarantee it’s error-free but should give you a starting point hopefully.
OR you could use an input_select with a list of times and use this instead of input_datetime.time_to_heat if your list of possible times is not infinite
I think if you were to create an MQTT switch that had as payload your slider state and set the state and command topics to the same, then set the retain switch to true, that would force the MQTT broker to resend the slider state back after a reset. You would have to setup an automation to send the state when it’s state changed.