47 lines
No EOL
860 B
YAML
47 lines
No EOL
860 B
YAML
esp8266:
|
|
board: d1_mini
|
|
|
|
light:
|
|
- platform: neopixelbus
|
|
id: light_pm25
|
|
variant: WS2812
|
|
pin: D4
|
|
num_leds: 5
|
|
type : GRB
|
|
name: "${friendly_devicename} PM25"
|
|
effects: ${light_effects}
|
|
- platform: neopixelbus
|
|
id: light_pm10
|
|
variant: WS2812
|
|
pin: D3
|
|
num_leds: 5
|
|
type : GRB
|
|
name: "${friendly_devicename} PM10"
|
|
effects: ${light_effects}
|
|
- platform: binary
|
|
name: "${friendly_devicename} Lamp"
|
|
output: relay
|
|
id: light_switch
|
|
|
|
output:
|
|
- platform: gpio
|
|
pin: D1
|
|
id: relay
|
|
|
|
sun:
|
|
latitude: ${lat}
|
|
longitude: ${long}
|
|
on_sunset:
|
|
- then:
|
|
- light.turn_on:
|
|
id: light_switch
|
|
|
|
time:
|
|
- id: !extend sntp_time
|
|
on_time:
|
|
- seconds: 0
|
|
minutes: 30
|
|
hours: 23
|
|
then:
|
|
- light.turn_off:
|
|
id: light_switch |