Home-AssistantConfig/config/automation/System/door_chime.yaml

43 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2018-01-02 00:00:45 +00:00
###################################
## @CCOSTAN
## Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
###################################
2024-06-11 12:54:22 +00:00
- alias: Door
mode: queued
2020-07-20 18:33:03 +00:00
id: ae0fb37b-67cf-48a4-a609-999d44272e90
2018-01-02 00:00:45 +00:00
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
2024-06-11 12:54:22 +00:00
- wait_template: "{{ not is_state('media_player.livingroomcc', 'playing') }}"
timeout: '00:01:00' # Adjust the timeout as needed
2018-01-02 00:00:45 +00:00
- service: media_player.play_media
data:
2018-01-02 00:00:45 +00:00
entity_id: >
{% if states.group.bed.state == 'off' %}
media_player.livingroomCC
{% else %}
media_player.bedroom
2018-01-02 00:00:45 +00:00
{% endif %}
media_content_id: >
{% if trigger.to_state.state == 'on' %}
2018-03-01 01:00:44 +00:00
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/one-tone-chime.mp3
2018-01-02 00:00:45 +00:00
{% else %}
2018-03-01 01:00:44 +00:00
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/two-tone-chime.mp3
2018-01-02 00:00:45 +00:00
{% endif %}
media_content_type: audio/mp4