TLDR: I have a rule that subscribes to the trigger event after a hub reboot even though the required expression is false. Checking "evaluate required expression at system startup" doesn't help. As a result the rule, which is set for Actions logging only, keeps logging "Required Expression false" when the value of the trigger changes. Clicking "update" in the rule drops the subscription and stops the logging. I thought that event subscriptions for triggers aren't created when a required expression is false. In any case, no 'Actions' should be logged when a required expression is false as the rule should never reach the 'Actions' phase.
Details:
I have a rule that I created to notify me if my solar array isn't producing any power when it should be. I had a circuit breaker blow once that took the panels offline, so this rule is there just in case it happens again.
The rule has a required expression so that it only runs when there should be power, and uses a Private Boolean to make sure it doesn't notify more than once an hour.
The required expression has three parts: (1) Between sunrise + 60 min and sunset - 60 min : (2) Cloud cover less than 50% (3) Private boolean is true.
The trigger is based on the solar power reported by my Powerwall gateway. If it is < 10 watts, the trigger fires.
The actions are to set the private boolean to false, notify me, and set the private boolean to true 1 hour later:
The rule is set to log Actions only.
My understanding is that if the required expression is false, the rule shouldn't have subscriptions to devices that are used as triggers. However this rule has a subscription to the trigger device and keeps logging "Required Expression false" every time the power value changes (which is usually every minute).
If I click "Update Rule" without making any changes, the subscriptions become:
Which appears to be correct and stops the log entries.
I initially didn't have "evaluate required expression at startup" checked, so I tried checking that option to see if it would drop the subscription. After a reboot, the only change is I have an additional subscription to
But it recreated the subscription to the Powerwall - Solar Power device. Clicking 'update' in the rule again dropped that subscription.
Do I just need to delete and recreate this rule or is there something I'm missing here that explains why it is keeping the subscription active while the required expression is false?