-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgarden-lights.yaml
106 lines (91 loc) · 2.06 KB
/
garden-lights.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
substitutions:
device_name: garden-lights
friendly_name: "Garden Lights"
device_description: "Switch controlling the garden lights"
main_icon: "string-lights"
# Options: `RESTORE_DEFAULT_OFF`, `RESTORE_DEFAULT_ON`, `ALWAYS_ON` & `ALWAYS_OFF`
default_state: "RESTORE_DEFAULT_ON"
# Number that the device will change from `Idle` to `Active` if power is greater than or equal to
activity_threshold: "5"
## NOTE: POWER MONITORING IS BROKEN ON THIS PLUG, SO HAS BEEN REMOVED ##
esphome:
name: $device_name
friendly_name: $friendly_name
esp8266:
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 172.23.123.15
gateway: 172.23.123.1
subnet: 255.255.255.0
ap:
ssid: $device_name
password: !secret hotspot_wifi_password
captive_portal:
web_server:
port: 80
include_internal: true
logger:
level: INFO
api:
encryption:
key: !secret api_enc
ota:
- platform: esphome
password: !secret ota_pwd
time:
- platform: homeassistant
id: homeassistant_time
timezone: Europe/London
# Device Specific Config
binary_sensor:
# Push Button (Toggles Relay When Pressed)
- platform: gpio
pin:
number: GPIO3
mode: INPUT_PULLUP
inverted: true
name: "Button"
on_press:
- switch.toggle: relay
- platform: status
name: "Server Status"
switch:
# Relay (As Switch)
- platform: gpio
name: "Switch"
icon: "mdi:${main_icon}"
pin: GPIO14
id: relay
restore_mode: "${default_state}"
on_turn_on:
- light.turn_on:
id: led
brightness: 100%
transition_length: 0s
on_turn_off:
- light.turn_off:
id: led
transition_length: 0s
sensor:
# WiFi Signal Sensor
- platform: wifi_signal
name: "WiFi Status"
update_interval: 60s
# Relay State LED
output:
- platform: esp8266_pwm
id: state_led
pin:
number: GPIO1
inverted: true
light:
- platform: monochromatic
output: state_led
id: led
status_led:
pin:
number: GPIO13
inverted: True