Currently I’m configuring a relais that will open for half a second, and closes afterwards.
This is my config:
Packagelock open/close
switch:
- platform: gpio
pin: GPIO12 #D6
inverted: True
restore_mode: RESTORE_DEFAULT_OFF
id: relay
name: “Package lock”
icon: “mdi:gate”
on_turn_on:- delay: 500ms
- switch.turn_off: relay
D6 will however always be in an ON state, switching is not possible.
What am I doing wrong here?
Using a NodeMCU
EDIT: I tried a different pin which was off by default. When changing to this pin, after uploading the config, this pin is also in an always ON state, so it must be due to a flaw in my config.
Also tried:
- Inverted: False
- Removing: restore_mode: RESTORE_DEFAULT_OFF
- Removing inverted alltogether.