mirror of
				https://github.com/CCOSTAN/Home-AssistantConfig.git
				synced 2025-11-04 04:55:16 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
		
			Executable File
		
	
	
	
	
###################################
 | 
						|
## @CCOSTAN
 | 
						|
## Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
 | 
						|
###################################
 | 
						|
 | 
						|
- alias: Door Chime
 | 
						|
  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
 | 
						|
 | 
						|
    - service: media_player.play_media
 | 
						|
      data_template:
 | 
						|
        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
 |