-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathattic_1.yaml
113 lines (105 loc) · 2.17 KB
/
attic_1.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
substitutions:
device: attic-1
name: Zolder
reboot_timeout: 14d
update_interval: 10min
esphome:
name: ${device}
platform: ESP8266
board: esp01_1m
<<: !include common/common.yaml
<<: !include common/sensors.yaml
<<: !include common/switches.yaml
<<: !include common/logger.yaml
status_led:
pin:
number: GPIO13
inverted: true
remote_receiver:
<<: !include common/rf_receiver.yaml
pin: GPIO2
binary_sensor:
- !include common/binary_sensor/status.yaml
- platform: gpio
id: button_1
pin:
number: GPIO0
<<: &input_pullup
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- switch.toggle: pc
- platform: gpio
id: button_2
pin:
number: GPIO9
<<: *input_pullup
on_press:
then:
- switch.toggle: printer
- platform: gpio
id: button_3
pin:
number: GPIO10
<<: *input_pullup
on_press:
then:
- light.toggle: bureaulamp
- platform: gpio
id: button_4
pin:
number: GPIO14
<<: *input_pullup
- platform: remote_receiver
<<: !include common/rf_receiver_sensor.yaml
id: rf_button_pc
rc_switch_raw:
protocol: 1
code: !secret rf_code_attic_pc
on_press:
then:
- switch.toggle: pc
- platform: remote_receiver
<<: !include common/rf_receiver_sensor.yaml
id: rf_button_printer
rc_switch_raw:
protocol: 1
code: !secret rf_code_printer
on_press:
then:
- switch.toggle: printer
- platform: remote_receiver
<<: !include common/rf_receiver_sensor.yaml
id: rf_button_desk_lamp
rc_switch_raw:
protocol: 1
code: !secret rf_code_attic_desk_lamp
on_press:
then:
- light.toggle: bureaulamp
output:
- platform: gpio
pin: GPIO4
id: relay_3
- platform: gpio
pin: GPIO15
id: relay_4
light:
- platform: binary
name: ${name} Bureaulamp
output: relay_3
id: bureaulamp
switch:
- !include common/switch/restart.yaml
- platform: gpio
name: ${name} PC
pin: GPIO12
id: pc
icon: mdi:laptop
- platform: gpio
name: ${name} Printer
pin: GPIO5
id: printer
icon: mdi:printer