Hello community,
I am completely new to the topic of Home Assistant. So if I’m forgetting any important information, please let me know.
For a few days now, I have had the problem that my Shelly switches trigger the automation for the light on their own. The Shelly 1 pm mini is running in detached mode and switches the light via the following automation:
alias: Smart light
description:
triggers:
entity_id:
binary_sensor.lichtschalter_eg_arbeitszimmer_input_0_input
trigger: state
conditions:
actions:
The logbook shows that the Shelly is temporarily unavailable. After it is available again, the light switches.
My guess: The automation switches on every status change and not just on and off. Shortly before this happens, the router does a channel scan and sets the channels for the WLAN. So the Shelly briefly has no wifi and therefore switches the light?
How can this be avoided? Unfortunately I could not find a suitable entry.
Hi there. In order for us to be able to see your automation the right way you need to formt it using </> in the editor. The indenting and such is important, and it gets mangled if you just paste the code.
To get at what we can see: since you did not specify a from or to it does indeed trigger on any state change. It is best to listen fro changes from off to on and the other way around.
sorry, due to personal stress I completely forgot about this post until the light started switching itself on and off again today
alias: Smart Lichtschalter - EG - Arbeitszimmer
description: >-
Shelly 1pm hinter der Lichtschalter neben der Tür im Arbeitszimmer. Wird im
detached mode zur Steuerung der Deckenleuchte verwendet.
triggers:
- trigger: state
entity_id:
- binary_sensor.lichtschalter_eg_arbeitszimmer_input_0_input
not_to:
- unavailable
- unknown
- nicht verfügbar
conditions: []
actions:
- action: light.toggle
metadata: {}
data: {}
target:
entity_id: light.deckenleuchte_eg_arbeitszimmer
mode: single
the code would then look like this with the suggestion. My Home Assistant is set to German, so the parameters to which the automation should not respond should be listed in German, right?