-
-
Notifications
You must be signed in to change notification settings - Fork 503
/
Copy pathdoor_chime.yaml
executable file
·42 lines (37 loc) · 1.26 KB
/
door_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
###################################
## @CCOSTAN
## Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
- alias: Door
mode: queued
id: ae0fb37b-67cf-48a4-a609-999d44272e90
trigger:
- platform: state
entity_id:
- group.entry_points
condition:
- condition: state
entity_id: group.family
state: 'home'
action:
- service: script.amp_settings
data:
media_player: 'media_player.livingroomcc'
volume_level: 0.22
- wait_template: "{{ not is_state('media_player.livingroomcc', 'playing') }}"
timeout: '00:01:00' # Adjust the timeout as needed
- service: media_player.play_media
data:
entity_id: >
{% if states.group.bed.state == 'off' %}
media_player.livingroomCC
{% else %}
media_player.bedroom
{% endif %}
media_content_id: >
{% if trigger.to_state.state == 'on' %}
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/one-tone-chime.mp3
{% else %}
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/two-tone-chime.mp3
{% endif %}
media_content_type: audio/mp4