Files
esphome-configs/mcu-nspanel-office-r.yaml
T
randy 29b375df68
CI / ESPHome config validation (push) Failing after 7s
CI / YAML lint (push) Failing after 37s
nspanel: move shared config to common/nspanel.yaml, add TFT version sensor
2026-09-28 20:51:05 +02:00

154 lines
3.5 KiB
YAML

---
substitutions:
device: nspanel-office-r
name: Office R NSPanel
area: Office R
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_office_r_temperature
ntc_reference_temperature: 22°C
script:
- id: geiger_click
mode: restart
then:
- output.turn_on: buzzer_out
- output.ledc.set_frequency:
id: buzzer_out
frequency: 4000Hz
- output.set_level:
id: buzzer_out
level: 50%
- delay: 1ms
- output.turn_off: buzzer_out
- delay: !lambda |-
return esphome::random_uint32() % 450 + 50;
- script.execute: geiger_click
nspanel_lovelace:
cards:
- type: cardGrid
title: Romanko
entities:
- name: Svetlo
entity_id: light.mcu_nspanel_office_r_light
icon: wall-sconce-flat
- name: LED pásik
entity_id: light.office_r_desk_strip
icon: led-strip-variant
- entity_id: delete
- name: Monitor
entity_id: light.office_r_display_lamp
icon: monitor-star
- name: (Monitor)
entity_id: light.office_r_display_lamp_ambilight
icon: monitor-star
- 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_office_r
- 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
binary_sensor:
- platform: gpio
name: Left Button
pin:
number: 14
inverted: true
on_click:
- homeassistant.action:
action: light.toggle
data:
entity_id: light.office_r_desk_strip
- lambda: 'id(nspanel_id).render_default_page();'
- platform: gpio
name: Right Button
pin:
number: 27
inverted: true
on_click:
- light.toggle: light_1
- lambda: 'id(nspanel_id).render_default_page();'
output:
- id: relay_1
platform: gpio
pin:
number: 22
# - id: relay_2
# platform: gpio
# pin:
# number: 19
light:
- platform: esp32_rmt_led_strip
name: Presence Light
id: neo
channel_colors: GRB
pin: 23
num_leds: 3
chipset: SK6812
effects:
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 1s
update_interval: 1s
- pulse:
name: "Slow Pulse"
transition_length: 2s # defaults to 1s
update_interval: 2s
- platform: binary
name: Light
id: light_1
output: relay_1
restore_mode: RESTORE_DEFAULT_OFF
switch:
- platform: gpio
# name: Relay 2
id: relay_2
pin:
number: 19
- platform: template
name: "Geiger Counter"
optimistic: True
turn_on_action:
- script.execute: geiger_click
turn_off_action:
- script.stop: geiger_click