I have a Zemismart Zigbee switch and I would like to know how I can prevent it from turning on during the daytime. I created an automation that accomplishes this, but when I press the button, the light turns on briefly and then shuts off. Is there a way to achieve this without the light flickering?
alias: Nova Automação
description: ""
triggers:
- trigger: state
entity_id:
- switch.interruptor_quarto_casal
from: "off"
to: "on"
conditions:
- condition: sun
before: sunset
after: sunrise
actions:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.interruptor_quarto_casal
mode: single
Exactly. If the switch is directly controlling the circuit, there is no way. Otherwise, connect something like a Shelly 1 to the light and a Shelly i4 to the switch. The i4 tells HA simply whether the switch has been flipped. In HA you then decide what to do with that event.
I see, I thought it is like a soft switch, it is just a push button. So I need different circuits so they can be triggered separately. More expensive than I thought.
There might be alternative options. I just wanted to convey the idea.
But, if you have a Shelly i4, then you have 3 more inputs to which you can connect switches to control scenes or other things, to get a bit more value for money.