I have a Wemos D1 Mini with a motion sensor connected to it. I would like to add a LED of 5v to it so if the montion sensor detects movement the led will stay ON for 60 seconds.
For now I have this:
binary_sensor:
- platform: gpio
pin: GPIO12
name: "PIR Sensor"
device_class: motion
Is it possible to use the same Wemos to power the 5v led?
Where do I need to connect the LED and what do I have to add to the code?
Tried this but not working…
switch:
- platform: gpio
pin: GPIO14
id: LEDS
name: "LEDS"
binary_sensor:
- platform: gpio
pin: GPIO12
name: "PIR Sensor"
device_class: motion
on_press:
then:
- switch.turn_on:
id: LEDS
filters:
delayed_on: 60s