Edit esp-bedside-panel.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-18 23:47:46 +12:00
parent 3938515564
commit 5747968e96
+127 -48
View File
@@ -6,6 +6,7 @@
# 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:
# 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.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.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 # V1.26 2026-07-18 Added Bedtime icon, snappier Security navigation and Atto text refinements
@@ -129,12 +130,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 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" device_area: "Bedroom"
# Project Naming # Project Naming
project_name: "Guition.JC1060P470C_I_W_Y" project_name: "Guition.JC1060P470C_I_W_Y"
project_version: "v1.28" project_version: "v1.29"
# Passwords & Secrets # Passwords & Secrets
api_key: !secret esp-api_key api_key: !secret esp-api_key
@@ -230,6 +231,7 @@ substitutions:
# Home Assistant Entities - Security Controls # Home Assistant Entities - Security Controls
downstairs_guests_occupied_entity: "input_boolean.downstairs_flat_occupied" 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" external_garage_light_entity: "switch.esp_garageextcornerlight_garage_external_light"
# Home Assistant Entities - Jobs Tracker # Home Assistant Entities - Jobs Tracker
@@ -1173,6 +1175,14 @@ binary_sensor:
then: then:
- script.execute: refresh_security_controls - 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 - platform: homeassistant
id: ha_quiet_time id: ha_quiet_time
entity_id: "${quiet_time_entity}" entity_id: "${quiet_time_entity}"
@@ -2651,7 +2661,8 @@ script:
? lv_color_hex(0x315843) ? lv_color_hex(0x315843)
: lv_color_hex(0x6B3A3A); : 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: - lvgl.label.update:
id: atto_charging_state_label id: atto_charging_state_label
text: !lambda |- text: !lambda |-
@@ -2661,10 +2672,8 @@ script:
- lvgl.widget.update: - lvgl.widget.update:
id: atto_charging_status id: atto_charging_status
bg_color: !lambda |- hidden: !lambda |-
return id(ha_atto_charging).state return !id(ha_atto_charging).state;
? lv_color_hex(0xD32F2F)
: lv_color_hex(0x111923);
# Charging schedule state. # Charging schedule state.
- lvgl.label.update: - lvgl.label.update:
@@ -3208,6 +3217,13 @@ script:
return id(lvgl_ready); return id(lvgl_ready);
then: 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: - lvgl.widget.update:
id: security_downstairs_guests_button id: security_downstairs_guests_button
bg_color: !lambda |- bg_color: !lambda |-
@@ -3215,6 +3231,24 @@ script:
? lv_color_hex(0x315843) ? lv_color_hex(0x315843)
: lv_color_hex(0x28313D); : 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: - lvgl.widget.update:
id: security_external_garage_light_button id: security_external_garage_light_button
bg_color: !lambda |- bg_color: !lambda |-
@@ -3291,8 +3325,6 @@ script:
); );
then: then:
- script.execute: refresh_security_camera_buttons
- if: - if:
condition: condition:
lambda: |- lambda: |-
@@ -5271,43 +5303,48 @@ lvgl:
- script.execute: release_atto_lock_optimistic - script.execute: release_atto_lock_optimistic
# Red alert background only; hidden completely while not charging.
- obj: - obj:
id: atto_charging_status id: atto_charging_status
x: 766 x: 766
y: 22 y: 22
width: 220 width: 220
height: 92 height: 92
bg_color: 0x111923 bg_color: 0xD32F2F
bg_opa: COVER bg_opa: COVER
border_width: 0 border_width: 0
outline_width: 0
shadow_width: 0
radius: 17 radius: 17
clickable: false clickable: false
widgets: hidden: true
- label:
x: 17
y: 31
text: "\U000F0084"
text_font: font_mdi_vehicle
text_color: 0xFFFFFF
- label: # Sibling labels use the same absolute coordinates as the other data.
x: 57 - label:
y: 9 x: 783
width: 145 y: 53
text: "Atto Charging" text: "\U000F0084"
text_font: font_small text_font: font_mdi_vehicle
text_align: CENTER text_color: 0xFFFFFF
text_color: 0xAEB8C4
- label: - label:
id: atto_charging_state_label x: 823
x: 57 y: 31
y: 38 width: 145
width: 145 text: "Atto Charging"
text: "Off" text_font: font_small
text_font: font_vehicle_bold text_align: CENTER
text_align: CENTER text_color: 0xAEB8C4
text_color: 0xFFFFFF
- 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: - button:
id: atto_schedule_button id: atto_schedule_button
@@ -6673,9 +6710,15 @@ lvgl:
text: "Doorbell" text: "Doorbell"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 1; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6698,9 +6741,15 @@ lvgl:
text: "Front Door" text: "Front Door"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 2; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6723,9 +6772,15 @@ lvgl:
text: "Driveway" text: "Driveway"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 3; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6748,9 +6803,15 @@ lvgl:
text: "Garage" text: "Garage"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 4; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6773,9 +6834,15 @@ lvgl:
text: "Caravan" text: "Caravan"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 5; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6798,9 +6865,15 @@ lvgl:
text: "Bike Shed" text: "Bike Shed"
text_font: font_small text_font: font_small
text_color: 0xFFFFFF text_color: 0xFFFFFF
on_click: on_press:
- lambda: |- - lambda: |-
id(security_camera_selection) = 6; 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_buttons
- script.execute: refresh_security_camera - script.execute: refresh_security_camera
@@ -6822,8 +6895,9 @@ lvgl:
bg_color: 0x416F55 bg_color: 0x416F55
widgets: widgets:
- label: - label:
id: security_downstairs_guests_label
align: CENTER align: CENTER
text: "Downstairs Guests\nOccupied (Hold)" text: "Downstairs Guests\nNot Occupied (Hold)"
text_font: font_small text_font: font_small
text_align: CENTER text_align: CENTER
text_color: 0xFFFFFF text_color: 0xFFFFFF
@@ -6834,23 +6908,28 @@ lvgl:
data: data:
entity_id: "${downstairs_guests_occupied_entity}" entity_id: "${downstairs_guests_occupied_entity}"
- button: - obj:
id: security_future_2_button id: security_garage_door_state
x: 25 x: 25
y: 190 y: 190
width: 290 width: 290
height: 70 height: 70
bg_color: 0x28313D bg_color: 0x315843
bg_opa: COVER bg_opa: COVER
border_width: 2 border_width: 2
border_color: 0x445365 border_color: 0x548C6C
outline_width: 0
shadow_width: 0
radius: 16 radius: 16
clickable: false
widgets: widgets:
- label: - label:
id: security_garage_door_state_label
align: CENTER align: CENTER
text: "Future2" text: "Garage Door State\nClosed"
text_font: font_button text_font: font_small
text_color: 0x8D98A6 text_align: CENTER
text_color: 0xFFFFFF
- button: - button:
id: security_future_3_button id: security_future_3_button