I managed to add Shelly 1 to my Garden PIR Light, So now I can monitor the motion in all day and turn on the light in night.
I had this idea in my mind for a while, but didn’t have the courage to do, but after seeing the following video i too managed to put shelly 1 inside the PIR Light and it works.
ESPHome: Config
esphome:
name: garden
platform: ESP8266
board: esp01_1m
wifi:
networks:
- ssid: "wifi"
password: "wifipassword"
- ssid: "wifi2"
password: "wifipassword2"
output:
- platform: gpio
pin: GPIO4
id: gpio_4
light:
- platform: binary
name: "Garden Light"
output: gpio_4
binary_sensor:
- platform: gpio
pin:
number: GPIO5
name: "Garden"
Automation:
- id: 'YYYYYYYY'
alias: garden_light_ON
description: ''
trigger:
- entity_id: binary_sensor.garden
from: 'off'
platform: state
to: 'on'
condition:
- after: '18:00:00'
before: 06:00:00
condition: time
action:
- data:
entity_id: light.garden_light
service: light.turn_on
- id: 'XXXXXXXXX'
alias: garden_light_OFF
description: ''
trigger:
- entity_id: binary_sensor.garden
from: 'on'
platform: state
to: 'off'
condition: []
action:
- data:
entity_id: light.garden_light
service: light.turn_off