-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeta_6920HA.yaml
46 lines (42 loc) · 992 Bytes
/
deta_6920HA.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
# Smart outlet with power monitoring and USB
# The 6920 requires a module replacements, I have listed the tywe2s as the module as that is what I had the day I needed to make this work
<<: !include esp_modules/tywe2s.yaml
<<: !include common/status_led.yaml
<<: !include common/deta_power_meter.yaml
substitutions:
status_led_pin: GPIO5
left_name: "Left"
right_name: "Right"
update_interval: 60s
binary_sensor:
- platform: gpio
pin:
number: GPIO4
inverted: true
mode:
input: true
pullup: true
name: "${left_name} Button"
on_press:
- switch.toggle: relay_left
- platform: gpio
pin:
number: GPIO12
inverted: true
mode:
input: true
pullup: true
name: "${right_name} Button"
on_press:
- switch.toggle: relay_right
- platform: status
name: "${node_name_upper} Status"
switch:
- platform: gpio
name: ${right_name}
pin: GPIO14
id: relay_right
- platform: gpio
name: ${left_name}
pin: GPIO13
id: relay_left