Dørklokke: gendan volumen på lille bad efter afspilning

This commit is contained in:
2026-04-25 13:16:03 +02:00
parent 3d2cfe6437
commit a7580b851a
4 changed files with 81 additions and 376 deletions
+25 -188
View File
@@ -44,53 +44,13 @@
sequence:
- parallel:
- sequence:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '06:00:00'
sequence:
- service: media_player.volume_set
data:
volume_level: 0.5
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/Halloween-doorbell.mp3
media_content_type: audio/mpeg
metadata:
title: Halloween-doorbell.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: 0.8
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: "{{ 0.5 if (now().hour >= 20 or now().hour < 6) else 0.8 }}"
lille_bad_lydfil: "{{ 'Halloween-doorbell.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: tts.speak
target:
@@ -127,53 +87,12 @@
sequence:
- parallel:
- sequence:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '06:00:00'
sequence:
- service: media_player.volume_set
data:
volume_level: 0.5
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/german-shephard.mp3
media_content_type: audio/mpeg
metadata:
title: german-shephard.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: 0.8
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/german-shephard.mp3
media_content_type: audio/mpeg
metadata:
title: german-shephard.mp3
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- variables:
lille_bad_volumen: "{{ 0.5 if (now().hour >= 20 or now().hour < 6) else 0.8 }}"
- service: script.spil_paa_lille_bad
data:
lydfil: german-shephard.mp3
volumen: "{{ lille_bad_volumen }}"
- sequence:
- service: tts.speak
target:
@@ -195,53 +114,12 @@
sequence:
- parallel:
- sequence:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '06:00:00'
sequence:
- service: media_player.volume_set
data:
volume_level: 0.5
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/dog-barking-2-bullmastiff.mp3
media_content_type: audio/mpeg
metadata:
title: dog-barking-2-bullmastiff.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: 0.8
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/dog-barking-2-bullmastiff.mp3
media_content_type: audio/mpeg
metadata:
title: dog-barking-2-bullmastiff.mp3
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- variables:
lille_bad_volumen: "{{ 0.5 if (now().hour >= 20 or now().hour < 6) else 0.8 }}"
- service: script.spil_paa_lille_bad
data:
lydfil: dog-barking-2-bullmastiff.mp3
volumen: "{{ lille_bad_volumen }}"
- sequence:
- service: tts.speak
target:
@@ -263,53 +141,12 @@
sequence:
- parallel:
- sequence:
- choose:
- conditions:
- condition: time
after: '20:00:00'
before: '06:00:00'
sequence:
- service: media_player.volume_set
data:
volume_level: 0.5
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/two-tone-chime.mp3
media_content_type: audio/mpeg
metadata:
title: two-tone-chime.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: 0.8
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/two-tone-chime.mp3
media_content_type: audio/mpeg
metadata:
title: two-tone-chime.mp3
thumbnail:
media_class: music
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://media_source
- variables:
lille_bad_volumen: "{{ 0.5 if (now().hour >= 20 or now().hour < 6) else 0.8 }}"
- service: script.spil_paa_lille_bad
data:
lydfil: two-tone-chime.mp3
volumen: "{{ lille_bad_volumen }}"
- sequence:
- service: tts.speak
target: