-
Notifications
You must be signed in to change notification settings - Fork 8
/
linp-doorbell.yaml
74 lines (66 loc) · 1.99 KB
/
linp-doorbell.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
esphome:
name: linp_doorbell
platform: ESP32
board: esp32doit-devkit-v1
includes:
- linp-doorbell.h
libraries:
- "ArduinoQueue"
platformio_options:
platform: [email protected]
platform_packages: |-4
framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
wifi:
ssid: 'your-wifi-ssid-here'
password: 'put-your-wifi-password-here'
# Enable Home Assistant API
api:
password: 'set-an-api-password-here'
custom_component:
- id: doorbell
lambda: |-
auto doorbell = new LinpDoorbell();
App.register_component(doorbell);
return {doorbell};
sensor:
# Doorbell volume sensor (recommended)
- platform: custom
lambda: return {get_linp_doorbell(doorbell)->volume_sensor};
sensors:
- name: "Volume"
# Doorbell "chime playing" sensor (optional)
- platform: custom
lambda: return {get_linp_doorbell(doorbell)->playing_sensor};
sensors:
- name: "Tune Playing"
# Tune/Chime configuration (one per button, optional)
- platform: custom
lambda: |-
return std::vector<Sensor*>(get_linp_doorbell(doorbell)->chime_sensors, std::end(get_linp_doorbell(doorbell)->chime_sensors));
sensors:
- name: "Button 1 Tune"
- name: "Button 2 Tune"
- name: "Button 3 Tune"
- name: "Button 4 Tune"
- name: "Button 5 Tune"
- name: "Button 6 Tune"
- name: "Button 7 Tune"
- name: "Button 8 Tune"
- name: "Button 9 Tune"
- name: "Button 10 Tune"
# Binary sensors for button presses (optional)
binary_sensor:
- platform: custom
lambda: |-
return std::vector<BinarySensor*>(get_linp_doorbell(doorbell)->button_sensors, std::end(get_linp_doorbell(doorbell)->button_sensors));
binary_sensors:
- name: "Button 1"
- name: "Button 2"
- name: "Button 3"
- name: "Button 4"
- name: "Button 5"
- name: "Button 6"
- name: "Button 7"
- name: "Button 8"
- name: "Button 9"
- name: "Button 10"