-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
kitchen-dishwasherplug.yaml
77 lines (73 loc) · 1.88 KB
/
kitchen-dishwasherplug.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
substitutions:
device_name: "kitchen-dishwasherplug"
friendly_name: "Kitchen - Dishwasher Plug"
comment: "${friendly_name} (Plug AWOW EU3S)"
default_update_interval: 60s
<<: !include boards/esp01_1m.yaml
<<: !include components/api.yaml
<<: !include components/captive_portal.yaml
<<: !include components/logger.yaml
<<: !include components/ota/esphome.yaml
<<: !include components/safe_mode.yaml
<<: !include components/time/homeassistant.yaml
<<: !include components/web_server.yaml
<<: !include components/wifi.yaml
binary_sensor:
- <<: !include components/binary_sensor/status.yaml
- platform: gpio
id: button_id
internal: True
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: True
on_press:
- switch.toggle: switch_id
switch:
- platform: gpio
id: switch_id
name: ${device_name}_switch
restore_mode: RESTORE_DEFAULT_OFF
pin: GPIO15
on_turn_on:
- switch.turn_on: led_id
on_turn_off:
- switch.turn_off: led_id
- platform: gpio
id: led_id
internal: True
restore_mode: RESTORE_DEFAULT_OFF
pin:
number: GPIO02
inverted: True
sensor:
- <<: !include components/sensor/wifi_signal.yaml
- <<: !include components/sensor/total_daily_energy.yaml
power_id: power_id
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO05
cf1_pin: GPIO14
current:
name: ${device_name}_current
icon: mdi:current-ac
unit_of_measurement: A
filters:
- multiply: 0.734901
voltage:
name: ${device_name}_voltage
icon: mdi:flash-circle
unit_of_measurement: V
filters:
- multiply: 0.411812
power:
id: power_id
name: ${device_name}_power
icon: mdi:flash-outline
unit_of_measurement: W
filters:
- multiply: 0.152388
change_mode_every: 1
update_interval: 10s