From 5747968e9644a059fdc69c25ee909719c9521ac8 Mon Sep 17 00:00:00 2001 From: ESPHome Device Builder Date: Sat, 18 Jul 2026 23:47:46 +1200 Subject: [PATCH] Edit esp-bedside-panel.yaml --- esphome/esp-bedside-panel.yaml | 175 ++++++++++++++++++++++++--------- 1 file changed, 127 insertions(+), 48 deletions(-) diff --git a/esphome/esp-bedside-panel.yaml b/esphome/esp-bedside-panel.yaml index d9913c2..f00be1c 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: +# V1.29 2026-07-18 Perfected Atto charging alignment and expanded Security states # V1.28 2026-07-18 Restyled Atto Charging as top-row data with active red background # V1.27 2026-07-18 Added Open-Meteo rain sensors and rearranged Atto status/controls # V1.26 2026-07-18 Added Bedtime icon, snappier Security navigation and Atto text refinements @@ -129,12 +130,12 @@ substitutions: # Device Naming device_name: "esp-bedside-panel" friendly_name: "ESP Bedside Panel" - description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside control panel. Open-Meteo rain probability and top-row Atto Charging status styling. (Layout V1.1)" + description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside control panel. Aligned Atto charging data, garage-door status and optimistic Security camera selection. (Layout V1.1)" device_area: "Bedroom" # Project Naming project_name: "Guition.JC1060P470C_I_W_Y" - project_version: "v1.28" + project_version: "v1.29" # Passwords & Secrets api_key: !secret esp-api_key @@ -230,6 +231,7 @@ substitutions: # Home Assistant Entities - Security Controls downstairs_guests_occupied_entity: "input_boolean.downstairs_flat_occupied" + garage_door_contact_entity: "binary_sensor.garage_roller_door_x18rs_contact" external_garage_light_entity: "switch.esp_garageextcornerlight_garage_external_light" # Home Assistant Entities - Jobs Tracker @@ -1173,6 +1175,14 @@ binary_sensor: then: - script.execute: refresh_security_controls + - platform: homeassistant + id: ha_garage_door_open + entity_id: "${garage_door_contact_entity}" + internal: true + on_state: + then: + - script.execute: refresh_security_controls + - platform: homeassistant id: ha_quiet_time entity_id: "${quiet_time_entity}" @@ -2651,7 +2661,8 @@ script: ? lv_color_hex(0x315843) : lv_color_hex(0x6B3A3A); - # Charging: top-row data styling when idle, red background when active. + # Charging labels match the other top-row data. The alert + # background is fully hidden while idle, so no edge can be drawn. - lvgl.label.update: id: atto_charging_state_label text: !lambda |- @@ -2661,10 +2672,8 @@ script: - lvgl.widget.update: id: atto_charging_status - bg_color: !lambda |- - return id(ha_atto_charging).state - ? lv_color_hex(0xD32F2F) - : lv_color_hex(0x111923); + hidden: !lambda |- + return !id(ha_atto_charging).state; # Charging schedule state. - lvgl.label.update: @@ -3208,6 +3217,13 @@ script: return id(lvgl_ready); then: + - lvgl.label.update: + id: security_downstairs_guests_label + text: !lambda |- + return id(ha_downstairs_guests_occupied).state + ? std::string("Downstairs Guests\nOccupied (Hold)") + : std::string("Downstairs Guests\nNot Occupied (Hold)"); + - lvgl.widget.update: id: security_downstairs_guests_button bg_color: !lambda |- @@ -3215,6 +3231,24 @@ script: ? lv_color_hex(0x315843) : lv_color_hex(0x28313D); + - lvgl.label.update: + id: security_garage_door_state_label + text: !lambda |- + return id(ha_garage_door_open).state + ? std::string("Garage Door State\nOpen") + : std::string("Garage Door State\nClosed"); + + - lvgl.widget.update: + id: security_garage_door_state + bg_color: !lambda |- + return id(ha_garage_door_open).state + ? lv_color_hex(0xB53636) + : lv_color_hex(0x315843); + border_color: !lambda |- + return id(ha_garage_door_open).state + ? lv_color_hex(0xE06C6C) + : lv_color_hex(0x548C6C); + - lvgl.widget.update: id: security_external_garage_light_button bg_color: !lambda |- @@ -3291,8 +3325,6 @@ script: ); then: - - script.execute: refresh_security_camera_buttons - - if: condition: lambda: |- @@ -5271,43 +5303,48 @@ lvgl: - script.execute: release_atto_lock_optimistic + # Red alert background only; hidden completely while not charging. - obj: id: atto_charging_status x: 766 y: 22 width: 220 height: 92 - bg_color: 0x111923 + bg_color: 0xD32F2F bg_opa: COVER border_width: 0 + outline_width: 0 + shadow_width: 0 radius: 17 clickable: false - widgets: - - label: - x: 17 - y: 31 - text: "\U000F0084" - text_font: font_mdi_vehicle - text_color: 0xFFFFFF + hidden: true - - label: - x: 57 - y: 9 - width: 145 - text: "Atto Charging" - text_font: font_small - text_align: CENTER - text_color: 0xAEB8C4 + # Sibling labels use the same absolute coordinates as the other data. + - label: + x: 783 + y: 53 + text: "\U000F0084" + text_font: font_mdi_vehicle + text_color: 0xFFFFFF - - label: - id: atto_charging_state_label - x: 57 - y: 38 - width: 145 - text: "Off" - text_font: font_vehicle_bold - text_align: CENTER - text_color: 0xFFFFFF + - label: + x: 823 + y: 31 + width: 145 + text: "Atto Charging" + text_font: font_small + text_align: CENTER + text_color: 0xAEB8C4 + + - label: + id: atto_charging_state_label + x: 823 + y: 60 + width: 145 + text: "Off" + text_font: font_vehicle_bold + text_align: CENTER + text_color: 0xFFFFFF - button: id: atto_schedule_button @@ -6673,9 +6710,15 @@ lvgl: text: "Doorbell" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 1; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Doorbell..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6698,9 +6741,15 @@ lvgl: text: "Front Door" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 2; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Front Door..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6723,9 +6772,15 @@ lvgl: text: "Driveway" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 3; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Driveway..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6748,9 +6803,15 @@ lvgl: text: "Garage" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 4; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Garage..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6773,9 +6834,15 @@ lvgl: text: "Caravan" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 5; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Caravan..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6798,9 +6865,15 @@ lvgl: text: "Bike Shed" text_font: font_small text_color: 0xFFFFFF - on_click: + on_press: - lambda: |- id(security_camera_selection) = 6; + + - lvgl.label.update: + id: security_camera_status_label + text: "Loading Bike Shed..." + + # Optimistic selection and download start on touch-down. - script.execute: refresh_security_camera_buttons - script.execute: refresh_security_camera @@ -6822,8 +6895,9 @@ lvgl: bg_color: 0x416F55 widgets: - label: + id: security_downstairs_guests_label align: CENTER - text: "Downstairs Guests\nOccupied (Hold)" + text: "Downstairs Guests\nNot Occupied (Hold)" text_font: font_small text_align: CENTER text_color: 0xFFFFFF @@ -6834,23 +6908,28 @@ lvgl: data: entity_id: "${downstairs_guests_occupied_entity}" - - button: - id: security_future_2_button + - obj: + id: security_garage_door_state x: 25 y: 190 width: 290 height: 70 - bg_color: 0x28313D + bg_color: 0x315843 bg_opa: COVER border_width: 2 - border_color: 0x445365 + border_color: 0x548C6C + outline_width: 0 + shadow_width: 0 radius: 16 + clickable: false widgets: - label: + id: security_garage_door_state_label align: CENTER - text: "Future2" - text_font: font_button - text_color: 0x8D98A6 + text: "Garage Door State\nClosed" + text_font: font_small + text_align: CENTER + text_color: 0xFFFFFF - button: id: security_future_3_button