mydocker/esphome/sonofft13guk.yaml

111 lines
2.0 KiB
YAML

substitutions:
dev_name: "sonofft13guk"
friendly_name: "Kitchen Switch Panel"
esphome:
name: ${dev_name}
friendly_name: ${friendly_name}
esp8266:
board: esp01_1m
wifi:
# --- KOTWICA MIGRACYJNA ---
# Podaj tutaj nowe IP z sieci IoT (VLAN 20) zarezerwowane na routerze.
use_address: 192.168.20.60
min_auth_mode: WPA2
networks:
- ssid: !secret wifi_ssid_iot
password: !secret wifi_pw_iot
# Fallback AP
ap:
ssid: ${dev_name}
password: !secret fallback_ap_password
packages:
common_core: !include packages/common_core.yaml
web_server:
port: 80
# --- HARDWARE CONFIGURATION (3-GANG) ---
binary_sensor:
# Button 1 (Kitchen)
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
id: button_1
name: "Kitchen Button" # Zmieniłem lekko nazwę sensora, żeby nie kolidował z nazwą światła
on_press:
then:
- light.toggle: light_1
# Button 2 (Terrace)
- platform: gpio
pin:
number: GPIO9
mode: INPUT_PULLUP
inverted: True
id: button_2
name: "Terrace Button"
on_press:
then:
- light.toggle: light_2
# Button 3 (Sofa)
- platform: gpio
pin:
number: GPIO10
mode: INPUT_PULLUP
inverted: True
id: button_3
name: "Sofa Button"
on_press:
then:
- light.toggle: light_3
- platform: status
name: "Kitchen Panel Status"
output:
- platform: gpio
pin: GPIO12
id: relay_1
- platform: gpio
pin: GPIO5
id: relay_2
- platform: gpio
pin: GPIO4
id: relay_3
light:
- platform: binary
name: "Kitchen"
id: light_1
output: relay_1
restore_mode: RESTORE_DEFAULT_OFF
- platform: binary
name: "Terrace"
id: light_2
output: relay_2
restore_mode: RESTORE_DEFAULT_OFF
- platform: binary
name: "Sofa"
id: light_3
output: relay_3
restore_mode: RESTORE_DEFAULT_OFF
status_led:
pin:
number: GPIO13
inverted: no