I have gotten my ShellyDimmer2 working with HA via MQTT following some posts I found in these forums.
Now I would like to try and reach the final goal of these dimmers.
I have an automation set to turn the lights on, brightness at 15% at sunset (Porch lights). I would like to also have the wall switch control them so if the wall switch turns on, the lights come up to 100%, and when the switch is turned off, the lights will go back to 15% until midnight. After midnight, the lights will just be off (unless the wall switch is turned on of course).
The idea being that i can have general aesthetic lighting unless we need to have the lights on for a visitor or specific reason.
I can automate the sunset/midnight parts easily. but how do I monitor the shelly’s switch input to set the brightness higher when true, and then check time of day to determine whether to return to the dimmer setting, or completely off when the switch input goes false?
via MQTT Explorer i can see
“shellies/ShellyDimmer_Porch1/input” topic reporting a “0=0” and a “1=0” which I believe is the SW1/SW2 terminals on the device. when i connect SW1 to L1, I see “0=1”. So I just need some help building the logic to asses that against the time of day.
Thanks in advance for any help!