66 lines
997 B
YAML
66 lines
997 B
YAML
substitutions:
|
|
device_name: "bedroom-bulb-1"
|
|
friendly_name: "Bedroom Bulb 1"
|
|
|
|
esphome:
|
|
name: ${device_name}
|
|
comment: ${friendly_name}
|
|
platform: ESP8266
|
|
board: esp01_1m
|
|
on_boot:
|
|
then:
|
|
- light.turn_on: my_light
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
web_server:
|
|
port: 80
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
|
|
ota:
|
|
platform: esphome
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
fast_connect: true
|
|
domain: .cloonar.smart
|
|
|
|
captive_portal:
|
|
|
|
light:
|
|
- platform: rgbw
|
|
id: my_light
|
|
name: ${friendly_name}
|
|
red: pwm_r
|
|
green: pwm_g
|
|
blue: pwm_b
|
|
white: pwm_w
|
|
effects:
|
|
- random:
|
|
- strobe:
|
|
- flicker:
|
|
|
|
output:
|
|
- platform: esp8266_pwm
|
|
pin: GPIO13
|
|
frequency: 1000 Hz
|
|
id: pwm_r
|
|
|
|
- platform: esp8266_pwm
|
|
pin: GPIO12
|
|
frequency: 1000 Hz
|
|
id: pwm_g
|
|
|
|
- platform: esp8266_pwm
|
|
pin: GPIO14
|
|
frequency: 1000 Hz
|
|
id: pwm_b
|
|
|
|
- platform: esp8266_pwm
|
|
pin: GPIO5
|
|
frequency: 1000 Hz
|
|
id: pwm_w |