65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
esphome:
|
|
name: kitchen-hood
|
|
friendly_name: Kitchen Hood
|
|
|
|
esp8266:
|
|
board: esp01_1m
|
|
|
|
wifi:
|
|
# --- SRE ANCHOR ---
|
|
# Adres IP zarezerwowany w MikroTiku dla VLAN 20 [cite: 2025-12-14]
|
|
use_address: 192.168.20.58
|
|
|
|
min_auth_mode: WPA2
|
|
networks:
|
|
# 1. Priorytet: Sieć IoT (VLAN 20)
|
|
- ssid: !secret wifi_ssid_iot
|
|
password: !secret wifi_pw_iot
|
|
|
|
ap:
|
|
ssid: "kitchen-hood-fallback"
|
|
password: !secret fallback_ap_password
|
|
|
|
packages:
|
|
common_core: !include packages/common_core.yaml
|
|
|
|
web_server:
|
|
port: 80
|
|
|
|
status_led:
|
|
pin:
|
|
number: GPIO13
|
|
inverted: true
|
|
|
|
# FIX: Usunięto sekcję 'output', pin 12 deklarujemy bezpośrednio w switchu
|
|
switch:
|
|
- platform: gpio
|
|
pin: GPIO12
|
|
id: kitchen_hood_relay
|
|
name: "kitchen.hood" # Naming convention word1.word2 [cite: 2025-12-12]
|
|
icon: "mdi:fan"
|
|
restore_mode: RESTORE_DEFAULT_OFF
|
|
|
|
binary_sensor:
|
|
# Przycisk na obudowie Sonoffa (GPIO00)
|
|
- platform: gpio
|
|
pin: GPIO00
|
|
id: button_internal
|
|
internal: true
|
|
filters:
|
|
- invert:
|
|
- delayed_off: 10ms
|
|
on_press:
|
|
- switch.toggle: kitchen_hood_relay
|
|
|
|
# Przełącznik ścienny / fizyczny (S1/S2 na GPIO04)
|
|
- platform: gpio
|
|
name: "kitchen.hood.switch"
|
|
pin: GPIO04
|
|
id: external_switch
|
|
on_press:
|
|
then:
|
|
- switch.toggle: kitchen_hood_relay
|
|
on_release:
|
|
then:
|
|
- switch.toggle: kitchen_hood_relay |