Hi folks....script n00b.
I have a dryer that reports "power", I have this as a homeseer device and its reported to HS via a Sonoff/mqtt device.
What I need to do...
Dryer sends updates every 100 seconds.
When power > 300 the dryer is on
When finished the power bounces between 0-1
Clearly I've set the event when power = 0 then event... Problem is when its in the "soft off" mode it still can pull current ie: 0-1 watt. This retriggers my "dryer is off event".
So what I'm thinking:
If the device power > 300 then create an event . This newly created event should run when the power = 0 (dryer finished) What I need to do is create the new event ONCE and not "device changes value greater than 300 as it will keep creating an event on every update over 300 ?
Maybe the test is, if its over 300 and the event doesnt exist, create it. Clearly I want to delete the "power off" event once its run to stop it bouncing when the value goes up to 1 and back to 0.
ANy thoughts ?
Pete
I have a dryer that reports "power", I have this as a homeseer device and its reported to HS via a Sonoff/mqtt device.
What I need to do...
Dryer sends updates every 100 seconds.
When power > 300 the dryer is on
When finished the power bounces between 0-1
Clearly I've set the event when power = 0 then event... Problem is when its in the "soft off" mode it still can pull current ie: 0-1 watt. This retriggers my "dryer is off event".
So what I'm thinking:
If the device power > 300 then create an event . This newly created event should run when the power = 0 (dryer finished) What I need to do is create the new event ONCE and not "device changes value greater than 300 as it will keep creating an event on every update over 300 ?
Maybe the test is, if its over 300 and the event doesnt exist, create it. Clearly I want to delete the "power off" event once its run to stop it bouncing when the value goes up to 1 and back to 0.
ANy thoughts ?
Pete
Comment