-
Notifications
You must be signed in to change notification settings - Fork 14
/
basement-bathroom-light-fan.yaml
69 lines (61 loc) · 1.35 KB
/
basement-bathroom-light-fan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
substitutions:
device_id: basement-bathroom-light-fan
device_name: Basement Bathroom Light and Fan
board: esp01_1m
ip_address: !secret basement_bathroom_light_fan_ip
api_key: !secret basement_bathroom_light_fan_key
pwd: !secret basement_bathroom_light_fan_pwd
packages:
device_base: !include ./packages/device_base_esp8266.yaml
external_components:
- source:
type: local
path: ./components
components: [ binary_light_with_power ]
binary_sensor:
- platform: gpio
id: light_button
pin:
number: 12
mode: INPUT_PULLUP
on_press:
then:
- light.toggle: the_light
- platform: gpio
id: fan_button
pin:
number: 3
mode: INPUT_PULLUP
on_press:
then:
- fan.toggle: the_fan
fan:
- platform: binary
id: the_fan
output: fan_output
name: "Basement Bathroom Fan"
light:
- platform: binary_light_with_power
id: the_light
name: "Basement Bathroom Light"
output: light_output
power:
id: light_power
name: Basement Bathroom Light Power
light_wattage: 48.0
output:
- platform: gpio
id: fan_output
pin: 4
- platform: gpio
id: light_output
pin: 13
status_led:
pin:
number: 0
inverted: true
sensor:
- platform: total_daily_energy
name: Basement Bathroom Light
power_id: light_power
method: left