2020-02-04 04:03:45 +00:00
|
|
|
substitutions:
|
|
|
|
device_id: basement_bathroom_light_fan
|
|
|
|
device_name: Basement Bathroom Light and Fan
|
|
|
|
platform: ESP8266
|
|
|
|
board: esp01_1m
|
|
|
|
ip_address: !secret basement_bathroom_light_fan_ip
|
|
|
|
ota_pwd: !secret basement_bathroom_light_fan_ota_pwd
|
|
|
|
api_pwd: !secret basement_bathroom_light_fan_api_pwd
|
|
|
|
ap_wifi_pwd: !secret basement_bathroom_light_fan_ap_wifi_pwd
|
|
|
|
|
2020-10-07 22:21:38 +00:00
|
|
|
packages:
|
|
|
|
device_base: !include ../packages/device_base.yaml
|
2020-02-04 04:03:45 +00:00
|
|
|
|
2021-08-14 22:13:17 +00:00
|
|
|
external_components:
|
2021-08-18 02:55:21 +00:00
|
|
|
- source:
|
|
|
|
type: local
|
|
|
|
path: ../components
|
2021-08-19 13:08:10 +00:00
|
|
|
components: [ binary_light_with_power ]
|
2021-08-14 22:13:17 +00:00
|
|
|
- source: github://cbpowell/ESPSense
|
|
|
|
components: [ espsense ]
|
|
|
|
|
2020-02-04 04:03:45 +00:00
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
2020-02-06 04:04:00 +00:00
|
|
|
id: light_button
|
2020-02-04 04:03:45 +00:00
|
|
|
pin:
|
|
|
|
number: 12
|
|
|
|
mode: INPUT_PULLUP
|
|
|
|
on_press:
|
|
|
|
then:
|
2020-06-02 11:10:05 +00:00
|
|
|
- light.toggle: the_light
|
2020-02-04 04:03:45 +00:00
|
|
|
- platform: gpio
|
2020-02-06 04:04:00 +00:00
|
|
|
id: fan_button
|
2020-02-04 04:03:45 +00:00
|
|
|
pin:
|
|
|
|
number: 3
|
|
|
|
mode: INPUT_PULLUP
|
|
|
|
on_press:
|
|
|
|
then:
|
2020-02-06 04:04:00 +00:00
|
|
|
- fan.toggle: the_fan
|
2020-02-04 04:03:45 +00:00
|
|
|
|
2021-08-14 22:13:17 +00:00
|
|
|
espsense:
|
|
|
|
plugs:
|
|
|
|
- name: Basement Bathroom Light
|
|
|
|
power_sensor: light_power
|
|
|
|
voltage: 120
|
|
|
|
|
2020-02-04 04:03:45 +00:00
|
|
|
fan:
|
|
|
|
- platform: binary
|
2020-02-06 04:04:00 +00:00
|
|
|
id: the_fan
|
2020-02-04 04:03:45 +00:00
|
|
|
output: fan_output
|
|
|
|
name: "Basement Bathroom Fan"
|
|
|
|
|
2020-06-02 11:10:05 +00:00
|
|
|
light:
|
2021-08-18 02:55:21 +00:00
|
|
|
- platform: binary_light_with_power
|
2020-06-02 11:10:05 +00:00
|
|
|
id: the_light
|
|
|
|
name: "Basement Bathroom Light"
|
|
|
|
output: light_output
|
2021-08-18 02:55:21 +00:00
|
|
|
power:
|
|
|
|
id: light_power
|
|
|
|
name: Basement Bathroom Light Power
|
|
|
|
light_wattage: 48.0
|
2020-06-02 11:10:05 +00:00
|
|
|
|
2020-02-04 04:03:45 +00:00
|
|
|
output:
|
|
|
|
- platform: gpio
|
|
|
|
id: fan_output
|
|
|
|
pin: 4
|
2020-06-02 11:10:05 +00:00
|
|
|
- platform: gpio
|
|
|
|
id: light_output
|
|
|
|
pin: 13
|
2020-02-04 04:03:45 +00:00
|
|
|
|
|
|
|
status_led:
|
2020-02-06 04:04:00 +00:00
|
|
|
pin:
|
|
|
|
number: 0
|
|
|
|
inverted: true
|
2021-08-14 22:13:17 +00:00
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: total_daily_energy
|
|
|
|
name: Basement Bathroom Light
|
|
|
|
power_id: light_power
|
2021-08-18 02:55:21 +00:00
|
|
|
method: left
|
|
|
|
min_save_interval: 10min
|
2021-08-14 22:13:17 +00:00
|
|
|
|
|
|
|
time:
|
|
|
|
- platform: homeassistant
|