mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
197 lines
5.7 KiB
YAML
197 lines
5.7 KiB
YAML
---
|
|
# Hardware: Sonoff NSPanel (EU)
|
|
# Pinout:
|
|
# GPIO2 IO2
|
|
# GPIO4 Screen power -> Screen Power (switch gpio) (inverted)
|
|
# GPIO14 Left button -> Left Button (binary_sensor gpio) (inverted)
|
|
# GPIO16 Display UART TX -> display_uart (uart tx_pin)
|
|
# GPIO17 Display UART RX -> display_uart (uart rx_pin)
|
|
# GPIO19 Relay 2 -> Dining Table Light MAIN (switch gpio)
|
|
# GPIO21 Buzzer -> buzzer_out (output ledc)
|
|
# GPIO22 Relay 1 -> Kitchen Worktop Light (switch gpio)
|
|
# GPIO23 Relay 3 (no relay, connector)
|
|
# GPIO27 Right button -> Right Button (binary_sensor gpio) (inverted)
|
|
# GPIO37 ALS (light sensor)
|
|
# GPIO38 NTC temperature (ADC) -> ntc_source (sensor adc)
|
|
substitutions:
|
|
device: nspanel-fireplace
|
|
name: Fireplace NSPanel
|
|
area: Living Room & Kitchen
|
|
comment: NSPanel
|
|
|
|
esphome:
|
|
name: mcu-${device}
|
|
friendly_name: ${name}
|
|
area: ${area}
|
|
comment: ${comment}
|
|
|
|
packages:
|
|
common: !include common/common.yaml
|
|
ipv6_only: !include common/ipv6_only.yaml
|
|
nspanel: !include
|
|
file: common/nspanel.yaml
|
|
vars:
|
|
temperature_entity: sensor.zigbee_living_room_kitchen_temperature
|
|
temperature_name: Living Room Temperature
|
|
|
|
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
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
name: Left Button
|
|
pin:
|
|
number: 14
|
|
inverted: true
|
|
on_click:
|
|
# - switch.toggle: relay_1
|
|
- min_length: 50ms
|
|
max_length: 350ms
|
|
then:
|
|
- homeassistant.action:
|
|
action: light.toggle
|
|
data:
|
|
entity_id: light.living_room
|
|
- lambda: 'id(nspanel_id).render_default_page();'
|
|
- min_length: 500ms
|
|
max_length: 2000ms
|
|
then:
|
|
- homeassistant.action:
|
|
action: light.toggle
|
|
data:
|
|
entity_id: light.worktop_lights
|
|
- lambda: 'id(nspanel_id).render_default_page();'
|
|
- lambda: 'id(nspanel_id).render_next_page();'
|
|
|
|
- platform: gpio
|
|
name: Right Button
|
|
pin:
|
|
number: 27
|
|
inverted: true
|
|
on_click:
|
|
# - switch.toggle: relay_2
|
|
- min_length: 50ms
|
|
max_length: 350ms
|
|
then:
|
|
- homeassistant.action:
|
|
action: light.toggle
|
|
data:
|
|
entity_id: light.dining_table
|
|
- lambda: 'id(nspanel_id).render_default_page();'
|
|
- min_length: 500ms
|
|
max_length: 2000ms
|
|
then:
|
|
- homeassistant.action:
|
|
action: light.toggle
|
|
data:
|
|
entity_id: light.mcu_kitchen_stove
|
|
- lambda: 'id(nspanel_id).render_default_page();'
|
|
- lambda: 'id(nspanel_id).render_next_page();'
|
|
|
|
switch:
|
|
- platform: gpio
|
|
name: Kitchen Worktop Light
|
|
id: relay_1
|
|
pin:
|
|
number: 22
|
|
|
|
- platform: gpio
|
|
name: Dining Table Light MAIN
|
|
id: relay_2
|
|
entity_category: config
|
|
pin:
|
|
number: 19
|