-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTreatlife-SS01S.yaml
98 lines (81 loc) · 1.94 KB
/
Treatlife-SS01S.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
substitutions:
device_name: <<Device Name>>
device_description: <<Device Description>>
friendly_name: <<Device friendly Name>>
esphome:
name: ${device_name}
comment: ${device_description}
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret wifi_domain
fast_connect: on #we only have one WiFi AP so just use the first one that matches
ap: #since we listed an SSID above, this AP mode will only enable if no WiFi connection could be made
ssid: !secret ap_ssid
password: !secret ap_password
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
# Enable OTA updates
ota:
# Enable web server
web_server:
port: 80
binary_sensor:
# Toggle button
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: true
name: ${friendly_name} Button
on_press:
- light.toggle: fixture
# Reports if this device is Connected or not
- platform: status
name: ${friendly_name} Status
# Status LED for red light.
status_led:
pin:
number: GPIO5
inverted: true
sensor:
# Reports the WiFi signal strength
- platform: wifi_signal
name: ${friendly_name} Signal
update_interval: 60s
# Reports how long the device has been powered (in hours)
- platform: uptime
name: ${friendly_name} Uptime
filters:
- lambda: return x / 3600.0;
unit_of_measurement: hours
text_sensor:
# Reports the ESPHome Version with compile date
- platform: version
name: ${friendly_name} Version
switch:
#Switch to restart device
- platform: restart
name: ${friendly_name} Restart
light:
- platform: binary
name: ${friendly_name} Switch
id: fixture
output: light_relay
output:
# Power to Fixture light
- platform: gpio
pin: GPIO12
id: light_relay
power_supply: led
power_supply:
# LED light (blue)
- pin: GPIO04
id: led
enable_time: 0s
keep_on_time: 0s