Hi there - apologies up front if this has been asked and answered; I did a fair amount of searching but couldn’t quite find what I was looking for. Feel free to redirect me and close this if I missed it!
What I’d like to accomplish: I have several Home Depot/Commercial Electric recessed lights [not smart, powered only]. These have a feature I enjoy that engage a band of lights that halo around the body of the light to serve as a night light. To turn this on, I have to toggle the light off and on again with 3 seconds of the last time the light was on. I’m trying to figure out how to configure an automation [or some other method] to deterministically engage the lights as ‘on’ (regularly) or ‘halo’ (on but with halo effect).
If anyone has the time to help me think through the logic here, I’d be quite grateful. I’m wondering if I could either track state and use delay-based call_service on/off, or if I could read the wattage on my Innovelli switches which are controlling these lights. For the latter, I’m able to see the power draw reported by the switch and of course it’s markedly lower if the Halo is on versus the light itself. For the former, I’m not sure how to do this.
Thinking out loud, if there’s a way to keep persistent state, then I could if/then, right?
1/ light off: “If the light is off, the state is obvious. To go to halo, I would turn the light on, represent the state as on, turn it off, which would toggle the state to off again, and then turn the light back on again within 3 seconds, and track the state as halo.”. The first two states I get for free from the HA integration, but the halo/on states could not represent reality unless I have a way to be sure they’re persistent.
2/ light on: Or, “if the light is on regularly, and I call for Halo, I toggle the light off deterministically and change the state to Off automatically. Then I turn the light back on within 3 seconds and go to Halo mode [change variable manually]”.
3/ light on halo: “If the light is halo’d, but I want normal operation, I first check the variable and I see it’s Halo. I turn the switch off, wait 3-4 seconds, and turn it on again”
Am I overcomplicating this? If this is the right way, any help or pseudocode to give me a nudge would be appreciated very much.
What about using the Innovelli’s reported wattage? This is less deterministic but in informal tests the results seem to be fairly consistent.
Not really sure where to start here (automations, scripts, variables?!) but the community seems super helpful so I’m hoping this is of interest to someone and that there are some ideas. Thank you so much!