-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdoorbell_chime.yaml
82 lines (69 loc) · 1.58 KB
/
doorbell_chime.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
substitutions:
board_platform: ESP8266
board_type: d1_mini
devicename: audio_doorbell_top_floor
hostname: top floor chime
devicestatusname: audio_doorbell_top_floor_status
staticip: 192.168.86.239
apssid: esphome_aud_doorbell_top_flr
wifigateway: 192.168.86.1
subnet: 255.255.255.0
tx_pin: D6
rx_pin: D5
esphome:
name: $devicename
platform: $board_platform
board: $board_type
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_pwd
- ssid: !secret wifi_ssid_backup
password: !secret wifi_pwd_backup
manual_ip:
static_ip: $staticip
gateway: $wifigateway
subnet: $subnet
ap: #Settings for captive portal
ssid: $apssid
password: !secret esphome_appassword
captive_portal: # AP in case WiFi connection fails
# Enable logging
logger:
# Enable OTA firmware update
ota:
switch:
- platform: restart
name: $hostname restart
binary_sensor:
- platform: status
name: $devicestatusname
# dfplayer #######################################################
# on SD card:
# westminster chimes 1
uart:
tx_pin: $tx_pin
rx_pin: $rx_pin
baud_rate: 9600
dfplayer:
on_finished_playback:
then:
logger.log: 'Playback finished event'
api:
services:
- service: dfplayer_play
variables:
file: int
then:
- dfplayer.play: !lambda 'return file;'
- service: dfplayer_set_volume
variables:
volume: int
then:
- dfplayer.set_volume: !lambda 'return volume;'
- service: dfplayer_reset
then:
- dfplayer.reset
- service: dfplayer_stop
then:
- dfplayer.stop