Turn device (Humidifier) off after 2 hours

Hi there,

I’ve got a smart humidifier. (inline Smart Home Aroma Diffusor) that I would like to control via Home Assistant. I’d like to set it up that it will turn off after 2 hours.

Now, the device itself has a built-in timer, but that only turns off the diffusor while the LEDs stay on all the time.

I’ve read to not use delay for such a long time period, because it’s prone to errors.
So, any other ways to make it work?

Thanks!

Hello, store the “start” date/time into an input_datetime entity and than in the automation check that the current time is greather that your “start” time + 2 hours, the automation will be triggered even if there is an HA restart between the two…

Perfect, thanks! :slight_smile:

2 hrs delay shouldn’t be an issue for HA, but indeed, the automation will abort when HA is restarted during that period.