Dørklokke: gendan volumen på lille bad efter afspilning
This commit is contained in:
@@ -10,53 +10,13 @@ doorbell:
|
||||
sequence:
|
||||
- parallel:
|
||||
- sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '20:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: "{{ volumennat }}"
|
||||
target:
|
||||
entity_id: media_player.lille_badevaerelse
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.lille_badevaerelse
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell-shortened-100308.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell-shortened-100308.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
default:
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: "{{ volumendag }}"
|
||||
target:
|
||||
entity_id: media_player.lille_badevaerelse
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.lille_badevaerelse
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/doorbell.mp3
|
||||
media_content_type: audio/mpeg
|
||||
metadata:
|
||||
title: doorbell.mp3
|
||||
thumbnail:
|
||||
media_class: music
|
||||
children_media_class:
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: app
|
||||
media_content_id: media-source://media_source
|
||||
- variables:
|
||||
lille_bad_volumen: "{{ volumennat if (now().hour >= 20 or now().hour < 6) else volumendag }}"
|
||||
lille_bad_lydfil: "{{ 'doorbell-shortened-100308.mp3' if (now().hour >= 20 or now().hour < 6) else 'doorbell.mp3' }}"
|
||||
- service: script.spil_paa_lille_bad
|
||||
data:
|
||||
lydfil: "{{ lille_bad_lydfil }}"
|
||||
volumen: "{{ lille_bad_volumen }}"
|
||||
- sequence:
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
|
||||
Reference in New Issue
Block a user