@anon43302295, thank you for the input, but still doesn’t work, when the light is totally off it doesn’t switch on, and when the nightlight is on, it switch on the normal light.
Basically I need :
light.toggle when the nightlight is off
light_turn_off when the nightlight is on
@anon43302295: Yes, it’s seem working now, I’m testing the combinations. The fact is that I have other authomation who switch on the bathroom nightlight during the night basing on binary_sensor.presence switch, and normal light in the rest of the day. I have also a xiaomi button to toggle the light, and with switch toggle, when the nightlight is on, and I use toggle with xiaomi button, it just switch on the normal light, then I have to press again to switch off.
In this way, if the nightlight will be switched off immediately. I hope I was clear
@Burningstone: I don’t think so, nightlight acts as a “pure” light, normally I can use toggle/on/off without issue.