Skip to content

Instantly share code, notes, and snippets.

@marrobHD
Created May 23, 2022 18:48
Show Gist options
  • Save marrobHD/8558c00e97070fcee1f1e5064943e89b to your computer and use it in GitHub Desktop.
Save marrobHD/8558c00e97070fcee1f1e5064943e89b to your computer and use it in GitHub Desktop.
ESPHome config for YLXD013-C
# YLXD013-C Yeelight Arwen Ceiling Light 550C
esphome:
name: yeelight-ceilc-ylxd013-c
esp32:
board: esp32doit-devkit-v1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
# Advanced tweaking options
advanced:
ignore_efuse_mac_crc: true
wifi:
fast_connect: on
reboot_timeout: 5min
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
hidden: true
ap:
ssid: "yl-ylxd013 Fallback Hotspot"
password: "MY_PASSWORD"
manual_ip:
static_ip: MY_STATIC_IP
gateway: MY_GATEWAY
subnet: MY_SUBNET
ota:
password: !secret esphome_api_ota
on_begin:
then:
- light.turn_on:
id: rgb_light
red: 0%
green: 0%
blue: 100%
brightness: 100%
on_progress:
then:
- light.control:
id: rgb_light
effect: pulse
on_end:
then:
- light.turn_on:
id: rgb_light
red: 0%
green: 100%
blue: 0%
brightness: 100%
transition_length: 0s
- light.turn_off:
id: rgb_light
effect: none
on_error:
then:
- light.control:
id: rgb_light
effect: none
- light.turn_on:
id: rgb_light
red: 100%
green: 0%
blue: 0%
brightness: 100%
transition_length: 0s
# Enable Home Assistant API
api:
password: !secret esphome_api_ota
encryption:
key: "MY_ENCRYPTION_KEY"
# Enable logging
logger:
output:
- platform: ledc
pin: GPIO19
id: output_warm
power_supply: power
# min_power: 0.13
max_power: 0.50
- platform: ledc
pin: GPIO21
id: output_cold
power_supply: power
# min_power: 0.13
max_power: 0.96
- platform: ledc
pin: GPIO23
id: output_nightlight
power_supply: power
- platform: ledc
pin: GPIO33
id: output_red
power_supply: power
- platform: ledc
pin: GPIO26
id: output_green
power_supply: power
- platform: ledc
pin: GPIO27
id: output_blue
power_supply: power
power_supply:
- id: power
pin: GPIO22
enable_time: 0s
keep_on_time: 0s
light:
- platform: monochromatic
name: "yeelight night light"
id: night_light
output: output_nightlight
gamma_correct: 0
default_transition_length: 350ms
on_turn_on:
- light.turn_off: ceiling_light
- platform: cwww
name: "yeelight ceiling light"
id: ceiling_light
cold_white: output_cold
warm_white: output_warm
cold_white_color_temperature: 6500 K
warm_white_color_temperature: 2700 K
constant_brightness: true
gamma_correct: 0
default_transition_length: 350ms
on_turn_on:
- light.turn_off: night_light
- platform: rgb
name: "yeelight ambient light"
id: rgb_light
red: output_red
green: output_green
blue: output_blue
gamma_correct: 0
default_transition_length: 350ms
effects:
- pulse:
name: "Pulse"
transition_length: 0.5s
update_interval: 0.5s
- random:
- random:
name: Random Effect With Custom Values
transition_length: 5s
update_interval: 7s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment