### The problem
When compiling my project on ESPHome 2025.7.x it has started to… generate this warning when compiling `The legacy RMT driver is deprecated`. Even though it is only a warning, my project still stops working.
### Which version of ESPHome has the issue?
2025.7.x
### What type of installation are you using?
Home Assistant Add-on
### What platform are you using?
ESP32
### Component causing the issue
NeoPixelBus Light
### YAML Config
```yaml
substitutions:
device: "bedroom-clock"
name: "Bedroom Clock"
version: "1.0.0"
data_pin: "GPIO14" # Data PIN for Display
rotation_angle: "180°" # Set the rotation of the display. One of 0°, 90°, 180°, 270°
font_large: "fonts/MatrixChunky8X.ttf" # 8 Pixel Font
font_small: "fonts/MatrixChunky6X.ttf" # 6 Pixel Font
weekDaysShort: "Søn,Man,Tir,Ons,Tor,Fre,Lør" # Danish translation for Weekdays
temp_entity: "sensor.vindinge_sensor_temperature" # Home Assistant Entity ID for Temperature Sensor
condition_entity: "sensor.vindinge_sensor_condition" # Home Assistant Entity ID for Weather Condition Sensor
alarm_entity: "alarm_control_panel.alarm_toftebuen" # Home Assistant Entity ID for Alarm Status
lock_entity: "lock.bryggersdor" # Home Assistant Entity ID for Lock Status
door_entity: "sensor.dore_abne" # Home Assistant Entity ID for number of open doors
bed_entity: "binary_sensor.beboere_i_seng" # Home Assistant Entity ID for Bed Status
#############################################
### CORE SETTINGS ###
#############################################
esphome:
name: "${device}"
friendly_name: "${name}"
min_version: 2025.6.0
name_add_mac_suffix: False
project:
name: "briis.${device}"
version: "${version}"
platformio_options:
build_flags:
- "-DBOARD_HAS_PSRAM"
- "-DARDUINO_USB_CDC_ON_BOOT=1"
board_build.arduino.memory_type: qio_opi
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
flash_size: 16MB
framework:
type: arduino
psram:
mode: octal
speed: 80MHz
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "d3Js1auGoHGHbdjBSr+7cm8DQNkjekkwea0GmNzV3pA="
ota:
- platform: esphome
password: "a8eb4a01326f1778f039a6af4338a5bf"
wifi:
ssid: !secret wifi_iot_ssid
password: !secret wifi_iot_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Bedroom-Clock"
password: "12345678"
captive_portal:
#############################################
### HARDWARE ###
#############################################
display:
- platform: addressable_light
id: main_display
addressable_light_id: main_display_light
width: 32
height: 8
pixel_mapper: |-
if (x % 2 == 0) {
return (x * 8) + y;
}
return (x * 8) + (7 - y);
rotation: ${rotation_angle}
update_interval: 500ms
lambda: |-
id(display_text).execute();
light:
- platform: neopixelbus
id: main_display_light
name: "${name} Light"
type: GRB
internal: true
variant: ws2812
pin: ${data_pin}
num_leds: 256
color_correct: [30%, 30%, 30%]
gamma_correct: 2.0
restore_mode: ALWAYS_OFF
#############################################
### GENERAL SETTINGS ###
#############################################
time:
- platform: homeassistant
id: device_time
#############################################
### BINARY SENSOR ###
#############################################
binary_sensor:
- platform: homeassistant
entity_id: ${bed_entity}
id: bed_sensor
disabled_by_default: True
trigger_on_initial_state: True
#############################################
### FONTS ###
#############################################
font:
- file: ${font_large}
id: main_font
size: 8
glyphs: '!"%()+=,-_.:&°/[]|<>?0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ abcdefghijklmnopqrstuvwxyzæøå'
- file: ${font_small}
id: small_font
size: 6
glyphs: '!"%()+=,-_.:&°/[]|<>?0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ abcdefghijklmnopqrstuvwxyzæøå'
#############################################
### GLOBALS ###
#############################################
globals:
- id: display_brightness
type: float
restore_value: true
initial_value: '0.4' # 40% brightness
- id: night_brightness
type: float
restore_value: true
initial_value: '0.2' # 20% brightness
- id: current_page
type: int
restore_value: False
initial_value: '0'
- id: scroll_pos
type: int
restore_value: False
initial_value: '0'
- id: page_timer
type: int
restore_value: False
initial_value: '0'
- id: page_duration
type: int
restore_value: False
initial_value: '20'
#############################################
### IMAGES ###
#############################################
image:
- file: "images/8x8/lock_locked.png"
id: img_locked
type: RGB565
resize: 8x8
- file: "images/8x8/lock_unlocked.png"
id: img_unlocked
type: RGB565
resize: 8x8
- file: "images/8x8/alarm_off.png"
id: img_alarm_off
type: RGB565
resize: 8x8
- file: "images/8x8/alarm_on.png"
id: img_alarm_on
type: RGB565
resize: 8x8
- file: "images/8x8/door_closed.png"
id: img_door_closed
type: RGB565
resize: 8x8
- file: "images/8x8/door_open.png"
id: img_door_open
type: RGB565
resize: 8x8
- file: "images/8x8/weather_clear_night.png"
id: img_weather_clear_night
type: RGB565
resize: 8x8
- file: "images/8x8/weather_cloudy.png"
id: img_weather_cloudy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_fog.png"
id: img_weather_fog
type: RGB565
resize: 8x8
- file: "images/8x8/weather_hail.png"
id: img_weather_hail
type: RGB565
resize: 8x8
- file: "images/8x8/weather_lightning_rainy.png"
id: img_weather_lightning_rainy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_lightning.png"
id: img_weather_lightning
type: RGB565
resize: 8x8
- file: "images/8x8/weather_partlycloudy_night.png"
id: img_weather_partlycloudy_night
type: RGB565
resize: 8x8
- file: "images/8x8/weather_partlycloudy.png"
id: img_weather_partlycloudy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_pouring.png"
id: img_weather_pouring
type: RGB565
resize: 8x8
- file: "images/8x8/weather_rainy.png"
id: img_weather_rainy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_snowy.png"
id: img_weather_snowy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_snowy_rainy.png"
id: img_weather_snowy_rainy
type: RGB565
resize: 8x8
- file: "images/8x8/weather_sunny.png"
id: img_weather_sunny
type: RGB565
resize: 8x8
- file: "images/8x8/weather_windy.png"
id: img_weather_windy
type: RGB565
resize: 8x8
# DIMMED IMAGES
- file: "images/8x8/dimmed/lock_locked_dimmed.png"
id: img_locked_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/lock_unlocked_dimmed.png"
id: img_unlocked_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/alarm_off_dimmed.png"
id: img_alarm_off_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/alarm_on_dimmed.png"
id: img_alarm_on_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/door_closed_dimmed.png"
id: img_door_closed_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/door_open_dimmed.png"
id: img_door_open_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_clear_night_dimmed.png"
id: img_weather_clear_night_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_cloudy_dimmed.png"
id: img_weather_cloudy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_fog_dimmed.png"
id: img_weather_fog_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_hail_dimmed.png"
id: img_weather_hail_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_lightning_rainy_dimmed.png"
id: img_weather_lightning_rainy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_lightning_dimmed.png"
id: img_weather_lightning_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_partlycloudy_night_dimmed.png"
id: img_weather_partlycloudy_night_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_partlycloudy_dimmed.png"
id: img_weather_partlycloudy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_pouring_dimmed.png"
id: img_weather_pouring_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_rainy_dimmed.png"
id: img_weather_rainy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_snowy_dimmed.png"
id: img_weather_snowy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_snowy_rainy_dimmed.png"
id: img_weather_snowy_rainy_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_sunny_dimmed.png"
id: img_weather_sunny_dimmed
type: RGB565
resize: 8x8
- file: "images/8x8/dimmed/weather_windy_dimmed.png"
id: img_weather_windy_dimmed
type: RGB565
resize: 8x8
# DARK IMAGES
- file: "images/8x8/dark/lock_locked_dark.png"
id: img_locked_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/lock_unlocked_dark.png"
id: img_unlocked_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/alarm_off_dark.png"
id: img_alarm_off_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/alarm_on_dark.png"
id: img_alarm_on_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/door_closed_dark.png"
id: img_door_closed_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/door_open_dark.png"
id: img_door_open_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_clear_night_dark.png"
id: img_weather_clear_night_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_cloudy_dark.png"
id: img_weather_cloudy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_fog_dark.png"
id: img_weather_fog_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_hail_dark.png"
id: img_weather_hail_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_lightning_rainy_dark.png"
id: img_weather_lightning_rainy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_lightning_dark.png"
id: img_weather_lightning_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_partlycloudy_night_dark.png"
id: img_weather_partlycloudy_night_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_partlycloudy_dark.png"
id: img_weather_partlycloudy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_pouring_dark.png"
id: img_weather_pouring_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_rainy_dark.png"
id: img_weather_rainy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_snowy_dark.png"
id: img_weather_snowy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_snowy_rainy_dark.png"
id: img_weather_snowy_rainy_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_sunny_dark.png"
id: img_weather_sunny_dark
type: RGB565
resize: 8x8
- file: "images/8x8/dark/weather_windy_dark.png"
id: img_weather_windy_dark
type: RGB565
resize: 8x8
#############################################
### INTERVAL ACTIONS ###
#############################################
interval:
- interval: 1s
then:
- lambda: |-
id(page_timer)++;
if (id(page_timer) >= id(page_duration)) {
id(page_timer) = 0;
id(scroll_pos) = 0;
// Find next valid page
do {
id(current_page)++;
if (id(current_page) > 5) id(current_page) = 0;
// Skip page 1 if show_date is off
if (id(current_page) == 1 && !id(show_date).state) {
continue;
}
// Skip page 2 if show_weather is off
if (id(current_page) == 2 && !id(show_weather).state) {
continue;
}
// Skip page 3 if show_alarm is off
if (id(current_page) == 3 && !id(show_alarm).state) {
continue;
}
// Skip page 4 if show_locks is off
if (id(current_page) == 4 && !id(show_locks).state) {
continue;
}
// Skip page 5 if show_doors is off
if (id(current_page) == 5 && !id(show_doors).state) {
continue;
}
// Valid page found, break out of loop
break;
} while (true);
// Set page duration based on current page
if (id(current_page) == 0) {
id(page_duration) = id(clock_duration).state; // Clock page timing
} else if (id(current_page) == 1) {
id(page_duration) = id(other_duration).state; // Date timing
} else if (id(current_page) == 2) {
id(page_duration) = id(other_duration).state; // Weather
} else if (id(current_page) == 3) {
id(page_duration) = id(other_duration).state; // Alarm page timing
} else if (id(current_page) == 4) {
id(page_duration) = id(other_duration).state; // Lock page timing
} else if (id(current_page) == 5) {
id(page_duration) = id(other_duration).state; // Door page timing
}
}
- interval: 500ms
then:
- lambda: |-
if (id(current_page) == 1) {
id(scroll_pos)++;
}
#############################################
### NUMBER ###
#############################################
number:
- platform: template
name: "Brightness (%)"
id: brightness_control
icon: mdi:brightness-6
unit_of_measurement: "%"
optimistic: true
min_value: 20.0
max_value: 100.0
step: 5
initial_value: 45
restore_value: true
on_value:
then:
- globals.set:
id: display_brightness
value: !lambda 'return x/100;'
- platform: template
name: "Night Brightness (%)"
id: night_brightness_control
icon: mdi:brightness-4
unit_of_measurement: "%"
optimistic: true
min_value: 20.0
max_value: 100.0
step: 5
initial_value: 25
restore_value: true
on_value:
then:
- globals.set:
id: night_brightness
value: !lambda 'return x/100;'
- platform: template
id: clock_duration
name: "Clock Duration (Sec)"
icon: mdi:clock-fast
min_value: 5
max_value: 60
step: 1
initial_value: 20
restore_value: True
optimistic: True
- platform: template
id: other_duration
name: "Other Page Duration (Sec)"
icon: mdi:information-variant-box-outline
min_value: 5
max_value: 60
step: 1
initial_value: 15
restore_value: True
optimistic: True
#############################################
### SCRIPTS ###
#############################################
script:
### DISPLAY TEXT ON SCREEN ###
- id: display_text
then:
- lambda: |-
// Set Screen Dimensions
int s_width = 16;
int s_height = 4;
int display_width = s_width * 2;
int display_height = s_height * 2;
// Get current brightness
float brightness = id(display_brightness);
float n_brightness = id(night_brightness);
// Create colors with brightness applied
Color red = Color(245 * brightness, 67 * brightness, 54 * brightness);
Color green = Color(76 * brightness, 175 * brightness, 80 * brightness);
Color blue = Color(32 * brightness, 151 * brightness, 243 * brightness);
Color amber = Color(255 * brightness, 193 * brightness, 8 * brightness);
Color orange = Color(255 * brightness, 152 * brightness, 0);
Color white = Color(240 * brightness, 240 * brightness, 240 * brightness);
Color night_red = Color(245 * n_brightness, 67 * n_brightness, 54 * n_brightness);
Color night_green = Color(76 * n_brightness, 175 * n_brightness, 80 * n_brightness);
// Get Time
auto time = id(device_time).now();
// PRINT BEDSTATUS IF ENABLED
if (id(show_bed_status).state) {
Color status_color = (!id(bed_sensor).state) ? night_green : night_red;
if (!id(night_mode).state) {
status_color = (!id(bed_sensor).state) ? green : red;
}
id(main_display).filled_rectangle(31, 0, 1, 2, status_color);
id(main_display).filled_rectangle(30, 0, 1, 1, status_color);
}
// PRINT NIGHTMODE SCREEN AND EXIT LOOP
if (time.is_valid() && id(night_mode).state) {
char buf[16];
if (time.second % 2 == 0) {
snprintf(buf, sizeof(buf), "%02d:%02d", time.hour, time.minute);
} else {
snprintf(buf, sizeof(buf), "%02d %02d", time.hour, time.minute);
}
id(main_display).print(s_width, s_height, main_font, night_red, TextAlign::CENTER, buf);
return;
}
// PRINT CLOCK SCREEN
if (id(current_page) == 0) {
auto time = id(device_time).now();
if (!time.is_valid()) {
id(main_display).print(s_width, s_height, main_font, amber, TextAlign::CENTER, "Waiting");
return;
} else {
// PRINT CLOCK SCREEN WITH DAY
if (id(show_weekday).state) {
char buf[16];
// Parse weekdays from substitution variable
std::string weekdays_str = "${weekDaysShort}";
std::vector<std::string> weekdays_vec;
size_t start = 0;
size_t end = 0;
while ((end = weekdays_str.find(',', start)) != std::string::npos) {
weekdays_vec.push_back(weekdays_str.substr(start, end - start));
start = end + 1;
}
weekdays_vec.push_back(weekdays_str.substr(start)); // Last element
// Ensure we have enough weekdays and valid day_of_week
if (weekdays_vec.size() >= 7 && time.day_of_week >= 1 && time.day_of_week <= 7) {
snprintf(buf, sizeof(buf), "%s", weekdays_vec[time.day_of_week - 1].c_str());
} else {
snprintf(buf, sizeof(buf), "??");
}
id(main_display).print(0, 0, main_font, white, buf);
if (time.second % 2 == 0) {
snprintf(buf, sizeof(buf), "%02d:%02d", time.hour, time.minute);
} else {
snprintf(buf, sizeof(buf), "%02d %02d", time.hour, time.minute);
}
id(main_display).print(32, 0, main_font, white, TextAlign::RIGHT, buf);
// PRINT CLOCK SCREEN WITHOUT DAY
} else {
char buf[16];
if (time.second % 2 == 0) {
snprintf(buf, sizeof(buf), "%02d:%02d", time.hour, time.minute);
} else {
snprintf(buf, sizeof(buf), "%02d %02d", time.hour, time.minute);
}
id(main_display).print(s_width, s_height, main_font, white, TextAlign::CENTER, buf);
}
}
// END OF CLOCK SCREEN
} else if (id(current_page) == 1) {
// PRINT DATE SCREEN
char buf[16];
snprintf(buf, sizeof(buf), "%02d-%02d", time.day_of_month, time.month);
id(main_display).print(s_width, 0, small_font, white, TextAlign::TOP_CENTER, buf);
// PRINT DAY MARKER
int current_day = time.day_of_week;
if (current_day == 1) current_day = 7; // Convert Sunday (1) to 7
else current_day = current_day - 1; // Convert Mon-Sat (2-7) to 1-6
// Draw 7 rectangles for days of the week
for (int day = 1; day <= 7; day++) {
int x = (day - 1) * 4 + 2; // Position: 2, 6, 10, 14, 18, 22, 26
int y = 7; // Bottom area of 8-pixel high display
Color day_color = (day == current_day) ? orange : blue;
id(main_display).filled_rectangle(x, y, 3, 1, day_color);
}
// END OF DATE SCREEN
} else if (id(current_page) == 2) {
// PRINT WEATHER SCREEN
std::string weather_state = id(weather_condition).state;
// Vælg og vis korrekt vejrikon baseret på tilstand og lysstyrke
if (weather_state == "clear-night") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_clear_night));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_clear_night_dimmed));
else
id(main_display).image(0, 0, id(img_weather_clear_night_dark));
} else if (weather_state == "cloudy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_cloudy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_cloudy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_cloudy_dark));
} else if (weather_state == "fog") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_fog));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_fog_dimmed));
else
id(main_display).image(0, 0, id(img_weather_fog_dark));
} else if (weather_state == "hail") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_hail));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_hail_dimmed));
else
id(main_display).image(0, 0, id(img_weather_hail_dark));
} else if (weather_state == "lightning-rainy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_lightning_rainy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_lightning_rainy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_lightning_rainy_dark));
} else if (weather_state == "lightning") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_lightning));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_lightning_dimmed));
else
id(main_display).image(0, 0, id(img_weather_lightning_dark));
} else if (weather_state == "partlycloudy-night") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_partlycloudy_night));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_partlycloudy_night_dimmed));
else
id(main_display).image(0, 0, id(img_weather_partlycloudy_night_dark));
} else if (weather_state == "partlycloudy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_partlycloudy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_partlycloudy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_partlycloudy_dark));
} else if (weather_state == "pouring") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_pouring));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_pouring_dimmed));
else
id(main_display).image(0, 0, id(img_weather_pouring_dark));
} else if (weather_state == "rainy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_rainy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_rainy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_rainy_dark));
} else if (weather_state == "snowy-rainy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_snowy_rainy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_snowy_rainy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_snowy_rainy_dark));
} else if (weather_state == "snowy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_snowy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_snowy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_snowy_dark));
} else if (weather_state == "sunny") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_sunny));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_sunny_dimmed));
else
id(main_display).image(0, 0, id(img_weather_sunny_dark));
} else if (weather_state == "windy") {
if (brightness > 0.7f)
id(main_display).image(0, 0, id(img_weather_windy));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_weather_windy_dimmed));
else
id(main_display).image(0, 0, id(img_weather_windy_dark));
} else {
// Fallback hvis ukendt tilstand
id(main_display).print(0, 0, main_font, amber, TextAlign::CENTER, weather_state.c_str());
}
char buf[16];
snprintf(buf, sizeof(buf), "%.1f°", id(temp_sensor).state);
id(main_display).print(30, s_height, main_font, white ,TextAlign::CENTER_RIGHT, buf);
// END OF WEATHER SCREEN
} else if (id(current_page) == 3) {
// PRINT ALARM SCREEN
if (id(alarm_status).state == "disarmed") {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_alarm_off));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_alarm_off_dimmed));
else
id(main_display).image(0, 0, id(img_alarm_off_dark));
} else {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_alarm_on));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_alarm_on_dimmed));
else
id(main_display).image(0, 0, id(img_alarm_on_dark));
}
id(main_display).print(31, s_height, main_font, white, TextAlign::CENTER_RIGHT, "Alarm");
// END OF ALARM SCREEN
} else if (id(current_page) == 4) {
// PRINT LOCK SCREEN
if (id(lock_status).state == "unlocked") {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_unlocked));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_unlocked_dimmed));
else
id(main_display).image(0, 0, id(img_unlocked_dark));
id(main_display).print(28, s_height, main_font, white, TextAlign::CENTER_RIGHT, "Ulåst");
} else {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_locked));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_locked_dimmed));
else
id(main_display).image(0, 0, id(img_locked_dark));
id(main_display).print(28, s_height, main_font, white, TextAlign::CENTER_RIGHT, "Låst");
}
// END OF LOCK SCREEN
} else if (id(current_page) == 5) {
// PRINT DOORS SCREEN
if (id(door_sensor).state > 0) {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_door_open));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_door_open_dimmed));
else
id(main_display).image(0, 0, id(img_door_open_dark));
} else {
if (brightness > 0.7f)
id(main_display).image(0,0, id(img_door_closed));
else if (brightness > 0.35f)
id(main_display).image(0, 0, id(img_door_closed_dimmed));
else
id(main_display).image(0, 0, id(img_door_closed_dark));
}
id(main_display).print(30, s_height, main_font, white, TextAlign::CENTER_RIGHT, "Døre");
// END OF DOORS SCREEN
}
#############################################
### SELECT ###
#############################################
select:
- platform: template
id: operation_mode
name: "Operation Mode"
icon: mdi:form-dropdown
optimistic: true
options:
- "Day"
- "Night"
- "Bedtime"
initial_option: 'Day'
restore_value: True
on_value:
then:
- logger.log:
format: "Operation mode changed to: %s"
args: ['x.c_str()']
- if:
condition:
- lambda: 'return id(operation_mode).state == "Day";'
then:
- lambda: |-
id(night_mode).turn_off();
id(show_date).turn_on();
id(show_weather).turn_on();
id(show_locks).turn_off();
id(show_alarm).turn_off();
id(show_doors).turn_off();
id(show_bed_status).turn_off();
- if:
condition:
- lambda: 'return id(operation_mode).state == "Night";'
then:
- lambda: |-
id(night_mode).turn_on();
id(show_bed_status).turn_on();
- if:
condition:
- lambda: 'return id(operation_mode).state == "Bedtime";'
then:
- lambda: |-
id(night_mode).turn_off();
id(show_weather).turn_on();
id(show_date).turn_off();
id(show_locks).turn_on();
id(show_alarm).turn_on();
id(show_doors).turn_on();
id(show_bed_status).turn_on();
#############################################
### SENSORS ###
#############################################
sensor:
- platform: homeassistant
entity_id: ${temp_entity}
id: temp_sensor
internal: False
device_class: temperature
state_class: measurement
accuracy_decimals: 1
on_value:
- logger.log:
format: "Temp: %.1f"
args: ['id(temp_sensor).state']
- platform: homeassistant
entity_id: ${door_entity}
id: door_sensor
internal: False
accuracy_decimals: 0
#############################################
### SWITCHES ###
#############################################
switch:
- platform: template
id: show_weekday
name: "Show Weekday"
icon: mdi:calendar-week
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
- platform: template
id: show_date
name: "Show Date"
icon: mdi:calendar-month
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
- platform: template
id: night_mode
name: "Night Mode"
icon: mdi:lightbulb-night
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
- platform: template
id: show_weather
name: "Show Weather"
icon: mdi:weather-partly-cloudy
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
- platform: template
id: show_locks
name: "Show Lock Status"
icon: mdi:lock-check
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
- platform: template
id: show_alarm
name: "Show Alarm Status"
icon: mdi:lock-check
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
- platform: template
id: show_doors
name: "Show Door Status"
icon: mdi:door-closed-lock
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
- platform: template
id: show_bed_status
name: "Show Bed Status"
icon: mdi:bed
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
#############################################
### TEXT SENSOR ###
#############################################
text_sensor:
- platform: homeassistant
entity_id: ${condition_entity}
id: weather_condition
disabled_by_default: true
- platform: homeassistant
entity_id: ${alarm_entity}
id: alarm_status
disabled_by_default: true
- platform: homeassistant
entity_id: ${lock_entity}
id: lock_status
disabled_by_default: true
`
```
### Anything in the logs that might be useful for us?
```txt
Here is an extract og the complete log, just picking out the warning messages:
INFO ESPHome 2025.7.2
INFO Reading configuration /config/esphome/bedroom-clock.yaml...
INFO Detected timezone 'Europe/Copenhagen'
INFO Generating C++ source...
INFO Compiling app...
Processing bedroom-clock (board: esp32-s3-devkitc-1; framework: arduino; platform: https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip)
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
- framework-arduinoespressif32 @ 3.1.3
- framework-arduinoespressif32-libs @ 5.3.0+sha.489d7a2b3a
- tool-esptoolpy @ 4.8.6
- tool-mklittlefs @ 3.2.0
- tool-riscv32-esp-elf-gdb @ 14.2.0+20240403
- tool-xtensa-esp-elf-gdb @ 14.2.0+20240403
- toolchain-riscv32-esp @ 13.2.0+20240530
- toolchain-xtensa-esp-elf @ 13.2.0+20240530
Dependency Graph
|-- Networking @ 3.1.3
|-- AsyncTCP @ 3.4.5
|-- WiFi @ 3.1.3
|-- FS @ 3.1.3
|-- Update @ 3.1.3
|-- ESPAsyncWebServer @ 3.7.10
|-- ESP32 Async UDP @ 3.1.3
|-- DNSServer @ 3.1.3
|-- ESPmDNS @ 3.1.3
|-- noise-c @ 0.1.10
|-- NeoPixelBus @ 2.8.0
Creating esp32s3 image...
Successfully created esp32s3 image.
Generating partitions .pioenvs/bedroom-clock/partitions.bin
In file included from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/methods/NeoEsp32RmtMethod.h:49,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/NeoMethods.h:59,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/NeoPixelBus.h:43,
from src/esphome/components/neopixelbus/neopixelbus_light.h:12,
from src/esphome.h:59,
from src/main.cpp:3:
/data/cache/platformio/packages/framework-arduinoespressif32-libs/esp32s3/include/driver/deprecated/driver/rmt.h:18:2: warning: #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-Wcpp]
18 | #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h"
| ^~~~~~~
Compiling .pioenvs/bedroom-clock/lib6de/NeoPixelBus/internal/animations/NeoPixelAnimator.cpp.o
In file included from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/methods/NeoEsp32RmtMethod.h:49,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/NeoMethods.h:59,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/NeoPixelBus.h:43,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/animations/NeoPixelAnimator.cpp:28:
/data/cache/platformio/packages/framework-arduinoespressif32-libs/esp32s3/include/driver/deprecated/driver/rmt.h:18:2: warning: #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-Wcpp]
18 | #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h"
| ^~~~~~~
In file included from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/methods/NeoEsp32RmtMethod.h:49,
from .piolibdeps/bedroom-clock/NeoPixelBus/src/internal/methods/NeoEsp32RmtMethod.cpp:36:
/data/cache/platformio/packages/framework-arduinoespressif32-libs/esp32s3/include/driver/deprecated/driver/rmt.h:18:2: warning: #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h" [-Wcpp]
18 | #warning "The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h"
| ^~~~~~~
`
```
### Additional information
_No response_