I'm attempting to optimize my rule execution and have run into an item that I'd like to resolve.
I have a ZEN15 feeding a television. I am utilizing the power to determine whether or not the television is on. Originally, I'd utilized Power level *changed as my trigger. Then, conditionally, if the power is greater than 50, I set a virtual switch to ON, otherwise it is set to OFF. This virtual is then monitored by another rule that utilizes the information as a presence indicator for other devices in the room. I've since changed the trigger to becomes > 20 and becomes < 10. (This change really didn't do anything help my problem.)
My issue, which occurs with either trigger setup, is that the television will go from 0 to 1.5 watts every few minutes. Each change, triggers the rule regardless of using the *changed or becomes. Looking at the count of calls for this rule to execute, I see between 300 and 400 triggers of this rule every 12 hours. These are with the television off.
I'm currently thinking about modifying the driver for this to force a value of 100 if over 50, and 0 if under. Not changing the value/sending an event if there is no transition across the 50 level. Effectively making it an ON/OFF indicator. This will, unfortunately, render power monitoring useless, but would likely reduce the number of times this rule executes to maybe twice a day.
This rule has triggered over 70,000 times in the last 57 days.
Any thoughts? Suggestions?