Hi everyone. I am experiencing very odd behavior with Room Lighting. I wrote a fairly simple automation to turn on balcony lights at a certain time and then turn off when my TV power exceeds a certain amount. The trigger for the power exceeding 20 doesn't work. Just to check my logic I wrote a simple Rule 5.1 rule that turns lights off when power exceeds 20 and it works perfectly. Here's the trigger off logic of the Room Lights app.
I turned on logs and looked and it wasn't triggering. What am I missing? I'm guessing it has something to do with the fact that power is only available as a custom attribute trigger.
For completeness sake, the following Rule Machine rule works fine.
Look at the Event Subscriptions on the App Status page to see if it subscribes to the power events. In your rule it seems to be called 'power level' and in Room Lights 'power'. Does that matter?
I looked and indeed power is not on the list of events subscribed. I don't know why. It should be there since I picked it as a custom attribute to use as an event trigger. When you pick this device, the list of triggers is presented and "power" is an option, and "power level" is not. I checked the Rule Machine rule that works and the event subscribed is for "power" not "power level".
Weird update... I added a custom Activate trigger for the same power switch and then both the customHandler and customOffHandler events showed up. That is so weird. So I guess a workaround is to make an activate handler that has a bogus range that would never be true. Anyway there is probably a bug buried in there somewhere.
[EDIT] I went back and removed the Activate trigger, and the customOffHandler event stayed there. Thought this info would help you troubleshoot.
yes and yes. I had that trigger in there for some time and it never worked. The above is the result of me finally finding time to troubleshoot it. I can't seem to replicate it either, so chalk it up to gobblins in the machine i suppose. Thanks for looking. I'll let you know if it ever pops up again.
I asked about release number because there had been a bug in Room Lights wrt Custom Attribute as Means to Turn Off. That bug was fixed a couple of releases ago.