I picked up a few of these bulbs: https://www.athom.tech/blank-1/esphome-gu10-rgbcw
And slightly adapted the firmware to work as a package. (original here: athom-configs/athom-rgbww-light.yaml at ad06504849039c6efa5a675248e54c6864752d25 · athom-tech/athom-configs · GitHub)
However, I’m noticing that despite ‘color_interlock’ being enabled, the bulbs will keep the white LEDs on when setting the color.
I’m pretty sure this wasn’t the case when I first flashed them with the adapted config, but I’m not 100% in that regard. In any case, they’re currently on ESP home 2024.10.0.
Can anyone id what I got wrong here?
substitutions:
name: "gu10-bulb-1"
friendly_name: "Front Bathroom Ceiling Bulb - 1"
# Sets the HA area
room: "front_bathroom"
light_restore_mode: ALWAYS_ON
packages:
api: !include packages/common/api.yaml
wifi: !include packages/common/wifi.yaml
athom_rgbcct_gu10: !include packages/athom_rgbcct_gu10/athom_gu10_rgbcct_base.yaml
packages/athom_rgbcct_gu10/athom_gu10_rgbcct_base.yaml
substitutions:
# Default name
name: "athom--gu10-rgbcct-bulb"
# Default friendly name
friendly_name: "Athom GU10 RGBCCT Bulb"
# Allows ESP device to be automatically linked to an 'Area' in Home Assistant. Typically used for areas such as 'Lounge Room', 'Kitchen' etc
room: ""
# Description as appears in ESPHome & top of webserver page
device_description: "Athom 4.5w RGBCCT GU10 light bulb"
# Restore the light (GPO switch) upon reboot to state:
light_restore_mode: RESTORE_DEFAULT_ON
# Enables faster network connections, with last connected SSID being connected to and no full scan for SSID being undertaken
wifi_fast_connect: "false"
# Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
log_level: "DEBUG"
# Enable or disable the use of IPv6 networking on the device
ipv6_enable: "false"
color_interlock: "true"
default_brightness: "1.0"
default_color_temperature: "263"
globals:
- id: restore_mode
type: int
restore_value: yes
initial_value: "1"
- id: startup_brightness
type: float
restore_value: no
initial_value: ${default_brightness}
- id: startup_color_temperature
type: float
restore_value: no
initial_value: ${default_color_temperature}
select:
- platform: template
name: "Power On State"
id: "power_mode"
optimistic: true
options:
- Always Off
- Always On
- Restore Power Off State
on_value:
then:
- lambda: |-
id(restore_mode)=i+1;
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
comment: "${device_description}"
area: "${room}"
min_version: 2024.6.0
on_boot:
then:
- select.set_index:
id: power_mode
index: !lambda |-
return id(restore_mode)-1;
- lambda: |-
switch(id(restore_mode))
{
case 1:{
auto call = id(rgbct_light).turn_off();
call.perform();
break;
}
case 2:{
auto call = id(rgbct_light).turn_on();
call.set_color_mode(ColorMode::WHITE);
call.set_brightness(id(startup_brightness));
call.set_color_temperature(id(startup_color_temperature));
call.perform();
break;
}
default:{
break;
}
}
esp8266:
board: esp8285
restore_from_flash: true
preferences:
flash_write_interval: 1min
ota:
- platform: esphome
logger:
level: ${log_level}
baud_rate: 115200
sensor:
- platform: uptime
name: "Uptime"
id: uptime_sensor
entity_category: diagnostic
internal: true
- platform: wifi_signal
name: "WiFi Signal dB"
id: wifi_signal_db
update_interval: 60s
entity_category: "diagnostic"
button:
- platform: restart
name: "Restart"
entity_category: config
- platform: safe_mode
name: "Safe Mode"
internal: false
entity_category: config
output:
- platform: esp8266_pwm
id: red_output
pin: GPIO4
min_power: 0.000499
max_power: 1
zero_means_zero: true
- platform: esp8266_pwm
id: green_output
pin: GPIO12
min_power: 0.000499
max_power: 1
zero_means_zero: true
- platform: esp8266_pwm
id: blue_output
pin: GPIO14
min_power: 0.000499
max_power: 1
zero_means_zero: true
- platform: esp8266_pwm
id: white_output
pin: GPIO5
min_power: 0.01
max_power: 0.9
zero_means_zero: true
- platform: esp8266_pwm
id: ct_output
inverted: true
pin: GPIO13
min_power: 0.01
max_power: 0.9
zero_means_zero: true
light:
- platform: rgbct
id: rgbct_light
name: "Bulb"
restore_mode: ${light_restore_mode}
red: red_output
green: green_output
blue: blue_output
white_brightness: white_output
color_temperature: ct_output
cold_white_color_temperature: 153 mireds
warm_white_color_temperature: 500 mireds
color_interlock: ${color_interlock}