mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 09:06:52 +01:00
nspanel: all panels on nspanel-terminal with the LVGL UI
The shared UI (home, light detail, status/boot page, notifications, OTA progress, display hardware) moves from mcu-nspanel-dev.yaml into common/nspanel_terminal/panel.yaml. office-r, patio, fireplace, office-j and bedroom move from nspanel_lovelace to it with the pages, tiles and buttons of their former cards. thermostat.yaml carries its page and takes an id prefix, so a panel can have more than one (fireplace). The thermostat returns to the HA target 5 s after sending, in case HA rejects the change. Idle timeout 15 s.
This commit is contained in:
1 parent
5976d81d1c
commit
9b5229323f
9 files changed
+1609
-1751
No files matched your search
+54
-104
@@ -17,7 +17,10 @@ substitutions:
|
||||
device: nspanel-fireplace
|
||||
name: Fireplace NSPanel
|
||||
area: Living Room & Kitchen
|
||||
comment: NSPanel
|
||||
comment: NSPanel (nspanel-terminal)
|
||||
brightness: "80"
|
||||
# backlight after 15 s idle
|
||||
dim_brightness: "20"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
@@ -28,109 +31,54 @@ esphome:
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
ipv6_only: !include common/ipv6_only.yaml
|
||||
nspanel: !include
|
||||
file: common/nspanel.yaml
|
||||
panel: !include
|
||||
file: common/nspanel_terminal/panel.yaml
|
||||
vars:
|
||||
temperature_entity: sensor.zigbee_living_room_kitchen_temperature
|
||||
temperature_name: Living Room Temperature
|
||||
first_page: page_kitchen_living
|
||||
last_page: page_thermostat_room
|
||||
# Grid page tiles: each package adds its tile to the page and fills it in this order
|
||||
# Kuchyňa / Obývačka
|
||||
l_kitchen: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_kitchen, name: "Kuchyňa", entity: light.kitchen, icon: "\U000F0769", dim: true, kmin: 2700, hs: false}}
|
||||
l_dining: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_dining, name: "Stôl", entity: light.dining_table, icon: "\U000F0769", dim: true, kmin: 2700, hs: false}}
|
||||
l_living: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_living, name: "Gauč", entity: light.living_room, icon: "\U000F0769", dim: true, kmin: 2700, hs: false}}
|
||||
l_tv: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_tv, name: "TV", entity: light.mcu_tv_light_strip, icon: "\U000F1051", dim: true, kmin: 0, hs: false}}
|
||||
l_dining_amb: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_dining_amb, name: "(Stôl)", entity: light.dining_table_ambilight, icon: "\U000F18DE", dim: true, kmin: 1700, hs: true}}
|
||||
l_living_amb: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen_living, id: l_living_amb, name: "(Gauč)", entity: light.living_room_ambilight, icon: "\U000F18DE", dim: true, kmin: 1700, hs: true}}
|
||||
# Kuchyňa
|
||||
l_worktop: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen, id: l_worktop, name: "Linka", entity: light.worktop_lights, icon: "\U000F181C", dim: true, kmin: 2000, hs: false}}
|
||||
l_stove: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_kitchen, id: l_stove, name: "Sporák", entity: light.mcu_kitchen_stove, icon: "\U000F04DE", dim: true, kmin: 2000, hs: false}}
|
||||
# Von
|
||||
l_patio: !include {file: common/nspanel_terminal/light_tile.yaml, vars: {page: page_outside, id: l_patio, name: "Terasa", entity: light.patio_lights, icon: "\U000F1253", dim: true, kmin: 2000, hs: false}}
|
||||
s_patio_socket: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_outside, id: s_patio_socket, name: "Terasa", entity: switch.mcu_patio_relay, icon: "\U000F1108", domain: switch}}
|
||||
s_patio_back: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_outside, id: s_patio_back, name: "Vzadu", entity: switch.mcu_nspanel_patio_outside_light_back, icon: "\U000F1987", domain: switch}}
|
||||
s_shed_light: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_outside, id: s_shed_light, name: "Z. domček", entity: switch.mcu_shed_light, icon: "\U000F091D", domain: switch}}
|
||||
s_shed_socket: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_outside, id: s_shed_socket, name: "Z. domček", entity: switch.mcu_shed_socket, icon: "\U000F1108", domain: switch}}
|
||||
s_garden: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_outside, id: s_garden, name: "Záhrada", entity: switch.mcu_shed_garden_light, icon: "\U000F1987", domain: switch}}
|
||||
# Brána, robot -> page_gate_auto
|
||||
gate_open: !include {file: common/nspanel_terminal/action_tile.yaml, vars: {page: page_gate, id: gate_open, name: "Otvoriť", icon: "\U000F116A", action: button.press, entity: button.mcu_gate_open}}
|
||||
gate_close: !include {file: common/nspanel_terminal/action_tile.yaml, vars: {page: page_gate, id: gate_close, name: "Zatvoriť", icon: "\U000F0299", action: button.press, entity: button.mcu_gate_close}}
|
||||
gate_spacer: !include {file: common/nspanel_terminal/spacer_tile.yaml, vars: {page: page_gate}}
|
||||
gate: !include {file: common/nspanel_terminal/gate.yaml, vars: {page: page_gate, state: select.mcu_gate_state}}
|
||||
gate_auto: !include {file: common/nspanel_terminal/nav_tile.yaml, vars: {page: page_gate, to: page_gate_auto, icon: "\U000F06A9"}}
|
||||
gate_auto_open: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_gate_auto, id: gate_auto_open, name: "Auto-otváranie", entity: switch.mcu_gate_auto_open, icon: "\U000F1169", domain: switch}}
|
||||
gate_auto_close: !include {file: common/nspanel_terminal/switch_tile.yaml, vars: {page: page_gate_auto, id: gate_auto_close, name: "Auto-zatváranie", entity: switch.mcu_gate_auto_close, icon: "\U000F17F7", domain: switch}}
|
||||
# Kúrenie
|
||||
thermo: !include {file: common/nspanel_terminal/thermostat.yaml, vars: {id: thermo, page: page_thermostat, title: "Kúrenie - Obývačka", prev: page_gate, next: page_thermostat_room, entity: climate.bt_trv_living_room_kitchen}}
|
||||
thermo_room: !include {file: common/nspanel_terminal/thermostat.yaml, vars: {id: thermo_room, page: page_thermostat_room, title: "Kúrenie - Izba", prev: page_thermostat, next: page_status, entity: climate.bt_trv_room}}
|
||||
|
||||
nspanel_lovelace:
|
||||
cards:
|
||||
- type: cardGrid
|
||||
title: Kuchyňa / Obývačka
|
||||
entities:
|
||||
- name: Kuchyňa / Obývačka
|
||||
entity_id: light.kitchen
|
||||
icon: ceiling-light
|
||||
- name: Stôl
|
||||
entity_id: light.dining_table
|
||||
icon: ceiling-light
|
||||
- name: Gauč
|
||||
entity_id: light.living_room
|
||||
icon: ceiling-light
|
||||
- name: TV
|
||||
entity_id: light.mcu_tv_light_strip
|
||||
icon: led-strip-variant
|
||||
- name: (Stôl)
|
||||
entity_id: light.dining_table_ambilight
|
||||
icon: ceiling-light-multiple-outline
|
||||
- name: (Gauč)
|
||||
entity_id: light.living_room_ambilight
|
||||
icon: ceiling-light-multiple-outline
|
||||
|
||||
- type: cardGrid
|
||||
title: Kuchyňa
|
||||
entities:
|
||||
- name: Linka
|
||||
entity_id: light.worktop_lights
|
||||
icon: countertop
|
||||
- name: Sporák
|
||||
entity_id: light.mcu_kitchen_stove
|
||||
icon: stove
|
||||
|
||||
- type: cardGrid
|
||||
title: Von
|
||||
entities:
|
||||
- name: Terasa
|
||||
entity_id: light.patio_lights
|
||||
icon: lightbulb-group
|
||||
- name: Terasa
|
||||
entity_id: switch.mcu_patio_relay
|
||||
icon: power-socket-fr
|
||||
- name: Vzadu
|
||||
entity_id: switch.mcu_nspanel_patio_outside_light_back
|
||||
icon: light-flood-down
|
||||
- name: Z. domček
|
||||
entity_id: switch.mcu_shed_light
|
||||
icon: wall-sconce-flat
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
- name: Z. domček
|
||||
entity_id: switch.mcu_shed_socket
|
||||
icon: power-socket-fr
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
- name: Záhrada
|
||||
entity_id: switch.mcu_shed_garden_light
|
||||
icon: light-flood-down
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
|
||||
- type: cardGrid
|
||||
title: Brána
|
||||
entities:
|
||||
- name: Otvoriť
|
||||
entity_id: button.mcu_gate_open
|
||||
icon: gate-open
|
||||
- name: Zatvoriť
|
||||
entity_id: button.mcu_gate_close
|
||||
icon: gate
|
||||
- name: Automatizácia
|
||||
entity_id: navigate.card_gate_automation
|
||||
|
||||
- type: cardThermo
|
||||
title: Kúrenie
|
||||
thermo_entity_id: climate.bt_trv_living_room_kitchen
|
||||
|
||||
- type: cardThermo
|
||||
title: Kúrenie - Izba
|
||||
thermo_entity_id: climate.bt_trv_room
|
||||
|
||||
- type: cardEntities
|
||||
title: Automatizácia
|
||||
id: card_gate_automation
|
||||
hidden: true
|
||||
entities:
|
||||
- name: Auto-otváranie
|
||||
entity_id: switch.gate_auto_open
|
||||
- name: Auto-zatváranie
|
||||
entity_id: switch.gate_auto_close
|
||||
|
||||
- type: cardEntities
|
||||
title: Info
|
||||
entities:
|
||||
- name: Zariadenie
|
||||
entity_id: button.fireplace_nspanel_info
|
||||
icon: information-outline
|
||||
# the grid pages; home, status and light detail come from panel.yaml, thermostat pages from thermostat.yaml
|
||||
lvgl:
|
||||
pages:
|
||||
- <<: !include {file: common/nspanel_terminal/grid_page.yaml, vars: {id: page_kitchen_living, title: "Kuchyňa / Obývačka", prev: page_home, next: page_kitchen, skip: false}}
|
||||
- <<: !include {file: common/nspanel_terminal/grid_page.yaml, vars: {id: page_kitchen, title: "Kuchyňa", prev: page_kitchen_living, next: page_outside, skip: false}}
|
||||
- <<: !include {file: common/nspanel_terminal/grid_page.yaml, vars: {id: page_outside, title: "Von", prev: page_kitchen, next: page_gate, skip: false}}
|
||||
- <<: !include {file: common/nspanel_terminal/grid_page.yaml, vars: {id: page_gate, title: "Brána", prev: page_outside, next: page_thermostat, skip: false}}
|
||||
- <<: !include {file: common/nspanel_terminal/grid_page.yaml, vars: {id: page_gate_auto, title: "Automatizácia brány", prev: page_gate, next: page_gate, skip: true}}
|
||||
|
||||
binary_sensor:
|
||||
# short click: living room / dining table (Kuchyňa / Obývačka page), long click: worktop / stove (Kuchyňa page)
|
||||
- platform: gpio
|
||||
name: Left Button
|
||||
pin:
|
||||
@@ -145,7 +93,8 @@ binary_sensor:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.living_room
|
||||
- lambda: 'id(nspanel_id).render_default_page();'
|
||||
- lvgl.page.show: page_kitchen_living
|
||||
- script.execute: wake_screen
|
||||
- min_length: 500ms
|
||||
max_length: 2000ms
|
||||
then:
|
||||
@@ -153,8 +102,8 @@ binary_sensor:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.worktop_lights
|
||||
- lambda: 'id(nspanel_id).render_default_page();'
|
||||
- lambda: 'id(nspanel_id).render_next_page();'
|
||||
- lvgl.page.show: page_kitchen
|
||||
- script.execute: wake_screen
|
||||
|
||||
- platform: gpio
|
||||
name: Right Button
|
||||
@@ -170,7 +119,8 @@ binary_sensor:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.dining_table
|
||||
- lambda: 'id(nspanel_id).render_default_page();'
|
||||
- lvgl.page.show: page_kitchen_living
|
||||
- script.execute: wake_screen
|
||||
- min_length: 500ms
|
||||
max_length: 2000ms
|
||||
then:
|
||||
@@ -178,8 +128,8 @@ binary_sensor:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.mcu_kitchen_stove
|
||||
- lambda: 'id(nspanel_id).render_default_page();'
|
||||
- lambda: 'id(nspanel_id).render_next_page();'
|
||||
- lvgl.page.show: page_kitchen
|
||||
- script.execute: wake_screen
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
|
||||
Reference in new issue
Block a user