-
Notifications
You must be signed in to change notification settings - Fork 2
/
esphome_config
83 lines (75 loc) · 1.76 KB
/
esphome_config
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
esphome:
name: ajax_control
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "YOUR_SSID_HERE"
password: "YOUR_SSID_PASS_HERE"
# Optional manual IP
manual_ip:
static_ip: 192.168.X.XX # (XX - USE YOURS!)
gateway: 192.168.X.X # (XX - USE YOURS!)
subnet: 255.255.255.0 # (USE YOURS!)
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ajax Fallback Hotspot"
password: "PASSWORD"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "PASSWORD"
ota:
password: "PASSWORD"
# Sensors section
# Wifi and Firmware info
text_sensor:
- platform: wifi_info
ip_address:
name: IP Ajax control
ssid:
name: Ajax control connected SSID
- platform: version
name: "Firmware Ajax control"
# Wifi signal
sensor:
- platform: wifi_signal
name: "WiFi Signal Ajax control"
update_interval: 60s
#Switch lines
# GPIOS were found experimental way. We need those who do not fire on boot!
switch:
# button 1
- platform: gpio
pin: GPIO12
id: relay_disarm
- platform: template
name: "Ajax disarm"
icon: "mdi:shield-off"
turn_on_action:
- switch.turn_on: relay_disarm
- delay: 500ms
- switch.turn_off: relay_disarm
# button 2
- platform: gpio
pin: GPIO13
id: relay_arm
- platform: template
name: "Ajax arm"
icon: "mdi:shield-key"
turn_on_action:
- switch.turn_on: relay_arm
- delay: 500ms
- switch.turn_off: relay_arm
# button 3
- platform: gpio
pin: GPIO14
id: relay_night
- platform: template
name: "Ajax night"
icon: "mdi:shield-half-full"
turn_on_action:
- switch.turn_on: relay_night
- delay: 500ms
- switch.turn_off: relay_night