Help with LHS of a rule

Hi

Have you considered using a chain of rules?

Your energy counter state could toggle the state of an in-memory switch.

Then have a rule monitor the in-memory switch state to achieve what you're looking for?

For example :- (syntax is very wrong)

// This will trigger repeatedly
source == "energy_sensor", value > 0
Then
Executecommand ("in-memory_on"):

// This will only trigger on a state change to on.

source == "in-memory state", =="on"
Then
ExecuteCommand ("whatever you want done once"):

// Toggle in-memory state to off

source == "energy_sensor", value == 0
Then
ExecuteCommand ("in-memory_off"):