Do rules give up if device is off?

So I had this idea that I'd have the light above my shower do double duty as a nightlight after a certain time. Using a Sengled color smart bulb, I have a rule that sets the color to red if [11PM to 6AM] is TRUE and white if FALSE. The switch gets turned off and on manually, so the bulb is incommunicado obviously when off, but I had assumed when flipped on it would check in with the hub and the hub would say "Howdie, you're supposed to be RED, or WHITE or whatever based on the time, and send the command then. But it doesn't.

It works great if the light is left on all the time, but if ever turned off manually, the only way to get the command to send, is to turn the lamp on and hit "Run this rule" again.

So is there any way to work around this without installing a smart switch also?

Rules run because of Events. The Sengled might be sending an Event, might not. If it IS, you can create a Rule for it.

You might also consider removing the switch completely, tie load to line (the two black wires, wirenut together) and then put this in place of the switch... it's just a button controller.

If you find you love this a lot, then going with the Lutron Pico remote is much better, but involves purchasing a $88 Lutron PRO bridge with the first one. Each Pico is only $15.

Mike Maxwell discussed Buttons in the June 20th Hubitat Live show:

1 Like

To be clear, I think the poster is asking whether if the hub sends a command (e.g., "turn red") to the device while the bulb's power is cut whether the bulb will know to become red next time it is turned (physically) on. That answer is generally no (it doesn't keep trying, generally for the best). If the bulb sends an event to the hub when it is turned on, then as suggested above, you might be able to find a way to "sync" your desired status to the bulb. I wouldn't count on that being the case.

The button device suggested above is one option, but it's a bit pricey and ugly. If you're in the US, the Eria Dimmer is about $20 and can also fit in a decorator plate (downside: small delay if you haven't used it since your last hub boot, though I find it's the same with the highly praised Picos--I think people who don't see this are using it as part of a higher-end system like Ra2 that also has occupancy sensors that might start sending things over telnet and get that connection going before they'd have a chance to notice a slow Pico). For no-rewiring options that would cover the switch, the Centralite or Osram 2-button dimmers are a bit bulky but provide intuitive enough on/off and dimming functions, and they work on toggles, rockers, or standalone anywhere. The Lutron Aurora dimmer is new and not (yet?) natively compatible with Hubitat, but it mounts over a toggle switch with no re-wiring required and should be able to at least respond to a press of its button (turning is a bit awkward in my experience with how it reports but could still be usable for some). Finally, you can also get cheap-ish switch covers (or not) and then use a button device of your choice mounted anywhere to control the light, whether that be one of the previous options or literally any device you choose like a SmartThings Button or the Osram 4-Button Dimmer.

Alternatively: have you considered motion-automated lighting? The scenario you describe is what I do in my bathroom, except I rarely manually change the light. When my hub is in Night Mode, it turns to a dim red. Otherwise, it's usually cool white in the morning and evening and nothing during the day.

Just some thoughts!

if the bulb is powered off when the rule is run, it misses the command. There is no second try or check if it's on or off.

Thanks for all the replies. It's a shame there can't be a refresh/check in capability to listen for devices that come back online and refire the command, but if not, it will be much eaiser to get a $10 motion activated night light than to go through a complex setup to accomplish such a simple thing.

I just thought I could kill 2 birds....

Smart bulbs are really designed to always have power applied to them. I recommend you look at replacing the smart bulb with a smart dimmer switch. This really provides the most flexibility and the best user experience. You'll lose the color aspect, but you can have the lights comes on at a very dim level at night. This is how I handle most lighting automations.


Not if you keep both and just disable the relay so the switch doesn't really cut power! :slight_smile: (Since they want red, I'm not sure a smart dimmer or switch would cut it.) Both generations of Inovelli switches/dimmers support this, and a recent or forthcoming firmware update on many (most?) Zooz switches/dimmers enables or will enable the same. You can technically do it with any switch if you wire line and load together (it should still send on/off commands that you can then use on the hub side to control the bulb yourself). The scene-capable models are even better since you can use multiple taps to do things like dim, change color, or whatever you can imagine. But if you can't rewire, any button device--or really any automation you can imagine (motion sensor in a box you swipe your hand over? pressure mat?)--would work.

1 Like

Could a trigger not work? During some condition if the light is detected, set a color.