I have a 6 different brand/model Zigbee smart plugs. I've recently added some to my system in places where I want the plug to either turn on/off after power failure. That led me down a rabbit hole about all of my smart plugs.
It seems most of these smart plugs work with the Generic Zigbee driver. Someone in the community developed a custom driver for the Third Reality plug (I think it works with both models).
How are you guys handling the "restore to" state after a power failure?
It's easy to create a routine to turn on devices that you always want on. I haven't figured out how to handle the other 2 cases (turn off and previous state).
If you can't find a device driver for all of these, i suppose you could handle it in Rule Machine. You'd need some way to detect an outage and then trigger a rule when power comes back. This assumes your hub is on some type of UPS. Gets tougher if your hub goes down when the power is out.
Stuff like this frustrating. I'm sure I can't be the first person that has had this issue. This seems like standard functionality for devices of this nature.
For this to work at the most basic level, it has to be built into the device's firmware. It needs to log its last known state and execute an action (with no external command) to achieve that state during power-up. A driver can only provide access to this feature if the capability is there in the hardware. If the manufacturer didn't build it into the device, it's just not there.
But if you've got a specific problem you're trying to solve, I'm sure there's a way. Just provide some details and give other a chance to weigh in. As you said, it should be a pretty common issue and I bet someone already cracked that nut.