Edit esp-bedside-panel.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-15 20:28:10 +12:00
parent ea7eedff93
commit 0ca6fefd08
+194 -330
View File
@@ -6,9 +6,9 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml
#:########################################################################################:# #:########################################################################################:#
# VERSIONS: # VERSIONS:
# V0.9a 2026-07-15 Reduced clock font to 190px and delayed LVGL sensor updates until startup # V0.8b 2026-07-15 Changed proven V0.8a clock to 24-hour format and removed AM/PM
# V0.9 2026-07-15 Added four status readings and enlarged 24-hour clock
# V0.8a 2026-07-14 Reduced LVGL memory load after V0.8 OTA rollback # V0.8a 2026-07-14 Reduced LVGL memory load after V0.8 OTA rollback
# Added lean large-clock idle page and Bedroom controls
# V0.8 2026-07-14 Added large bedside clock, idle dimming and first bedroom control page # V0.8 2026-07-14 Added large bedside clock, idle dimming and first bedroom control page
# V0.7 2026-07-14 Added first landscape LVGL page and Home Assistant test button # V0.7 2026-07-14 Added first landscape LVGL page and Home Assistant test button
# V0.6 2026-07-14 Added GT911 touchscreen and touch-coordinate logging # V0.6 2026-07-14 Added GT911 touchscreen and touch-coordinate logging
@@ -41,17 +41,23 @@
# - Touch I2C address: 0x5D # - Touch I2C address: 0x5D
#:########################################################################################:# #:########################################################################################:#
# OPERATION NOTES: # OPERATION NOTES:
# - Native 1024x600 landscape orientation. # - This build returns to the proven V0.8a structure.
# - Bedroom page contains nine nearby controls. # - The only functional clock changes are:
# - Bedroom and Clock pages show Moon, Outdoor, Indoor and Humidity readings. # - 24-hour HH:MM display
# - Clock uses a 24-hour HH:MM format. # - AM/PM label and update removed
# - Clock font reduced to 190px after V0.9 startup rollback. # - The clock font remains at the proven 170px size.
# - Imported Home Assistant readings are refreshed only after LVGL startup is complete. # - The display remains in its native 1024x600 landscape orientation.
# - After the idle timeout, the Clock page is shown and the backlight is dimmed. # - The default page contains nine Bedroom / nearby controls.
# - Touching the Clock page returns to Bedroom controls and restores normal brightness. # - After the configured idle period:
# - The large clock page is displayed.
# - Backlight brightness is reduced.
# - Touching the clock:
# - Returns to the Bedroom controls.
# - Restores normal brightness.
# - Climate and Downstairs pages remain intentionally omitted.
#:########################################################################################:# #:########################################################################################:#
# OFFLINE NOTES: # OFFLINE NOTES:
# - LVGL, clock, touch and backlight operate locally. # - LVGL, the clock, touch and backlight operate locally.
# - Home Assistant control buttons require an API connection. # - Home Assistant control buttons require an API connection.
# - The clock continues using the most recently synchronised time. # - The clock continues using the most recently synchronised time.
#:########################################################################################:# #:########################################################################################:#
@@ -65,12 +71,12 @@ substitutions:
# Device Naming # Device Naming
device_name: "esp-bedside-panel" device_name: "esp-bedside-panel"
friendly_name: "ESP Bedside Panel" friendly_name: "ESP Bedside Panel"
description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside clock and Home Assistant control panel. Delayed LVGL sensor updates. (Layout V1.1)" description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside clock and Home Assistant control panel. Proven V0.8a layout with 24-hour clock. (Layout V1.1)"
device_area: "Bedroom" device_area: "Bedroom"
# Project Naming # Project Naming
project_name: "Guition.JC1060P470C_I_W_Y" project_name: "Guition.JC1060P470C_I_W_Y"
project_version: "v0.9a" project_version: "v0.8b"
# Passwords & Secrets # Passwords & Secrets
api_key: !secret esp-api_key api_key: !secret esp-api_key
@@ -95,11 +101,9 @@ substitutions:
control_brightness: "80%" control_brightness: "80%"
clock_brightness: "4%" clock_brightness: "4%"
# Home Assistant Entities - Status / Environment # Home Assistant Entities - Environment
moon_phase_entity: "sensor.astroweather_moon_phase" bedroom_temperature_entity: "sensor.master_bedroom_environment_zth01_temperature_2"
outdoor_temperature_entity: "sensor.lounge_outside_temperature" bedroom_humidity_entity: "sensor.master_bedroom_environment_zth01_humidity_2"
indoor_temperature_entity: "sensor.master_bedroom_master_bedroom_environment_z01th_temperature"
indoor_humidity_entity: "sensor.master_bedroom_master_bedroom_environment_z01th_humidity"
# Home Assistant Entities - Bedroom / Nearby Controls # Home Assistant Entities - Bedroom / Nearby Controls
north_lights_entity: "light.tasmo_ifan02_3793_bedrm1_1" north_lights_entity: "light.tasmo_ifan02_3793_bedrm1_1"
@@ -135,9 +139,28 @@ packages:
#### HOME ASSISTANT API #### #### HOME ASSISTANT API ####
common_api: !include common_api: !include
file: common/api_common.yaml file: common/api_common.yaml
#file: common/api_common_noencryption.yaml
vars: vars:
local_api_key: "${api_key}" local_api_key: "${api_key}"
#### MQTT ####
#common_mqtt: !include
# file: common/mqtt_common.yaml
# vars:
# local_device_name: "${device_name}"
#### WEB PORTAL ####
#common_webportal: !include common/webportal_common_nopass.yaml
#### SNTP ####
#common_sntp: !include common/sntp_common.yaml
#### DIAGNOSTICS Sensors ####
#diag_basic: !include common/include_basic_diag_sensors.yaml
#diag_more: !include common/include_more_diag_sensors.yaml
#diag_debug: !include common/include_debug_diag_sensors.yaml
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
#:########################################################################################:# #:########################################################################################:#
# ESPHOME: # ESPHOME:
# https://esphome.io/components/esphome.html # https://esphome.io/components/esphome.html
@@ -151,16 +174,6 @@ esphome:
name: "${project_name}" name: "${project_name}"
version: "${project_version}" version: "${project_version}"
on_boot:
priority: -100
then:
- delay: 12s
- lambda: |-
id(lvgl_ready) = true;
- logger.log:
level: INFO
format: "LVGL startup delay complete; sensor label updates enabled"
#:########################################################################################:# #:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK: # ESP PLATFORM AND FRAMEWORK:
# https://esphome.io/components/esp32.html # https://esphome.io/components/esp32.html
@@ -214,15 +227,6 @@ esp_ldo:
voltage: 2.5V voltage: 2.5V
adjustable: true adjustable: true
#:########################################################################################:#
# GLOBALS:
#:########################################################################################:#
globals:
- id: lvgl_ready
type: bool
restore_value: false
initial_value: "false"
#:########################################################################################:# #:########################################################################################:#
# LOGGER: # LOGGER:
# https://esphome.io/components/logger.html # https://esphome.io/components/logger.html
@@ -241,10 +245,7 @@ api:
- logger.log: - logger.log:
level: INFO level: INFO
format: "API connected: ESP Bedside Panel is online" format: "API connected: ESP Bedside Panel is online"
- if:
condition:
lambda: return id(lvgl_ready);
then:
- lvgl.label.update: - lvgl.label.update:
id: bedroom_connection_label id: bedroom_connection_label
text: "HA connected" text: "HA connected"
@@ -255,10 +256,7 @@ api:
- logger.log: - logger.log:
level: WARN level: WARN
format: "API disconnected: ESP Bedside Panel is offline from Home Assistant" format: "API disconnected: ESP Bedside Panel is offline from Home Assistant"
- if:
condition:
lambda: return id(lvgl_ready);
then:
- lvgl.label.update: - lvgl.label.update:
id: bedroom_connection_label id: bedroom_connection_label
text: "HA offline" text: "HA offline"
@@ -340,10 +338,12 @@ touchscreen:
display: main_display display: main_display
i2c_id: touch_i2c i2c_id: touch_i2c
address: 0x5D address: 0x5D
interrupt_pin: interrupt_pin:
number: "${touch_interrupt_pin}" number: "${touch_interrupt_pin}"
mode: mode:
input: true input: true
reset_pin: reset_pin:
number: "${touch_reset_pin}" number: "${touch_reset_pin}"
mode: mode:
@@ -357,7 +357,7 @@ touchscreen:
font: font:
- file: "gfonts://Roboto" - file: "gfonts://Roboto"
id: font_clock id: font_clock
size: 190 size: 170
glyphs: glyphs:
- "0123456789:" - "0123456789:"
@@ -401,24 +401,40 @@ sensor:
update_interval: "${update_interval}" update_interval: "${update_interval}"
- platform: homeassistant - platform: homeassistant
id: moon_phase id: bedroom_temperature
entity_id: "${moon_phase_entity}" entity_id: "${bedroom_temperature_entity}"
internal: true internal: true
on_value:
then:
- lvgl.label.update:
id: clock_temperature_label
text:
format: "%.1f°C"
args: [x]
- lvgl.label.update:
id: bedroom_temperature_label
text:
format: "%.1f°C"
args: [x]
- platform: homeassistant - platform: homeassistant
id: outdoor_temperature id: bedroom_humidity
entity_id: "${outdoor_temperature_entity}" entity_id: "${bedroom_humidity_entity}"
internal: true internal: true
on_value:
then:
- lvgl.label.update:
id: clock_humidity_label
text:
format: "%.0f%%"
args: [x]
- platform: homeassistant - lvgl.label.update:
id: indoor_temperature id: bedroom_humidity_label
entity_id: "${indoor_temperature_entity}" text:
internal: true format: "%.0f%%"
args: [x]
- platform: homeassistant
id: indoor_humidity
entity_id: "${indoor_humidity_entity}"
internal: true
#:########################################################################################:# #:########################################################################################:#
# HOME ASSISTANT BINARY SENSORS: # HOME ASSISTANT BINARY SENSORS:
@@ -430,115 +446,97 @@ binary_sensor:
entity_id: "${north_lights_entity}" entity_id: "${north_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: north_lights_button id: north_lights_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_south_lights id: ha_south_lights
entity_id: "${south_lights_entity}" entity_id: "${south_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: south_lights_button id: south_lights_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_bedside_lamp id: ha_bedside_lamp
entity_id: "${bedside_lamp_entity}" entity_id: "${bedside_lamp_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: bedside_lamp_button id: bedside_lamp_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_hall_floor id: ha_hall_floor
entity_id: "${hall_floor_entity}" entity_id: "${hall_floor_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: hall_floor_button id: hall_floor_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0x92702D) : lv_color_hex(0x28313D); return x
? lv_color_hex(0x92702D)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_hall_lights id: ha_hall_lights
entity_id: "${hall_lights_entity}" entity_id: "${hall_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: hall_lights_button id: hall_lights_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_bathroom_lights id: ha_bathroom_lights
entity_id: "${bathroom_lights_entity}" entity_id: "${bathroom_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: bathroom_lights_button id: bathroom_lights_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_patio_lights id: ha_patio_lights
entity_id: "${patio_lights_entity}" entity_id: "${patio_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: patio_lights_button id: patio_lights_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0xA87500) : lv_color_hex(0x28313D); return x
? lv_color_hex(0xA87500)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_garage_lights id: ha_garage_lights
entity_id: "${garage_lights_entity}" entity_id: "${garage_lights_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: garage_lights_button id: garage_lights_button
@@ -546,17 +544,16 @@ binary_sensor:
if (id(ha_garage_door).state) { if (id(ha_garage_door).state) {
return lv_color_hex(0xC25B13); return lv_color_hex(0xC25B13);
} }
return x ? lv_color_hex(0xB88918) : lv_color_hex(0x28313D);
return x
? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_garage_door id: ha_garage_door
entity_id: "${garage_door_entity}" entity_id: "${garage_door_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: garage_lights_button id: garage_lights_button
@@ -564,6 +561,7 @@ binary_sensor:
if (x) { if (x) {
return lv_color_hex(0xC25B13); return lv_color_hex(0xC25B13);
} }
return id(ha_garage_lights).state return id(ha_garage_lights).state
? lv_color_hex(0xB88918) ? lv_color_hex(0xB88918)
: lv_color_hex(0x28313D); : lv_color_hex(0x28313D);
@@ -573,118 +571,80 @@ binary_sensor:
entity_id: "${bathroom_fan_entity}" entity_id: "${bathroom_fan_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: bathroom_fan_button id: bathroom_fan_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0x1668A8) : lv_color_hex(0x28313D); return x
? lv_color_hex(0x1668A8)
: lv_color_hex(0x28313D);
- platform: homeassistant - platform: homeassistant
id: ha_quiet_time id: ha_quiet_time
entity_id: "${quiet_time_entity}" entity_id: "${quiet_time_entity}"
internal: true internal: true
on_state: on_state:
then:
- if:
condition:
lambda: return id(lvgl_ready);
then: then:
- lvgl.widget.update: - lvgl.widget.update:
id: bedtime_button id: bedtime_button
bg_color: !lambda |- bg_color: !lambda |-
return x ? lv_color_hex(0x705295) : lv_color_hex(0x3B3048); return x
? lv_color_hex(0x705295)
: lv_color_hex(0x3B3048);
- lvgl.label.update: - lvgl.label.update:
id: clock_status_label id: clock_status_label
text: !lambda |- text: !lambda |-
return x ? std::string("Quiet Time active") : std::string(""); return x
? std::string("Quiet Time active")
: std::string("");
#:########################################################################################:# #:########################################################################################:#
# INTERVAL: # INTERVAL:
# Update clock and imported sensor labels only after LVGL startup is complete # Update minute-resolution clock values locally
#:########################################################################################:# #:########################################################################################:#
interval: interval:
- interval: 10s - interval: 10s
then: then:
- if: - if:
condition: condition:
lambda: return id(lvgl_ready); lambda: |-
then: return id(ha_time).now().is_valid();
- if:
condition:
lambda: return id(ha_time).now().is_valid();
then: then:
- lvgl.label.update: - lvgl.label.update:
id: clock_time_label id: clock_time_label
text: !lambda |- text: !lambda |-
auto now = id(ha_time).now(); auto now = id(ha_time).now();
char buffer[8]; char buffer[8];
now.strftime(buffer, sizeof(buffer), "%H:%M"); now.strftime(buffer, sizeof(buffer), "%H:%M");
return std::string(buffer); return std::string(buffer);
- lvgl.label.update: - lvgl.label.update:
id: clock_date_label id: clock_date_label
text: !lambda |- text: !lambda |-
auto now = id(ha_time).now(); auto now = id(ha_time).now();
char weekday[16]; char weekday[16];
char month[16]; char month[16];
now.strftime(weekday, sizeof(weekday), "%A"); now.strftime(weekday, sizeof(weekday), "%A");
now.strftime(month, sizeof(month), "%B"); now.strftime(month, sizeof(month), "%B");
char buffer[48]; char buffer[48];
snprintf(buffer, sizeof(buffer), "%s, %d %s", weekday, now.day_of_month, month); snprintf(
buffer,
sizeof(buffer),
"%s, %d %s",
weekday,
now.day_of_month,
month
);
return std::string(buffer); return std::string(buffer);
- lvgl.label.update:
id: bedroom_moon_value_label
text:
format: "%.1f%%"
args: [id(moon_phase).state]
- lvgl.label.update:
id: clock_moon_value_label
text:
format: "%.1f%%"
args: [id(moon_phase).state]
- lvgl.label.update:
id: bedroom_outdoor_value_label
text:
format: "%.1f°C"
args: [id(outdoor_temperature).state]
- lvgl.label.update:
id: clock_outdoor_value_label
text:
format: "%.1f°C"
args: [id(outdoor_temperature).state]
- lvgl.label.update:
id: bedroom_indoor_value_label
text:
format: "%.1f°C"
args: [id(indoor_temperature).state]
- lvgl.label.update:
id: clock_indoor_value_label
text:
format: "%.1f°C"
args: [id(indoor_temperature).state]
- lvgl.label.update:
id: bedroom_humidity_value_label
text:
format: "%.0f%%"
args: [id(indoor_humidity).state]
- lvgl.label.update:
id: clock_humidity_value_label
text:
format: "%.0f%%"
args: [id(indoor_humidity).state]
#:########################################################################################:# #:########################################################################################:#
# TEXT SENSOR COMPONENT: # TEXT SENSOR COMPONENT:
# https://esphome.io/components/text_sensor/ # https://esphome.io/components/text_sensor/
@@ -697,10 +657,13 @@ text_sensor:
- platform: wifi_info - platform: wifi_info
ip_address: ip_address:
name: "${friendly_name} IP Address" name: "${friendly_name} IP Address"
ssid: ssid:
name: "${friendly_name} Connected SSID" name: "${friendly_name} Connected SSID"
bssid: bssid:
name: "${friendly_name} Connected BSSID" name: "${friendly_name} Connected BSSID"
mac_address: mac_address:
name: "${friendly_name} MAC Address" name: "${friendly_name} MAC Address"
@@ -710,8 +673,10 @@ text_sensor:
#:########################################################################################:# #:########################################################################################:#
lvgl: lvgl:
id: panel_lvgl id: panel_lvgl
displays: displays:
- main_display - main_display
touchscreens: touchscreens:
- touchscreen_id: main_touchscreen - touchscreen_id: main_touchscreen
long_press_time: 1200ms long_press_time: 1200ms
@@ -733,107 +698,57 @@ lvgl:
id: clock_page id: clock_page
animation: FADE_IN animation: FADE_IN
time: 250ms time: 250ms
- light.turn_on: - light.turn_on:
id: display_backlight id: display_backlight
brightness: "${clock_brightness}" brightness: "${clock_brightness}"
transition_length: 1500ms transition_length: 1500ms
pages: pages:
#:####################################################################################:#
# BEDROOM PAGE
#:####################################################################################:#
- id: bedroom_page - id: bedroom_page
bg_color: 0x10151D bg_color: 0x10151D
bg_opa: COVER bg_opa: COVER
widgets: widgets:
- label: - label:
x: 35 x: 35
y: 14 y: 18
text: "Bedroom" text: "Bedroom"
text_font: font_title text_font: font_title
text_color: 0xFFFFFF text_color: 0xFFFFFF
- label:
id: bedroom_temperature_label
x: 700
y: 25
text: "--.-°C"
text_font: font_title
text_color: 0x8FC6EE
- label:
id: bedroom_humidity_label
x: 865
y: 25
text: "--%"
text_font: font_title
text_color: 0x83C7AA
- label: - label:
id: bedroom_connection_label id: bedroom_connection_label
x: 38 x: 38
y: 57 y: 67
text: "Waiting for HA" text: "Waiting for HA"
text_font: font_small text_font: font_small
text_color: 0xF0A45D text_color: 0xF0A45D
- label:
x: 355
y: 12
width: 150
text: "Moon"
text_font: font_small
text_align: CENTER
text_color: 0xA9A0D4
- label:
id: bedroom_moon_value_label
x: 355
y: 39
width: 150
text: "--.-%"
text_font: font_button
text_align: CENTER
text_color: 0xC6BDEC
- label:
x: 510
y: 12
width: 150
text: "Outdoor"
text_font: font_small
text_align: CENTER
text_color: 0x84B5D8
- label:
id: bedroom_outdoor_value_label
x: 510
y: 39
width: 150
text: "--.-°C"
text_font: font_button
text_align: CENTER
text_color: 0x9CCBEA
- label:
x: 665
y: 12
width: 150
text: "Indoor"
text_font: font_small
text_align: CENTER
text_color: 0xD6B78F
- label:
id: bedroom_indoor_value_label
x: 665
y: 39
width: 150
text: "--.-°C"
text_font: font_button
text_align: CENTER
text_color: 0xE8C79D
- label:
x: 820
y: 12
width: 165
text: "Humidity"
text_font: font_small
text_align: CENTER
text_color: 0x80BDA4
- label:
id: bedroom_humidity_value_label
x: 820
y: 39
width: 165
text: "--%"
text_font: font_button
text_align: CENTER
text_color: 0x97D2B7
- button: - button:
id: north_lights_button id: north_lights_button
x: 35 x: 35
y: 95 y: 105
width: 300 width: 300
height: 105 height: 105
text: "North Lights" text: "North Lights"
@@ -854,7 +769,7 @@ lvgl:
- button: - button:
id: south_lights_button id: south_lights_button
x: 362 x: 362
y: 95 y: 105
width: 300 width: 300
height: 105 height: 105
text: "South Lights" text: "South Lights"
@@ -875,7 +790,7 @@ lvgl:
- button: - button:
id: bedside_lamp_button id: bedside_lamp_button
x: 689 x: 689
y: 95 y: 105
width: 300 width: 300
height: 105 height: 105
text: "Bedside Lamp" text: "Bedside Lamp"
@@ -896,7 +811,7 @@ lvgl:
- button: - button:
id: hall_floor_button id: hall_floor_button
x: 35 x: 35
y: 218 y: 228
width: 300 width: 300
height: 105 height: 105
text: "Hall Floor" text: "Hall Floor"
@@ -917,7 +832,7 @@ lvgl:
- button: - button:
id: hall_lights_button id: hall_lights_button
x: 362 x: 362
y: 218 y: 228
width: 300 width: 300
height: 105 height: 105
text: "Hall Lights" text: "Hall Lights"
@@ -938,7 +853,7 @@ lvgl:
- button: - button:
id: bathroom_lights_button id: bathroom_lights_button
x: 689 x: 689
y: 218 y: 228
width: 300 width: 300
height: 105 height: 105
text: "Bathroom Lights" text: "Bathroom Lights"
@@ -959,7 +874,7 @@ lvgl:
- button: - button:
id: patio_lights_button id: patio_lights_button
x: 35 x: 35
y: 341 y: 351
width: 300 width: 300
height: 105 height: 105
text: "Patio Lights" text: "Patio Lights"
@@ -980,7 +895,7 @@ lvgl:
- button: - button:
id: garage_lights_button id: garage_lights_button
x: 362 x: 362
y: 341 y: 351
width: 300 width: 300
height: 105 height: 105
text: "Garage Lights" text: "Garage Lights"
@@ -1001,7 +916,7 @@ lvgl:
- button: - button:
id: bathroom_fan_button id: bathroom_fan_button
x: 689 x: 689
y: 341 y: 351
width: 300 width: 300
height: 105 height: 105
text: "Bathroom Fan" text: "Bathroom Fan"
@@ -1022,9 +937,9 @@ lvgl:
- button: - button:
id: clock_now_button id: clock_now_button
x: 35 x: 35
y: 475 y: 485
width: 280 width: 280
height: 92 height: 82
text: "Show Clock" text: "Show Clock"
text_font: font_button text_font: font_button
bg_color: 0x214F72 bg_color: 0x214F72
@@ -1037,6 +952,7 @@ lvgl:
id: clock_page id: clock_page
animation: FADE_IN animation: FADE_IN
time: 250ms time: 250ms
- light.turn_on: - light.turn_on:
id: display_backlight id: display_backlight
brightness: "${clock_brightness}" brightness: "${clock_brightness}"
@@ -1045,9 +961,9 @@ lvgl:
- button: - button:
id: spare_navigation_button id: spare_navigation_button
x: 340 x: 340
y: 475 y: 485
width: 280 width: 280
height: 92 height: 82
text: "More Soon" text: "More Soon"
text_font: font_button text_font: font_button
bg_color: 0x315843 bg_color: 0x315843
@@ -1059,9 +975,9 @@ lvgl:
- button: - button:
id: bedtime_button id: bedtime_button
x: 645 x: 645
y: 475 y: 485
width: 344 width: 344
height: 92 height: 82
text: "Hold for Bedtime" text: "Hold for Bedtime"
text_font: font_button text_font: font_button
bg_color: 0x3B3048 bg_color: 0x3B3048
@@ -1069,24 +985,32 @@ lvgl:
border_width: 2 border_width: 2
border_color: 0x735E88 border_color: 0x735E88
radius: 16 radius: 16
on_long_press: on_long_press:
then: then:
- homeassistant.action: - homeassistant.action:
action: input_button.press action: input_button.press
data: data:
entity_id: "${bedtime_button_entity}" entity_id: "${bedtime_button_entity}"
- lvgl.button.update: - lvgl.button.update:
id: bedtime_button id: bedtime_button
text: "Bedtime Activated" text: "Bedtime Activated"
- delay: 2s - delay: 2s
- lvgl.button.update: - lvgl.button.update:
id: bedtime_button id: bedtime_button
text: "Hold for Bedtime" text: "Hold for Bedtime"
#:####################################################################################:#
# CLOCK PAGE
#:####################################################################################:#
- id: clock_page - id: clock_page
skip: true skip: true
bg_color: 0x020304 bg_color: 0x020304
bg_opa: COVER bg_opa: COVER
widgets: widgets:
- button: - button:
id: clock_wake_button id: clock_wake_button
@@ -1099,12 +1023,14 @@ lvgl:
shadow_width: 0 shadow_width: 0
radius: 0 radius: 0
text: "" text: ""
on_click: on_click:
then: then:
- lvgl.page.show: - lvgl.page.show:
id: bedroom_page id: bedroom_page
animation: FADE_OUT animation: FADE_OUT
time: 250ms time: 250ms
- light.turn_on: - light.turn_on:
id: display_backlight id: display_backlight
brightness: "${control_brightness}" brightness: "${control_brightness}"
@@ -1113,7 +1039,7 @@ lvgl:
- label: - label:
id: clock_time_label id: clock_time_label
align: TOP_MID align: TOP_MID
y: 40 y: 70
text: "--:--" text: "--:--"
text_font: font_clock text_font: font_clock
text_color: 0xE4DDD2 text_color: 0xE4DDD2
@@ -1122,90 +1048,28 @@ lvgl:
- label: - label:
id: clock_date_label id: clock_date_label
align: TOP_MID align: TOP_MID
y: 250 y: 325
text: "Waiting for time" text: "Waiting for time"
text_font: font_title text_font: font_title
text_color: 0xA8A198 text_color: 0xA8A198
clickable: false clickable: false
- label: - label:
x: 80 id: clock_temperature_label
y: 350 x: 335
width: 205 y: 420
text: "Moon"
text_font: font_small
text_align: CENTER
text_color: 0xA9A0D4
clickable: false
- label:
id: clock_moon_value_label
x: 80
y: 382
width: 205
text: "--.-%"
text_font: font_title
text_align: CENTER
text_color: 0xC6BDEC
clickable: false
- label:
x: 285
y: 350
width: 205
text: "Outdoor"
text_font: font_small
text_align: CENTER
text_color: 0x84B5D8
clickable: false
- label:
id: clock_outdoor_value_label
x: 285
y: 382
width: 205
text: "--.-°C" text: "--.-°C"
text_font: font_title text_font: font_title
text_align: CENTER text_color: 0x8FAFC8
text_color: 0x9CCBEA
clickable: false clickable: false
- label: - label:
x: 490 id: clock_humidity_label
y: 350 x: 600
width: 205 y: 420
text: "Indoor"
text_font: font_small
text_align: CENTER
text_color: 0xD6B78F
clickable: false
- label:
id: clock_indoor_value_label
x: 490
y: 382
width: 205
text: "--.-°C"
text_font: font_title
text_align: CENTER
text_color: 0xE8C79D
clickable: false
- label:
x: 695
y: 350
width: 245
text: "Humidity"
text_font: font_small
text_align: CENTER
text_color: 0x80BDA4
clickable: false
- label:
id: clock_humidity_value_label
x: 695
y: 382
width: 245
text: "--%" text: "--%"
text_font: font_title text_font: font_title
text_align: CENTER text_color: 0x7FAE9B
text_color: 0x97D2B7
clickable: false clickable: false
- label: - label: