diff --git a/esphome/esp-bedside-panel.yaml b/esphome/esp-bedside-panel.yaml index 870621b..b3a2dad 100644 --- a/esphome/esp-bedside-panel.yaml +++ b/esphome/esp-bedside-panel.yaml @@ -6,6 +6,7 @@ # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml #:########################################################################################:# # VERSIONS: +# V0.8d 2026-07-15 Centred button captions and added initial Climate page # V0.8b 2026-07-15 Changed proven V0.8a clock to 24-hour format and removed AM/PM # V0.8a 2026-07-14 Reduced LVGL memory load after V0.8 OTA rollback # Added lean large-clock idle page and Bedroom controls @@ -71,12 +72,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. Proven V0.8a layout with 24-hour clock. (Layout V1.1)" + description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside clock and Home Assistant control panel. Centred controls and initial Climate page. (Layout V1.1)" device_area: "Bedroom" # Project Naming project_name: "Guition.JC1060P470C_I_W_Y" - project_version: "v0.8b" + project_version: "v0.8d" # Passwords & Secrets api_key: !secret esp-api_key @@ -123,6 +124,13 @@ substitutions: # Home Assistant Entities - Actions bedtime_button_entity: "input_button.bedtime_mode" + # Home Assistant Entities - Climate Actions + climate_off_script: "script.master_bedroom_hvac_off" + climate_heat_script: "script.master_bedroom_hvac_heat" + climate_cool_script: "script.master_bedroom_hvac_cool" + climate_dry_script: "script.master_bedroom_hvac_dry" + climate_setpoint_script: "script.master_bedroom_setpoint_adjust" + #:########################################################################################:# # PACKAGES: # Included Common Packages @@ -751,8 +759,13 @@ lvgl: y: 105 width: 300 height: 105 - text: "North Lights" - text_font: font_button + widgets: + - label: + id: north_lights_button_label + align: CENTER + text: "North Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -772,8 +785,13 @@ lvgl: y: 105 width: 300 height: 105 - text: "South Lights" - text_font: font_button + widgets: + - label: + id: south_lights_button_label + align: CENTER + text: "South Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -793,8 +811,13 @@ lvgl: y: 105 width: 300 height: 105 - text: "Bedside Lamp" - text_font: font_button + widgets: + - label: + id: bedside_lamp_button_label + align: CENTER + text: "Bedside Lamp" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -814,8 +837,13 @@ lvgl: y: 228 width: 300 height: 105 - text: "Hall Floor" - text_font: font_button + widgets: + - label: + id: hall_floor_button_label + align: CENTER + text: "Hall Floor" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -835,8 +863,13 @@ lvgl: y: 228 width: 300 height: 105 - text: "Hall Lights" - text_font: font_button + widgets: + - label: + id: hall_lights_button_label + align: CENTER + text: "Hall Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -856,8 +889,13 @@ lvgl: y: 228 width: 300 height: 105 - text: "Bathroom Lights" - text_font: font_button + widgets: + - label: + id: bathroom_lights_button_label + align: CENTER + text: "Bathroom Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -877,8 +915,13 @@ lvgl: y: 351 width: 300 height: 105 - text: "Patio Lights" - text_font: font_button + widgets: + - label: + id: patio_lights_button_label + align: CENTER + text: "Patio Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -898,8 +941,13 @@ lvgl: y: 351 width: 300 height: 105 - text: "Garage Lights" - text_font: font_button + widgets: + - label: + id: garage_lights_button_label + align: CENTER + text: "Garage Lights" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -919,8 +967,13 @@ lvgl: y: 351 width: 300 height: 105 - text: "Bathroom Fan" - text_font: font_button + widgets: + - label: + id: bathroom_fan_button_label + align: CENTER + text: "Bathroom Fan" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x28313D bg_opa: COVER border_width: 2 @@ -940,8 +993,13 @@ lvgl: y: 485 width: 280 height: 82 - text: "Show Clock" - text_font: font_button + widgets: + - label: + id: clock_now_button_label + align: CENTER + text: "Show Clock" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x214F72 bg_opa: COVER border_width: 2 @@ -964,22 +1022,38 @@ lvgl: y: 485 width: 280 height: 82 - text: "More Soon" - text_font: font_button + widgets: + - label: + id: climate_navigation_button_label + align: CENTER + text: "Climate" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x315843 bg_opa: COVER border_width: 2 border_color: 0x548C6C radius: 16 + on_click: + - lvgl.page.show: + id: climate_page + animation: MOVE_LEFT + time: 220ms + - button: id: bedtime_button x: 645 y: 485 width: 344 height: 82 - text: "Hold for Bedtime" - text_font: font_button + widgets: + - label: + id: bedtime_button_label + align: CENTER + text: "Hold for Bedtime" + text_font: font_button + text_color: 0xFFFFFF bg_color: 0x3B3048 bg_opa: COVER border_width: 2 @@ -993,16 +1067,252 @@ lvgl: data: entity_id: "${bedtime_button_entity}" - - lvgl.button.update: - id: bedtime_button + - lvgl.label.update: + id: bedtime_button_label text: "Bedtime Activated" - delay: 2s - - lvgl.button.update: - id: bedtime_button + - lvgl.label.update: + id: bedtime_button_label text: "Hold for Bedtime" + #:####################################################################################:# + # CLIMATE PAGE + #:####################################################################################:# + - id: climate_page + bg_color: 0x111923 + bg_opa: COVER + + widgets: + - label: + x: 35 + y: 22 + text: "Bedroom Climate" + text_font: font_title + text_color: 0xFFFFFF + + - label: + align: TOP_RIGHT + x: -38 + y: 28 + text: "Initial controls" + text_font: font_small + text_color: 0x8FA0B3 + + # Main HVAC mode controls + - button: + id: climate_off_button + x: 35 + y: 105 + width: 220 + height: 115 + bg_color: 0x31443A + bg_opa: COVER + border_width: 2 + border_color: 0x5A7A68 + radius: 18 + pressed: + bg_color: 0x456052 + widgets: + - label: + align: CENTER + text: "Off" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.turn_on + data: + entity_id: "${climate_off_script}" + + - button: + id: climate_heat_button + x: 280 + y: 105 + width: 220 + height: 115 + bg_color: 0x6A401B + bg_opa: COVER + border_width: 2 + border_color: 0xA6672B + radius: 18 + pressed: + bg_color: 0x8A5625 + widgets: + - label: + align: CENTER + text: "Heat" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.turn_on + data: + entity_id: "${climate_heat_script}" + + - button: + id: climate_cool_button + x: 525 + y: 105 + width: 220 + height: 115 + bg_color: 0x214F72 + bg_opa: COVER + border_width: 2 + border_color: 0x3E7FA7 + radius: 18 + pressed: + bg_color: 0x2E6A96 + widgets: + - label: + align: CENTER + text: "Cool" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.turn_on + data: + entity_id: "${climate_cool_script}" + + - button: + id: climate_dry_button + x: 770 + y: 105 + width: 220 + height: 115 + bg_color: 0x244C60 + bg_opa: COVER + border_width: 2 + border_color: 0x427B96 + radius: 18 + pressed: + bg_color: 0x32677F + widgets: + - label: + align: CENTER + text: "Dehumid" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.turn_on + data: + entity_id: "${climate_dry_script}" + + # Setpoint controls + - button: + id: climate_setpoint_down_button + x: 145 + y: 255 + width: 220 + height: 115 + bg_color: 0x28313D + bg_opa: COVER + border_width: 2 + border_color: 0x445365 + radius: 18 + pressed: + bg_color: 0x425166 + widgets: + - label: + align: CENTER + text: "Setpoint -" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.master_bedroom_setpoint_adjust + data: + step: "-0.5" + + - button: + id: climate_status_placeholder_button + x: 402 + y: 255 + width: 220 + height: 115 + bg_color: 0x28313D + bg_opa: COVER + border_width: 2 + border_color: 0x445365 + radius: 18 + widgets: + - label: + align: CENTER + text: "More Soon" + text_font: font_button + text_color: 0xAEB8C4 + + - button: + id: climate_setpoint_up_button + x: 659 + y: 255 + width: 220 + height: 115 + bg_color: 0x28313D + bg_opa: COVER + border_width: 2 + border_color: 0x445365 + radius: 18 + pressed: + bg_color: 0x425166 + widgets: + - label: + align: CENTER + text: "Setpoint +" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - homeassistant.action: + action: script.master_bedroom_setpoint_adjust + data: + step: "0.5" + + - button: + id: climate_more_placeholder_button + x: 145 + y: 405 + width: 350 + height: 105 + bg_color: 0x28313D + bg_opa: COVER + border_width: 2 + border_color: 0x445365 + radius: 18 + widgets: + - label: + align: CENTER + text: "Fan and Timer - More Soon" + text_font: font_button + text_color: 0xAEB8C4 + + - button: + id: climate_back_button + x: 529 + y: 405 + width: 350 + height: 105 + bg_color: 0x315843 + bg_opa: COVER + border_width: 2 + border_color: 0x548C6C + radius: 18 + pressed: + bg_color: 0x416F55 + widgets: + - label: + align: CENTER + text: "Back to Bedroom" + text_font: font_button + text_color: 0xFFFFFF + on_click: + - lvgl.page.show: + id: bedroom_page + animation: MOVE_RIGHT + time: 220ms + #:####################################################################################:# # CLOCK PAGE #:####################################################################################:# @@ -1079,4 +1389,4 @@ lvgl: text: "" text_font: font_small text_color: 0x887799 - clickable: false \ No newline at end of file + clickable: false