| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- ---
- substitutions:
- devicename: ff-bath-fan
- low_devicename: ff_bath_fan
- friendly_devicename: FF Bath Fan Controller
- packages:
- diag: !include common/diag.yaml
- # Basic Config
- esphome:
- name: $devicename
- platform: ESP8266
- board: esp8285
- web_server:
- port: 80
-
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- domain: .int.mmax.cloud
- logger:
- api:
- encryption:
- key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
- ota:
- password: "73cea25506d095b4970dedc41e2399fb"
- # Device Specific Config
- binary_sensor:
- - platform: gpio
- id: push_button
- pin:
- number: GPIO0
- mode:
- input: true
- pullup: true
- inverted: true
- internal: true
- on_press:
- # Prevents unintended LED lit states.
- if:
- condition:
- - switch.is_off: relay
- then:
- - switch.turn_on: blue_led
- - switch.turn_on: relay
- else:
- - switch.turn_off: relay
- switch:
- # The relay switches on the red side of the LED when active.
- - platform: gpio
- name: "FF_Bath_Fan"
- pin: GPIO12
- id: relay
- on_turn_off:
- if:
- condition:
- - switch.is_on: blue_led
- then:
- - switch.turn_off: blue_led
- # With this we can control the blue side of the LED.
- - platform: gpio
- id: blue_led
- pin:
- number: GPIO13
- inverted: True
- sensor:
- - platform: dht
- pin: GPIO14
- model: AM2302
- temperature:
- name: "FF Bath Temperature"
- humidity:
- name: "FF Bath Humidity"
- on_value_range:
- - above: 85.0
- then:
- - switch.turn_on: relay
- - below: 80.0
- then:
- - switch.turn_off: relay
- update_interval: 30s
- - platform: uptime
- name: Uptime Sensor
- id: uptime_sensor
- update_interval: 60s
|