-
Notifications
You must be signed in to change notification settings - Fork 0
/
heater_switch.yaml
80 lines (64 loc) · 1.39 KB
/
heater_switch.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
esphome:
name: heater-switch
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Heater Switch Fallback Hotspot"
password: !secret wifi_password
captive_portal:
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
ota:
uart:
rx_pin: RX
baud_rate: 4800
sensor:
- platform: cse7766
current:
name: "Heater switch Current"
voltage:
name: "Heater switch Voltage"
power:
name: "Heater switch Power"
id: heater_power
update_interval: 30s
- platform: total_daily_energy
name: "Heater Total Daily Energy"
power_id: heater_power
- platform: wifi_signal
name: "Heater switch WiFi signal"
update_interval: 60s
- platform: uptime
name: "Heater switch uptime"
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Heater switch button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "Heater switch relay"
pin: GPIO12
id: relay
status_led:
pin:
number: GPIO13
inverted: yes
text_sensor:
- platform: version
name: "Heater switch ESPHome version"
# Enable time component to reset energy at midnight
time:
- platform: sntp
timezone: Europe/Copenhagen