forked from nicolaij/esphomes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hall.yaml
87 lines (73 loc) · 1.38 KB
/
hall.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
esphome:
name: hall
platformio_options:
board_build.f_cpu: 80000000L
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid_home
password: !secret wifi_password_home
reboot_timeout: 0s
ap:
ssid: "hall"
password: !secret ap_password
ap_timeout: 20s
# power_save_mode: HIGH
#captive_portal:
# Enable logging
logger:
#level: VERBOSE
#level: VERY_VERBOSE
#level: INFO
# Enable Home Assistant API
api:
reboot_timeout: 0s
ota:
# Активация web сервера
web_server:
port: 80
# local: true
ota: false
version: 2
js_include: "www.js"
js_url: ""
binary_sensor:
- platform: gpio
pin:
number: GPIO0
inverted: true
filters:
- delayed_on: 50ms
name: "Boot button"
on_press:
then:
- sensor.rotary_encoder.set_value:
id: encoder_id
value: 0
- platform: gpio
pin: 21
name: "Zero"
on_press:
then:
- sensor.rotary_encoder.set_value:
id: encoder_id
value: 0
status_led:
pin:
number: GPIO2
inverted: false
# Individual sensors
sensor:
- platform: uptime
name: Uptime Sensor
id: uptime_id
update_interval: 1min
- platform: esp32_hall
name: "ESP32 Hall Sensor"
id: hall_id
update_interval: 30s
- platform: rotary_encoder
id: encoder_id
name: "Encoder"
pin_a: 22
pin_b: 23