mydocker/esphome/esp_woox_fan.yaml

53 lines
1.1 KiB
YAML

esphome:
name: iot-esp-woox-fan
friendly_name: Attic Fan
esp8266:
board: esp01_1m
wifi:
# --- KOTWICA (Anchor) ---
# Home Assistant będzie szukał urządzenia pod tym adresem.
# WAŻNE: Zarezerwuj to IP (Make Static) w MikroTiku w sieci VLAN 20!
use_address: 192.168.20.252
min_auth_mode: WPA2
networks:
# 1. Priorytet: Sieć IoT (VLAN 20)
- ssid: !secret wifi_ssid_iot
password: !secret wifi_pw_iot
packages:
common_core: !include packages/common_core.yaml
status_led:
pin:
number: GPIO02
inverted: true
switch:
# Główny przekaźnik wentylatora
- platform: gpio
pin: GPIO15
name: 'attic_fan'
id: attic_fan
# interlock usunięty - self-interlock nic nie daje
# Drugi kanał / LED / Przycisk wirtualny
- platform: gpio
pin: GPIO13
name: 'attic_fan_button1'
id: attic_fan_button1
binary_sensor:
- platform: gpio
name: 'toggle fan'
pin: GPIO12
id: attic_fan_switch1
# Zakładam, że ten przycisk fizyczny ma sterować tym drugim switchem (button1)
# zgodnie z Twoim starym kodem:
on_press:
then:
- switch.toggle:
id: attic_fan_button1