Wanting to create a “nighlight” entity for a dimmer switch I have over the bathroom vanity and not sure how to do this. The dimmer is integrated into HA via Z-wave to MQTT so is it’s own entity and works as a dimmer. What I would like to do is set a toggle (off/on) that would bring the light to 5% and allow for off/on only.
I used to have that part working when I had the light defined as an mqtt light before adding HA integration but it doesn’t seem to function properly anymore.
And maybe an input boolean that you turn on/off for nightlight mode. You can control that boolean with other automations too (like time of day) to have it turn on/off automatically.
The template light will be 99% the regular light. So the turn_off, set_level, set_temperature etc will just be a 1 to 1 call of the original light.
Or you could have the turn_on set a scene if that boolean is set if you’d rather.
Also, set an automation that looks at that input_boolean. When it goes from ‘off’ to ‘on’, turn on the template light. No need to set brightness because the template light will already do that for you with the ‘on’ command if that boolean is on.