Edit esp-bedside-panel.yaml
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# V1.15 2026-07-17 Changed Garage Lights to an imported controllable HA switch
|
||||
# V1.14 2026-07-17 Changed Garage Lights to a direct click-triggered HA toggle
|
||||
# V1.13 2026-07-17 Corrected Garage Lights switching and removed Atto value containers
|
||||
# V1.12 2026-07-17 Re-centred Atto tiles, swapped status rows and simplified value tiles
|
||||
@@ -113,12 +114,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. Direct Garage Lights click control and borderless Atto values. (Layout V1.1)"
|
||||
description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside control panel. Garage Lights controlled through an imported Home Assistant switch. (Layout V1.1)"
|
||||
device_area: "Bedroom"
|
||||
|
||||
# Project Naming
|
||||
project_name: "Guition.JC1060P470C_I_W_Y"
|
||||
project_version: "v1.14"
|
||||
project_version: "v1.15"
|
||||
|
||||
# Passwords & Secrets
|
||||
api_key: !secret esp-api_key
|
||||
@@ -846,23 +847,6 @@ binary_sensor:
|
||||
? lv_color_hex(0xA87500)
|
||||
: lv_color_hex(0x28313D);
|
||||
|
||||
- platform: homeassistant
|
||||
id: ha_garage_lights
|
||||
entity_id: "${garage_lights_entity}"
|
||||
internal: true
|
||||
on_state:
|
||||
then:
|
||||
- lvgl.widget.update:
|
||||
id: garage_lights_button
|
||||
bg_color: !lambda |-
|
||||
if (id(ha_garage_door).state) {
|
||||
return lv_color_hex(0xC25B13);
|
||||
}
|
||||
|
||||
return x
|
||||
? lv_color_hex(0xB88918)
|
||||
: lv_color_hex(0x28313D);
|
||||
|
||||
- platform: homeassistant
|
||||
id: ha_garage_door
|
||||
entity_id: "${garage_door_entity}"
|
||||
@@ -1932,6 +1916,46 @@ interval:
|
||||
then:
|
||||
- script.execute: refresh_security_camera
|
||||
|
||||
#:########################################################################################:#
|
||||
# HOME ASSISTANT SWITCH COMPONENT:
|
||||
# https://esphome.io/components/switch/homeassistant/
|
||||
#:########################################################################################:#
|
||||
switch:
|
||||
- platform: homeassistant
|
||||
id: ha_garage_lights
|
||||
entity_id: "${garage_lights_entity}"
|
||||
internal: true
|
||||
|
||||
on_turn_on:
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "Garage Lights HA switch reports ON"
|
||||
|
||||
- lvgl.widget.update:
|
||||
id: garage_lights_button
|
||||
bg_color: !lambda |-
|
||||
if (id(ha_garage_door).state) {
|
||||
return lv_color_hex(0xC25B13);
|
||||
}
|
||||
|
||||
return lv_color_hex(0xB88918);
|
||||
|
||||
on_turn_off:
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "Garage Lights HA switch reports OFF"
|
||||
|
||||
- lvgl.widget.update:
|
||||
id: garage_lights_button
|
||||
bg_color: !lambda |-
|
||||
if (id(ha_garage_door).state) {
|
||||
return lv_color_hex(0xC25B13);
|
||||
}
|
||||
|
||||
return lv_color_hex(0x28313D);
|
||||
|
||||
#:########################################################################################:#
|
||||
# TEXT SENSOR COMPONENT:
|
||||
# https://esphome.io/components/text_sensor/
|
||||
@@ -2556,12 +2580,9 @@ lvgl:
|
||||
on_click:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "Garage Lights button clicked; sending HA switch.toggle"
|
||||
format: "Garage Lights button clicked; toggling imported HA switch"
|
||||
|
||||
- homeassistant.action:
|
||||
action: switch.toggle
|
||||
data:
|
||||
entity_id: "switch.esp_garagelights_garage_lights"
|
||||
- switch.toggle: ha_garage_lights
|
||||
|
||||
- button:
|
||||
id: bathroom_fan_button
|
||||
|
||||
Reference in New Issue
Block a user