Add initial configuration for Family Room and Living Room remotes, and common panel hardware setup
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
# Lights-only first version for the Family Room remote.
|
||||
# Entity IDs came from the project's HA snapshot; verify them in live HA.
|
||||
|
||||
substitutions:
|
||||
device_name: family-room-remote
|
||||
friendly_name: Family Room Remote
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${friendly_name}
|
||||
|
||||
packages:
|
||||
hardware: !include panel-remote-common.yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
id: standing_lamp_state
|
||||
entity_id: light.living_room_lamp_1
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
- lvgl.widget.update:
|
||||
id: standing_lamp_button
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
- platform: homeassistant
|
||||
id: small_lamp_state
|
||||
entity_id: light.small_family_room_lamp
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
- lvgl.widget.update:
|
||||
id: small_lamp_button
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
- platform: homeassistant
|
||||
id: tv_stand_state
|
||||
entity_id: light.family_room_tv_stand
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
- lvgl.widget.update:
|
||||
id: tv_stand_button
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
|
||||
lvgl:
|
||||
on_idle:
|
||||
- timeout: 45s
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: panel_backlight
|
||||
brightness: 15%
|
||||
pages:
|
||||
- id: room_page
|
||||
widgets:
|
||||
- label:
|
||||
x: 12
|
||||
y: 8
|
||||
text: Family Room
|
||||
- button:
|
||||
id: standing_lamp_button
|
||||
x: 10
|
||||
y: 45
|
||||
width: 145
|
||||
height: 75
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: Standing Lamp
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.living_room_lamp_1
|
||||
- button:
|
||||
id: small_lamp_button
|
||||
x: 165
|
||||
y: 45
|
||||
width: 145
|
||||
height: 75
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: Small Lamp
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.small_family_room_lamp
|
||||
- button:
|
||||
id: tv_stand_button
|
||||
x: 10
|
||||
y: 135
|
||||
width: 145
|
||||
height: 75
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: TV Stand
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.family_room_tv_stand
|
||||
- button:
|
||||
x: 165
|
||||
y: 135
|
||||
width: 145
|
||||
height: 75
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: All Off
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.turn_off
|
||||
data:
|
||||
entity_id: light.living_room_lamp_1
|
||||
- homeassistant.action:
|
||||
action: light.turn_off
|
||||
data:
|
||||
entity_id: light.small_family_room_lamp
|
||||
- homeassistant.action:
|
||||
action: light.turn_off
|
||||
data:
|
||||
entity_id: light.family_room_tv_stand
|
||||
@@ -0,0 +1,98 @@
|
||||
# Lights-only first version for the Living Room remote.
|
||||
# Entity IDs came from the project's HA snapshot; verify them in live HA.
|
||||
|
||||
substitutions:
|
||||
device_name: living-room-remote
|
||||
friendly_name: Living Room Remote
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${friendly_name}
|
||||
|
||||
packages:
|
||||
hardware: !include panel-remote-common.yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
id: ceiling_light_state
|
||||
entity_id: light.living_room_light_2
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
- lvgl.widget.update:
|
||||
id: ceiling_light_button
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
- platform: homeassistant
|
||||
id: small_lamp_state
|
||||
entity_id: light.small_living_room_lamp
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
- lvgl.widget.update:
|
||||
id: small_lamp_button
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
|
||||
lvgl:
|
||||
on_idle:
|
||||
- timeout: 45s
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: panel_backlight
|
||||
brightness: 15%
|
||||
pages:
|
||||
- id: room_page
|
||||
widgets:
|
||||
- label:
|
||||
x: 12
|
||||
y: 8
|
||||
text: Living Room
|
||||
- button:
|
||||
id: ceiling_light_button
|
||||
x: 10
|
||||
y: 45
|
||||
width: 145
|
||||
height: 75
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: Main Light
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.living_room_light_2
|
||||
- button:
|
||||
id: small_lamp_button
|
||||
x: 165
|
||||
y: 45
|
||||
width: 145
|
||||
height: 75
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: Small Lamp
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.small_living_room_lamp
|
||||
- button:
|
||||
x: 10
|
||||
y: 135
|
||||
width: 300
|
||||
height: 75
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: All Lights Off
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.turn_off
|
||||
data:
|
||||
entity_id: light.living_room_light_2
|
||||
- homeassistant.action:
|
||||
action: light.turn_off
|
||||
data:
|
||||
entity_id: light.small_living_room_lamp
|
||||
@@ -0,0 +1,92 @@
|
||||
# PanelLan SC05_X / ZX2D80CE02S-V10 hardware test.
|
||||
# Target: current ESPHome with the mipi_spi octal/I80 driver.
|
||||
# This is a first-flash test, not the final Home Assistant remote UI.
|
||||
# Uses the Wi-Fi, API, and OTA secrets shared by this Home Assistant setup.
|
||||
|
||||
esphome:
|
||||
name: panel-remote-test
|
||||
friendly_name: Panel Remote Test
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
flash_size: 8MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
psram:
|
||||
mode: quad
|
||||
|
||||
logger:
|
||||
|
||||
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: Panel Remote Setup
|
||||
password: !secret fallback_password
|
||||
|
||||
captive_portal:
|
||||
|
||||
# The board's 8-bit 8080 LCD bus is handled as an octal bus by ESPHome.
|
||||
# Pins are from the Wireless-Tag WT32S3-28S PRO / ZX2D80CE02S datasheet.
|
||||
spi:
|
||||
type: octal
|
||||
id: lcd_bus
|
||||
clk_pin: GPIO17 # LCD_WR
|
||||
data_pins:
|
||||
- GPIO16 # DB0
|
||||
- GPIO40 # DB1
|
||||
- GPIO15 # DB2
|
||||
- GPIO7 # DB3
|
||||
- GPIO41 # DB4
|
||||
- GPIO42 # DB5
|
||||
- GPIO2 # DB6
|
||||
- GPIO1 # DB7
|
||||
|
||||
display:
|
||||
- platform: mipi_spi
|
||||
id: panel_display
|
||||
model: ST7789V
|
||||
spi_id: lcd_bus
|
||||
bus_mode: octal
|
||||
dc_pin: GPIO18 # LCD_RS
|
||||
reset_pin: GPIO3 # shared LCD/touch reset
|
||||
dimensions: 240x320
|
||||
data_rate: 8MHz
|
||||
show_test_card: true
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: backlight_pwm
|
||||
pin: GPIO47
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: panel_backlight
|
||||
name: Screen Backlight
|
||||
output: backlight_pwm
|
||||
restore_mode: ALWAYS_ON
|
||||
default_transition_length: 0s
|
||||
|
||||
i2c:
|
||||
id: touch_bus
|
||||
sda: GPIO8
|
||||
scl: GPIO9
|
||||
scan: true
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
id: panel_touch
|
||||
i2c_id: touch_bus
|
||||
display: panel_display
|
||||
interrupt_pin: GPIO48
|
||||
on_touch:
|
||||
- logger.log: Touch detected
|
||||
@@ -0,0 +1,80 @@
|
||||
# Shared SC05_X / ZX2D80CE02S hardware for both room remotes.
|
||||
# Keep this file beside the room YAML files in ESPHome.
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
flash_size: 8MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
psram:
|
||||
mode: quad
|
||||
|
||||
logger:
|
||||
|
||||
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} Setup
|
||||
password: !secret fallback_password
|
||||
|
||||
captive_portal:
|
||||
|
||||
spi:
|
||||
type: octal
|
||||
id: lcd_bus
|
||||
clk_pin: GPIO17
|
||||
data_pins: [GPIO16, GPIO40, GPIO15, GPIO7, GPIO41, GPIO42, GPIO2, GPIO1]
|
||||
|
||||
display:
|
||||
- platform: mipi_spi
|
||||
id: panel_display
|
||||
model: ST7789V
|
||||
spi_id: lcd_bus
|
||||
bus_mode: octal
|
||||
dc_pin: GPIO18
|
||||
reset_pin: GPIO3
|
||||
dimensions: 240x320
|
||||
rotation: 90
|
||||
data_rate: 8MHz
|
||||
auto_clear_enabled: false
|
||||
update_interval: never
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: backlight_pwm
|
||||
pin: GPIO47
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: panel_backlight
|
||||
name: Screen Backlight
|
||||
output: backlight_pwm
|
||||
restore_mode: ALWAYS_ON
|
||||
default_transition_length: 0s
|
||||
|
||||
i2c:
|
||||
id: touch_bus
|
||||
sda: GPIO8
|
||||
scl: GPIO9
|
||||
scan: true
|
||||
|
||||
touchscreen:
|
||||
- platform: ft5x06
|
||||
id: panel_touch
|
||||
i2c_id: touch_bus
|
||||
display: panel_display
|
||||
interrupt_pin: GPIO48
|
||||
on_touch:
|
||||
- light.turn_on:
|
||||
id: panel_backlight
|
||||
brightness: 70%
|
||||
Reference in New Issue
Block a user