Combining Sonoff POW R2 and Input Boolean

I have several Sonoff POW R2s hooked up to various devices that I want to turn on/off as needed. I intend on keeping the R2s turned 'on' all the time, and use it's power value to determine if the controlled device is on or not. I'll be using remotes to turn on/off the devices for the most part. I also want to know when someone manually turns on a device, and have that factored into my automations.

So far, I've created an input boolean for each device I want to control (Living Room TV, Bedroom TV, etc.). I then have a flow that checks the power value for each R2, and when it's above 20W, it switches the input boolean to on, and when it's below 20 W, it switches if off. This allows me to know when something was turned on or off manually.

I have a second flow that checks the input boolean states, and sends off various on/off commands for each device, as needed. This allows me to turn on/off the devices from with HA and Node-Red automations.

The issue I have is the small delay when a device on the R2 is turned on and running, and when that reading is registered. For example, if my TV is off, and I use the input boolean to turn in on, it turns the TV on right away, but maybe two seconds later, my first flow will see that the TV is still below 20W and will switch the input boolean to off.

I have a couple of ideas of how to addresses this, but I'm wondering if there's a specific node I may be missing, or some other plan of attack that I should be taking.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.