50 lines
803 B
YAML
50 lines
803 B
YAML
substitutions:
|
|
device_name: "toilet-bulb"
|
|
friendly_name: "Toilet Bulb"
|
|
|
|
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:
|
|
|
|
output:
|
|
- platform: esp8266_pwm
|
|
id: warm_white
|
|
pin: GPIO4
|
|
- platform: esp8266_pwm
|
|
id: brightness
|
|
pin: GPIO5
|
|
|
|
light:
|
|
- platform: cwww
|
|
id: my_light
|
|
name: ${friendly_name}
|
|
warm_white: warm_white
|
|
cold_white: brightness
|
|
cold_white_color_temperature: 6500 K
|
|
warm_white_color_temperature: 2700 K
|