Edit esp-bedside-panel.yaml
This commit is contained in:
+236
-88
@@ -6,6 +6,8 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# V0.9 2026-07-15 Added four environmental/status readings to Bedroom and Clock pages
|
||||
# Changed clock to 24-hour format and increased clock font to 220px
|
||||
# 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
|
||||
@@ -40,22 +42,27 @@
|
||||
# - Touch I2C address: 0x5D
|
||||
#:########################################################################################:#
|
||||
# OPERATION NOTES:
|
||||
# - This is a reduced-load test build after V0.8 rolled back during startup.
|
||||
# - The display remains in its native 1024x600 landscape orientation.
|
||||
# - The default page contains nine Bedroom / nearby controls.
|
||||
# - The Bedroom and Clock pages display:
|
||||
# - Moon phase percentage
|
||||
# - Outdoor temperature
|
||||
# - Indoor temperature
|
||||
# - Indoor humidity
|
||||
# - The clock uses 24-hour HH:MM format.
|
||||
# - 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 are intentionally omitted from this version.
|
||||
# - They will be restored after the clock framework is proven stable.
|
||||
# - Climate and Downstairs pages remain omitted from this version.
|
||||
#:########################################################################################:#
|
||||
# OFFLINE NOTES:
|
||||
# - LVGL, the clock, touch and backlight operate locally.
|
||||
# - Home Assistant control buttons require an API connection.
|
||||
# - The clock continues using the most recently synchronised time.
|
||||
# - Imported readings may display their most recently received values while HA is offline.
|
||||
#:########################################################################################:#
|
||||
|
||||
#:########################################################################################:#
|
||||
@@ -67,12 +74,12 @@ substitutions:
|
||||
# Device Naming
|
||||
device_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. Reduced-load LVGL test. (Layout V1.1)"
|
||||
description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside clock and Home Assistant control panel. Four status readings and 24-hour clock. (Layout V1.1)"
|
||||
device_area: "Bedroom"
|
||||
|
||||
# Project Naming
|
||||
project_name: "Guition.JC1060P470C_I_W_Y"
|
||||
project_version: "v0.8a"
|
||||
project_version: "v0.9"
|
||||
|
||||
# Passwords & Secrets
|
||||
api_key: !secret esp-api_key
|
||||
@@ -97,9 +104,11 @@ substitutions:
|
||||
control_brightness: "80%"
|
||||
clock_brightness: "4%"
|
||||
|
||||
# Home Assistant Entities - Environment
|
||||
bedroom_temperature_entity: "sensor.master_bedroom_environment_zth01_temperature_2"
|
||||
bedroom_humidity_entity: "sensor.master_bedroom_environment_zth01_humidity_2"
|
||||
# Home Assistant Entities - Status / Environment
|
||||
moon_phase_entity: "sensor.astroweather_moon_phase"
|
||||
outdoor_temperature_entity: "sensor.lounge_outside_temperature"
|
||||
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
|
||||
north_lights_entity: "light.tasmo_ifan02_3793_bedrm1_1"
|
||||
@@ -353,7 +362,7 @@ touchscreen:
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: font_clock
|
||||
size: 170
|
||||
size: 220
|
||||
glyphs:
|
||||
- "0123456789:"
|
||||
|
||||
@@ -397,37 +406,73 @@ sensor:
|
||||
update_interval: "${update_interval}"
|
||||
|
||||
- platform: homeassistant
|
||||
id: bedroom_temperature
|
||||
entity_id: "${bedroom_temperature_entity}"
|
||||
id: moon_phase
|
||||
entity_id: "${moon_phase_entity}"
|
||||
internal: true
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: clock_temperature_label
|
||||
id: bedroom_moon_value_label
|
||||
text:
|
||||
format: "%.1f%%"
|
||||
args: [x]
|
||||
|
||||
- lvgl.label.update:
|
||||
id: clock_moon_value_label
|
||||
text:
|
||||
format: "%.1f%%"
|
||||
args: [x]
|
||||
|
||||
- platform: homeassistant
|
||||
id: outdoor_temperature
|
||||
entity_id: "${outdoor_temperature_entity}"
|
||||
internal: true
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: bedroom_outdoor_value_label
|
||||
text:
|
||||
format: "%.1f°C"
|
||||
args: [x]
|
||||
|
||||
- lvgl.label.update:
|
||||
id: bedroom_temperature_label
|
||||
id: clock_outdoor_value_label
|
||||
text:
|
||||
format: "%.1f°C"
|
||||
args: [x]
|
||||
|
||||
- platform: homeassistant
|
||||
id: bedroom_humidity
|
||||
entity_id: "${bedroom_humidity_entity}"
|
||||
id: indoor_temperature
|
||||
entity_id: "${indoor_temperature_entity}"
|
||||
internal: true
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: clock_humidity_label
|
||||
id: bedroom_indoor_value_label
|
||||
text:
|
||||
format: "%.1f°C"
|
||||
args: [x]
|
||||
|
||||
- lvgl.label.update:
|
||||
id: clock_indoor_value_label
|
||||
text:
|
||||
format: "%.1f°C"
|
||||
args: [x]
|
||||
|
||||
- platform: homeassistant
|
||||
id: indoor_humidity
|
||||
entity_id: "${indoor_humidity_entity}"
|
||||
internal: true
|
||||
on_value:
|
||||
then:
|
||||
- lvgl.label.update:
|
||||
id: bedroom_humidity_value_label
|
||||
text:
|
||||
format: "%.0f%%"
|
||||
args: [x]
|
||||
|
||||
- lvgl.label.update:
|
||||
id: bedroom_humidity_label
|
||||
id: clock_humidity_value_label
|
||||
text:
|
||||
format: "%.0f%%"
|
||||
args: [x]
|
||||
@@ -614,23 +659,7 @@ interval:
|
||||
auto now = id(ha_time).now();
|
||||
|
||||
char buffer[8];
|
||||
now.strftime(buffer, sizeof(buffer), "%I:%M");
|
||||
|
||||
std::string value(buffer);
|
||||
|
||||
if (!value.empty() && value.front() == '0') {
|
||||
value.erase(0, 1);
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
- lvgl.label.update:
|
||||
id: clock_ampm_label
|
||||
text: !lambda |-
|
||||
auto now = id(ha_time).now();
|
||||
|
||||
char buffer[4];
|
||||
now.strftime(buffer, sizeof(buffer), "%p");
|
||||
now.strftime(buffer, sizeof(buffer), "%H:%M");
|
||||
|
||||
return std::string(buffer);
|
||||
|
||||
@@ -728,40 +757,101 @@ lvgl:
|
||||
widgets:
|
||||
- label:
|
||||
x: 35
|
||||
y: 18
|
||||
y: 14
|
||||
text: "Bedroom"
|
||||
text_font: font_title
|
||||
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:
|
||||
id: bedroom_connection_label
|
||||
x: 38
|
||||
y: 67
|
||||
y: 57
|
||||
text: "Waiting for HA"
|
||||
text_font: font_small
|
||||
text_color: 0xF0A45D
|
||||
|
||||
# Four status readings across the top
|
||||
- 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
|
||||
|
||||
# Row 1
|
||||
- button:
|
||||
id: north_lights_button
|
||||
x: 35
|
||||
y: 105
|
||||
y: 95
|
||||
width: 300
|
||||
height: 105
|
||||
text: "North Lights"
|
||||
@@ -782,7 +872,7 @@ lvgl:
|
||||
- button:
|
||||
id: south_lights_button
|
||||
x: 362
|
||||
y: 105
|
||||
y: 95
|
||||
width: 300
|
||||
height: 105
|
||||
text: "South Lights"
|
||||
@@ -803,7 +893,7 @@ lvgl:
|
||||
- button:
|
||||
id: bedside_lamp_button
|
||||
x: 689
|
||||
y: 105
|
||||
y: 95
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Bedside Lamp"
|
||||
@@ -825,7 +915,7 @@ lvgl:
|
||||
- button:
|
||||
id: hall_floor_button
|
||||
x: 35
|
||||
y: 228
|
||||
y: 218
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Hall Floor"
|
||||
@@ -846,7 +936,7 @@ lvgl:
|
||||
- button:
|
||||
id: hall_lights_button
|
||||
x: 362
|
||||
y: 228
|
||||
y: 218
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Hall Lights"
|
||||
@@ -867,7 +957,7 @@ lvgl:
|
||||
- button:
|
||||
id: bathroom_lights_button
|
||||
x: 689
|
||||
y: 228
|
||||
y: 218
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Bathroom Lights"
|
||||
@@ -889,7 +979,7 @@ lvgl:
|
||||
- button:
|
||||
id: patio_lights_button
|
||||
x: 35
|
||||
y: 351
|
||||
y: 341
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Patio Lights"
|
||||
@@ -910,7 +1000,7 @@ lvgl:
|
||||
- button:
|
||||
id: garage_lights_button
|
||||
x: 362
|
||||
y: 351
|
||||
y: 341
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Garage Lights"
|
||||
@@ -931,7 +1021,7 @@ lvgl:
|
||||
- button:
|
||||
id: bathroom_fan_button
|
||||
x: 689
|
||||
y: 351
|
||||
y: 341
|
||||
width: 300
|
||||
height: 105
|
||||
text: "Bathroom Fan"
|
||||
@@ -953,9 +1043,9 @@ lvgl:
|
||||
- button:
|
||||
id: clock_now_button
|
||||
x: 35
|
||||
y: 485
|
||||
y: 475
|
||||
width: 280
|
||||
height: 82
|
||||
height: 92
|
||||
text: "Show Clock"
|
||||
text_font: font_button
|
||||
bg_color: 0x214F72
|
||||
@@ -977,9 +1067,9 @@ lvgl:
|
||||
- button:
|
||||
id: spare_navigation_button
|
||||
x: 340
|
||||
y: 485
|
||||
y: 475
|
||||
width: 280
|
||||
height: 82
|
||||
height: 92
|
||||
text: "More Soon"
|
||||
text_font: font_button
|
||||
bg_color: 0x315843
|
||||
@@ -991,9 +1081,9 @@ lvgl:
|
||||
- button:
|
||||
id: bedtime_button
|
||||
x: 645
|
||||
y: 485
|
||||
y: 475
|
||||
width: 344
|
||||
height: 82
|
||||
height: 92
|
||||
text: "Hold for Bedtime"
|
||||
text_font: font_button
|
||||
bg_color: 0x3B3048
|
||||
@@ -1055,46 +1145,104 @@ lvgl:
|
||||
- label:
|
||||
id: clock_time_label
|
||||
align: TOP_MID
|
||||
y: 70
|
||||
y: 30
|
||||
text: "--:--"
|
||||
text_font: font_clock
|
||||
text_color: 0xE4DDD2
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
id: clock_ampm_label
|
||||
x: 790
|
||||
y: 250
|
||||
text: ""
|
||||
text_font: font_title
|
||||
text_color: 0x938D85
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
id: clock_date_label
|
||||
align: TOP_MID
|
||||
y: 325
|
||||
y: 265
|
||||
text: "Waiting for time"
|
||||
text_font: font_title
|
||||
text_color: 0xA8A198
|
||||
clickable: false
|
||||
|
||||
# Four status readings
|
||||
- label:
|
||||
id: clock_temperature_label
|
||||
x: 335
|
||||
y: 420
|
||||
text: "--.-°C"
|
||||
text_font: font_title
|
||||
text_color: 0x8FAFC8
|
||||
x: 80
|
||||
y: 355
|
||||
width: 205
|
||||
text: "Moon"
|
||||
text_font: font_small
|
||||
text_align: CENTER
|
||||
text_color: 0xA9A0D4
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
id: clock_humidity_label
|
||||
x: 600
|
||||
y: 420
|
||||
id: clock_moon_value_label
|
||||
x: 80
|
||||
y: 387
|
||||
width: 205
|
||||
text: "--.-%"
|
||||
text_font: font_title
|
||||
text_align: CENTER
|
||||
text_color: 0xC6BDEC
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
x: 285
|
||||
y: 355
|
||||
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: 387
|
||||
width: 205
|
||||
text: "--.-°C"
|
||||
text_font: font_title
|
||||
text_align: CENTER
|
||||
text_color: 0x9CCBEA
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
x: 490
|
||||
y: 355
|
||||
width: 205
|
||||
text: "Indoor"
|
||||
text_font: font_small
|
||||
text_align: CENTER
|
||||
text_color: 0xD6B78F
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
id: clock_indoor_value_label
|
||||
x: 490
|
||||
y: 387
|
||||
width: 205
|
||||
text: "--.-°C"
|
||||
text_font: font_title
|
||||
text_align: CENTER
|
||||
text_color: 0xE8C79D
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
x: 695
|
||||
y: 355
|
||||
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: 387
|
||||
width: 245
|
||||
text: "--%"
|
||||
text_font: font_title
|
||||
text_color: 0x7FAE9B
|
||||
text_align: CENTER
|
||||
text_color: 0x97D2B7
|
||||
clickable: false
|
||||
|
||||
- label:
|
||||
|
||||
Reference in New Issue
Block a user