I have several Osram sockets, now I would like to switch them automatically.
Night table example:
When I connect my mobile phone/tablet/smart watch to the USB charging cable, the power socket should switch on, but only if the battery is under 20%, it should switch off automatically at 100% and only when I am at home.
Can I do this with Openhab?
If not, I can check the battery status and the USB connection via Tasker, now I only have to switch on or off the power socket with Tasker, but how do I do that?