From 703b5117df76ccba7ce7d67c437a02e1a6ea1f24 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Thu, 12 Feb 2026 14:58:46 -0500 Subject: [PATCH] Add configuration for Declan's A1 Camera - Created a new YAML configuration file for the Declan A1 camera. - Configured ESP32 settings, including WiFi, API, OTA, and logging. - Set up I2C for camera communication and defined camera parameters. - Enabled web server for streaming and snapshot modes. - Added a GPIO switch for camera flash control. --- Cameras/declan-a1-camera.yaml | 80 ++ Home-Assistant-Remotes/ha-remote-1.yml | 1631 ++++++++++++++++++++++-- 2 files changed, 1594 insertions(+), 117 deletions(-) create mode 100644 Cameras/declan-a1-camera.yaml diff --git a/Cameras/declan-a1-camera.yaml b/Cameras/declan-a1-camera.yaml new file mode 100644 index 0000000..89e3fe3 --- /dev/null +++ b/Cameras/declan-a1-camera.yaml @@ -0,0 +1,80 @@ +substitutions: + device_name: declan-a1-camera + friendly_name: "Declan's A1 Camera" + +esphome: + name: ${device_name} + friendly_name: ${friendly_name} + +esp32: + board: esp32dev + framework: + type: esp-idf + #cpu_frequency: 240MHZ + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: !secret api_encryption_key + +ota: + - platform: esphome + password: !secret ota_password + +wifi: + ssid: !secret wifi_iot_ssid + password: !secret wifi_password + ap: + ssid: "${friendly_name} Fallback" + password: !secret fallback_password + +captive_portal: + +i2c: + - id: camera_i2c + sda: GPIO26 + scl: GPIO27 + +psram: + mode: quad + speed: 80MHz + +esp32_camera: + external_clock: + pin: GPIO0 + frequency: 20MHz + i2c_id: camera_i2c + data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35] + vsync_pin: GPIO25 + href_pin: GPIO23 + pixel_clock_pin: GPIO22 + power_down_pin: GPIO32 + resolution: 800x600 + jpeg_quality: 15 + vertical_flip: False + horizontal_mirror: False + max_framerate: 20 fps + idle_framerate: 0.05 fps + + # Image settings + name: ${device_name} + brightness: 1 + #contrast: 0 + agc_gain_ceiling: 2X + agc_mode: MANUAL + agc_value: 5 + # ... + +esp32_camera_web_server: + - port: 80 + mode: STREAM + - port: 8080 + mode: SNAPSHOT + +switch: + - platform: gpio + name: "${device_name}-flash" + pin: 4 \ No newline at end of file diff --git a/Home-Assistant-Remotes/ha-remote-1.yml b/Home-Assistant-Remotes/ha-remote-1.yml index f3ec731..23d4f41 100644 --- a/Home-Assistant-Remotes/ha-remote-1.yml +++ b/Home-Assistant-Remotes/ha-remote-1.yml @@ -10,7 +10,6 @@ esphome: then: - light.turn_on: ha_remote_backlight - lvgl.page.show: home - - component.update: battery_voltage - lambda: |- id(last_activity_ms) = millis(); @@ -34,7 +33,7 @@ ota: wifi: ssid: !secret wifi_iot_ssid password: !secret wifi_password - power_save_mode: LIGHT + power_save_mode: NONE fast_connect: true # Enable fallback hotspot (captive portal) in case wifi connection fails @@ -42,9 +41,12 @@ wifi: ssid: "${friendly_name} Fallback" password: !secret fallback_password +captive_portal: + psram: mode: octal + speed: 80MHz i2c: sda: 8 @@ -99,37 +101,22 @@ interval: - lambda: |- if (id(last_activity_ms) == 0) id(last_activity_ms) = millis(); - # Turn off backlight ONCE at 15 seconds idle (no spamming every second) + # Turn off backlight ONCE at 2 minutes idle. - if: condition: lambda: |- const uint32_t idle_s = (millis() - id(last_activity_ms)) / 1000; - return idle_s == 15; + return idle_s == 120; then: - light.turn_off: ha_remote_backlight - # Deep sleep after 60 seconds idle - - if: - condition: - lambda: |- - const uint32_t idle_s = (millis() - id(last_activity_ms)) / 1000; - return idle_s >= 60; - then: - - deep_sleep.enter: deep_sleep_ctrl - -deep_sleep: - id: deep_sleep_ctrl - esp32_ext1_wakeup: - pins: - - 4 - mode: ANY_LOW - # --- Display --- display: - platform: mipi_rgb model: ESP32-S3-TOUCH-LCD-7-800X480 id: main_display update_interval: never + auto_clear_enabled: false reset_pin: ch422g: ch422g_hub number: 3 @@ -140,7 +127,7 @@ display: touchscreen: platform: gt911 id: touch_panel - update_interval: 50ms + update_interval: 120ms reset_pin: ch422g: ch422g_hub number: 1 @@ -153,53 +140,185 @@ touchscreen: - light.turn_on: ha_remote_backlight # --- LVGL UI --- -sensor: - # Waveshare routes battery sensing to EXIO_ADC (GPIO14) through a resistor divider. - # Divider on schematic is 470k/100k, so scale ADC by (470+100)/100 = 5.7. - - platform: adc - id: battery_voltage - name: "HA Remote Battery Voltage" - pin: GPIO14 - attenuation: auto - update_interval: 30s - device_class: voltage - state_class: measurement - unit_of_measurement: V - accuracy_decimals: 2 - filters: - - multiply: 5.7 - - median: - window_size: 7 - send_every: 3 - send_first_at: 1 - - - platform: copy - source_id: battery_voltage - name: "HA Remote Battery Level" - id: battery_level - device_class: battery - state_class: measurement - unit_of_measurement: "%" - accuracy_decimals: 0 - filters: - - lambda: |- - float pct = (x - 3.20f) * 100.0f / (4.20f - 3.20f); - if (pct < 0.0f) return 0.0f; - if (pct > 100.0f) return 100.0f; - return pct; - on_value: - then: - - lambda: |- - if (id(battery_label) == nullptr) return; - char txt[24]; - snprintf(txt, sizeof(txt), "Battery: %.0f%%", x); - lv_label_set_text(id(battery_label), txt); +# Note: On ESP32-S3-Touch-LCD-7, GPIO14 is used by the RGB display bus, +# so it cannot be reused as ADC for battery telemetry in this display mode. text_sensor: - platform: wifi_info ip_address: name: "HA Remote IP" id: ip_addr + - platform: homeassistant + id: ts_family_room_tv_stand + entity_id: light.family_room_tv_stand + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_family_room_tv_stand + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_family_room_tv_stand); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_small_family_room_lamp + entity_id: light.small_family_room_lamp + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_small_family_room_lamp + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_small_family_room_lamp); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_living_room_lamp_1 + entity_id: light.living_room_lamp_1 + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_family_room_standing_lamp + state: + checked: !lambda return x == "on"; + - lvgl.widget.update: + id: btn_living_room_standing_lamp + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn1 = id(btn_family_room_standing_lamp); + auto *btn2 = id(btn_living_room_standing_lamp); + const uint32_t count1 = lv_obj_get_child_cnt(btn1); + for (uint32_t i = 0; i < count1; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn1, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + const uint32_t count2 = lv_obj_get_child_cnt(btn2); + for (uint32_t i = 0; i < count2; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn2, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_living_room_light_2 + entity_id: light.living_room_light_2 + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_living_room_main_light + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_living_room_main_light); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_patio_light_1 + entity_id: light.patio_light_1 + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_living_room_patio_light + state: + checked: !lambda return x == "on"; + - lvgl.widget.update: + id: btn_outside_patio_light + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn1 = id(btn_living_room_patio_light); + auto *btn2 = id(btn_outside_patio_light); + const uint32_t count1 = lv_obj_get_child_cnt(btn1); + for (uint32_t i = 0; i < count1; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn1, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + const uint32_t count2 = lv_obj_get_child_cnt(btn2); + for (uint32_t i = 0; i < count2; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn2, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_kitchen_sink_light + entity_id: light.kitchen_sink_light + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_kitchen_sink_light + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_kitchen_sink_light); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_office_lamp_2 + entity_id: light.office_lamp_2 + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_office_lamp + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_office_lamp); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_office_led_strip + entity_id: light.led_strip_controller_led_strip_controller + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_office_led_strip + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_office_led_strip); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } + - platform: homeassistant + id: ts_garage_cam_light + entity_id: light.esp32_saturn4_cam_esp32_saturn4_cam_light + internal: true + on_value: + then: + - lvgl.widget.update: + id: btn_garage_cam_light + state: + checked: !lambda return x == "on"; + - lambda: |- + const lv_color_t text_color = (x == "on") ? lv_color_hex(0x000000) : lv_color_hex(0xEAF2FF); + auto *btn = id(btn_garage_cam_light); + const uint32_t count = lv_obj_get_child_cnt(btn); + for (uint32_t i = 0; i < count; i++) { + lv_obj_set_style_text_color(lv_obj_get_child(btn, i), text_color, LV_PART_MAIN | LV_STATE_DEFAULT); + } lvgl: displays: @@ -208,9 +327,29 @@ lvgl: - touch_panel disp_bg_color: 0x0A1020 style_definitions: + - id: glass_orb_cool + bg_color: 0x7EC6FF + bg_opa: 0% + radius: 120 + border_width: 0 + shadow_color: 0x7EC6FF + shadow_width: 42 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 0 + - id: glass_orb_warm + bg_color: 0xFFB8D0 + bg_opa: 0% + radius: 120 + border_width: 0 + shadow_color: 0xFFB8D0 + shadow_width: 42 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 0 - id: glass_header bg_color: 0x1A2740 - bg_opa: 70% + bg_opa: 94% border_color: 0xA7C8FF border_width: 1 border_opa: 35% @@ -218,113 +357,189 @@ lvgl: pad_all: 0 shadow_color: 0x061022 shadow_width: 22 - shadow_opa: 40% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 - id: glass_chip bg_color: 0xCFE1FF - bg_opa: 28% + bg_opa: 92% border_color: 0xFFFFFF border_width: 1 border_opa: 45% radius: 18 pad_all: 0 + - id: glass_tile_title + text_opa: 100% + - id: glass_tile_meta + text_opa: 96% + - id: glass_tile_icon + text_opa: 100% + - id: glass_toggle_blue + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x091529 + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 + - id: glass_toggle_pink + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x1A0E2B + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 + - id: glass_toggle_red + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x2A0A12 + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 + - id: glass_toggle_amber + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x2A1A08 + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 + - id: glass_toggle_green + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x0B2018 + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 + - id: glass_toggle_violet + bg_color: 0x2C364A + bg_opa: 92% + border_color: 0x90A4C3 + border_width: 1 + border_opa: 35% + radius: 24 + shadow_color: 0x1A1230 + shadow_width: 24 + shadow_opa: 0% + shadow_ofs_x: 0 + shadow_ofs_y: 8 - id: glass_tile_blue bg_color: 0x7BB8FF - bg_opa: 30% + bg_opa: 92% border_color: 0xE6F1FF border_width: 1 border_opa: 35% radius: 24 shadow_color: 0x091529 shadow_width: 24 - shadow_opa: 35% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xF4F8FF - pressed: - bg_opa: 46% - border_opa: 65% - id: glass_tile_pink bg_color: 0xD99CFF - bg_opa: 30% + bg_opa: 92% border_color: 0xF7E7FF border_width: 1 border_opa: 35% radius: 24 shadow_color: 0x1A0E2B shadow_width: 24 - shadow_opa: 35% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xFFF8FF - pressed: - bg_opa: 46% - border_opa: 65% - id: glass_tile_amber bg_color: 0xFFD29A - bg_opa: 30% + bg_opa: 92% border_color: 0xFFF0D9 border_width: 1 border_opa: 35% radius: 24 shadow_color: 0x2A1A08 shadow_width: 24 - shadow_opa: 35% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xFFF9EE - pressed: - bg_opa: 46% - border_opa: 65% - id: glass_tile_green bg_color: 0x9BE2C6 - bg_opa: 30% + bg_opa: 92% border_color: 0xE4FFF3 border_width: 1 border_opa: 35% radius: 24 shadow_color: 0x0B2018 shadow_width: 24 - shadow_opa: 35% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xF3FFF9 - pressed: - bg_opa: 46% - border_opa: 65% - id: glass_tile_red bg_color: 0xFF9FAF - bg_opa: 34% + bg_opa: 92% border_color: 0xFFE8EC border_width: 1 border_opa: 38% radius: 24 shadow_color: 0x2A0A12 shadow_width: 24 - shadow_opa: 36% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xFFF5F7 - pressed: - bg_opa: 50% - border_opa: 70% - id: glass_tile_violet bg_color: 0xB8A8FF - bg_opa: 30% + bg_opa: 92% border_color: 0xF0EAFF border_width: 1 border_opa: 35% radius: 24 shadow_color: 0x1A1230 shadow_width: 24 - shadow_opa: 35% + shadow_opa: 0% shadow_ofs_x: 0 shadow_ofs_y: 8 text_color: 0xF7F3FF - pressed: - bg_opa: 46% - border_opa: 65% + - id: room_nav_btn + bg_color: 0x22324A + bg_opa: 96% + border_color: 0x8FB3E8 + border_width: 1 + border_opa: 35% + radius: 12 + text_color: 0xF2F7FF + - id: room_stub_card + bg_color: 0x1A2740 + bg_opa: 96% + border_color: 0xA7C8FF + border_width: 1 + border_opa: 35% + radius: 20 + pad_all: 0 theme: label: text_color: 0xEAF2FF @@ -344,73 +559,154 @@ lvgl: - label: id: status_label x: 22 - y: 14 + y: 12 text: "Family Room" - label: x: 22 - y: 46 + y: 42 + text: "Liquid Glass Control" + - label: + x: 22 + y: 62 text: "Quick scenes and lighting controls" - obj: - x: 594 - y: 16 - width: 160 - height: 52 + x: 560 + y: 12 + width: 194 + height: 58 styles: glass_chip widgets: - label: id: battery_label align: center - text: "Battery: --%" + text: " n/a" - label: x: 22 y: 108 text: "Tap any card. Screen sleeps after 60s idle." - button: + id: btn_family_room_tv_stand x: 24 y: 138 width: 244 height: 136 - styles: glass_tile_blue + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 on_click: - homeassistant.service: service: light.toggle data: - entity_id: light.living_room + entity_id: light.family_room_tv_stand widgets: - label: - align: center - text: "Living Room\nLights" + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "TV Stand" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" - button: + id: btn_small_family_room_lamp x: 278 y: 138 width: 244 height: 136 - styles: glass_tile_pink + checkable: true + styles: glass_toggle_pink + checked: + bg_color: 0xB22FD9 + bg_opa: 100% + border_color: 0xFFDEFF + border_opa: 90% + text_color: 0x000000 on_click: - homeassistant.service: service: light.toggle data: - entity_id: light.kitchen + entity_id: light.small_family_room_lamp widgets: - label: - align: center - text: "Kitchen\nLights" + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Small Lamp" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" - button: + id: btn_family_room_standing_lamp x: 532 y: 138 width: 244 height: 136 - styles: glass_tile_red + checkable: true + styles: glass_toggle_red + checked: + bg_color: 0xD83452 + bg_opa: 100% + border_color: 0xFFE2E8 + border_opa: 90% + text_color: 0x000000 on_click: - homeassistant.service: - service: script.turn_off_everything + service: light.toggle + data: + entity_id: light.living_room_lamp_1 widgets: - label: - align: center - text: "All Off" + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Standing Lamp" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" - button: x: 24 @@ -425,8 +721,25 @@ lvgl: entity_id: scene.movie_time widgets: - label: - align: center + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "SCENE" + - label: + x: 18 + y: 56 + styles: glass_tile_title text: "Movie Time" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Dim and set mood" - button: x: 278 @@ -441,8 +754,25 @@ lvgl: entity_id: scene.good_night widgets: - label: - align: center + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "SCENE" + - label: + x: 18 + y: 56 + styles: glass_tile_title text: "Good Night" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Evening shutdown" - button: x: 532 @@ -452,7 +782,1074 @@ lvgl: styles: glass_tile_violet on_click: - light.toggle: ha_remote_backlight + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "DISPLAY" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Backlight" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Manual toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home widgets: - label: align: center - text: "Backlight\nToggle" + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: living_room + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Living Room" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your lights, scenes, and media controls here" + - button: + id: btn_living_room_main_light + x: 24 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.living_room_light_2 + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Main Light" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + id: btn_living_room_standing_lamp + x: 278 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_pink + checked: + bg_color: 0xB22FD9 + bg_opa: 100% + border_color: 0xFFDEFF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.living_room_lamp_1 + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Standing Lamp" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + id: btn_living_room_patio_light + x: 532 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_amber + checked: + bg_color: 0xC97700 + bg_opa: 100% + border_color: 0xFFF1D6 + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.patio_light_1 + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Patio Light" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: kitchen_page + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Kitchen" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your kitchen controls here" + - button: + id: btn_kitchen_sink_light + x: 24 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.kitchen_sink_light + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Sink Light" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: upstairs + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Upstairs" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your upstairs controls here" + - obj: + x: 24 + y: 122 + width: 752 + height: 292 + styles: room_stub_card + widgets: + - label: + align: center + text: "No upstairs light entities found yet" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: office + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Office (Basement)" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your office controls here" + - button: + id: btn_office_lamp + x: 24 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.office_lamp_2 + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Office Lamp 2" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + id: btn_office_led_strip + x: 278 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_pink + checked: + bg_color: 0xB22FD9 + bg_opa: 100% + border_color: 0xFFDEFF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.led_strip_controller_led_strip_controller + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "LED Strip" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: garage + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Garage" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your garage controls here" + - button: + id: btn_garage_cam_light + x: 24 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.esp32_saturn4_cam_esp32_saturn4_cam_light + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Saturn Cam Light" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside" + + - id: outside + widgets: + - obj: + x: 14 + y: 14 + width: 772 + height: 84 + styles: glass_header + widgets: + - label: + x: 22 + y: 12 + text: "Outside" + - label: + x: 22 + y: 42 + text: "Room Controls" + - label: + x: 22 + y: 62 + text: "Add your outdoor controls here" + - button: + id: btn_outside_patio_light + x: 24 + y: 122 + width: 244 + height: 136 + checkable: true + styles: glass_toggle_blue + checked: + bg_color: 0x0B7DFA + bg_opa: 100% + border_color: 0xEAF4FF + border_opa: 90% + text_color: 0x000000 + on_click: + - homeassistant.service: + service: light.toggle + data: + entity_id: light.patio_light_1 + widgets: + - label: + x: 204 + y: 16 + styles: glass_tile_icon + text: "" + - label: + x: 18 + y: 16 + styles: glass_tile_meta + text: "LIGHT" + - label: + x: 18 + y: 56 + styles: glass_tile_title + text: "Patio Light" + - label: + x: 18 + y: 90 + styles: glass_tile_meta + text: "Tap to toggle" + - button: + x: 20 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: home + widgets: + - label: + align: center + text: "Family" + - button: + x: 130 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: living_room + widgets: + - label: + align: center + text: "Living" + - button: + x: 240 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: kitchen_page + widgets: + - label: + align: center + text: "Kitchen" + - button: + x: 350 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: upstairs + widgets: + - label: + align: center + text: "Upstairs" + - button: + x: 460 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: office + widgets: + - label: + align: center + text: "Office" + - button: + x: 570 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: garage + widgets: + - label: + align: center + text: "Garage" + - button: + x: 680 + y: 430 + width: 100 + height: 40 + styles: room_nav_btn + on_click: + - lvgl.page.show: outside + widgets: + - label: + align: center + text: "Outside"