I want to automatically turn On/Off a Yeelight in my toilets using a Xiaomi door sensor.
Goal is to switch to On state when an open event is detected, and next open event to switch Off, and so on and so on.
I thought that would be fairly easy but failed to success, when I want to select the "Turn on/off" option for the Yeelights, this option is locked, all the others being available. But this one has a small lock icon next to it.
Why is that ?
Is there any other way to achieve what I'm trying to do ?