mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-21 00:25:12 +00:00
Closes #22 Went with a Cuckoo Clock! It's awesome.
This commit is contained in:
parent
537a3cec81
commit
f9eeb5f524
@ -1,22 +1,47 @@
|
|||||||
###################################
|
###################################
|
||||||
## cuckoo Clock simulation.
|
## cuckoo Clock simulation.
|
||||||
|
## Plays the number of cuckoos per hour and 1 on the half hour.
|
||||||
###################################
|
###################################
|
||||||
|
|
||||||
- alias: Cuckoo Clock
|
- alias: Cuckoo Clock
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
minutes: 59
|
minutes: 00
|
||||||
seconds: 56
|
seconds: 00
|
||||||
|
- platform: time
|
||||||
|
minutes: 30
|
||||||
|
seconds: 00
|
||||||
|
|
||||||
|
condition:
|
||||||
|
- condition: time
|
||||||
|
after: '09:30:00'
|
||||||
|
before: '21:30:00'
|
||||||
|
- condition: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: 'home'
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
- service: media_player.turn_on
|
||||||
|
entity_id: media_player.livingroomCC
|
||||||
|
|
||||||
|
- service: switch.turn_on
|
||||||
|
entity_id: switch.living_room_amp
|
||||||
|
- delay: '00:00:05'
|
||||||
|
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.livingroomCC
|
- media_player.livingroomCC
|
||||||
data:
|
data:
|
||||||
volume_level: 0.20
|
volume_level: 0.22
|
||||||
|
|
||||||
- service: media_player.play_media
|
- service: media_player.play_media
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: media_player.LivingRoomCC
|
entity_id:
|
||||||
|
- media_player.LivingRoomCC
|
||||||
media_content_id: >
|
media_content_id: >
|
||||||
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-{{now().strftime("%I")}}.mp3
|
{% if now().strftime("%M")|int == 30 %}
|
||||||
|
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-01.wav
|
||||||
|
{% else %}
|
||||||
|
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/cuckoo-clock-{{now().strftime("%I")}}.wav
|
||||||
|
{% endif %}
|
||||||
media_content_type: audio/mp4
|
media_content_type: audio/mp4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user