Skip to content

Commit b687c61

Browse files
authored
Merge pull request #1540 from CCOSTAN/holiday-cuckoo-clock
2 parents ddb10fd + fd6ef6f commit b687c61

16 files changed

Lines changed: 12 additions & 11 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Live, personal Home Assistant configuration shared for **browsing and inspiratio
4343
- Holiday/front-of-house color scenes: [config/scene/monthly_colors.yaml](config/scene/monthly_colors.yaml), [config/script/monthly_color_scene.yaml](config/script/monthly_color_scene.yaml)
4444
- Dash-button triggers for quick actions: [config/automation/dash_buttons.yaml](config/automation/dash_buttons.yaml)
4545
- PC lock/unlock-driven lighting via HASS.Agent: [config/packages/hass_agent_homepc.yaml](config/packages/hass_agent_homepc.yaml)
46+
- Seasonal cuckoo clock with October and Christmas sound packs: [config/automation/System/CucKoo_Clock.yaml](config/automation/System/CucKoo_Clock.yaml)
4647
- Battery and solar awareness: [config/packages/powerwall.yaml](config/packages/powerwall.yaml)
4748
- Presence-aware office comfort: [config/packages/office_motion.yaml](config/packages/office_motion.yaml)
4849
- Weather-aware lighting: [config/automation/dark_rainy_day.yaml](config/automation/dark_rainy_day.yaml)

config/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Live view of the `config/` directory my production Home Assistant instance loads
4646
| Scenes | Seasonal and ambiance presets that the scripts and automations call into. | [scene/monthly_colors.yaml](scene/monthly_colors.yaml), [scene/living_room.yaml](scene/living_room.yaml) |
4747
| Templates & Speech | Human-friendly voice briefings and templated responses. | [templates/speech/briefing.yaml](templates/speech/briefing.yaml) |
4848
| Dashboards & Media | UI chrome, floorplans, sound bites, and automation assets. | [www/custom_ui/floorplan/images/branding/Bear-Stone-Docker-Diagram.jpg](www/custom_ui/floorplan/images/branding/Bear-Stone-Docker-Diagram.jpg), [media/](media) |
49+
| Seasonal Audio | Cuckoo clock with Halloween and Christmas sound packs. | [automation/System/CucKoo_Clock.yaml](automation/System/CucKoo_Clock.yaml) |
4950

5051
### Gear tied to these automations (affiliate links)
5152
Only including devices that have active references in the files above. Want the legacy list? Jump to [../legacy-readme.md](../legacy-readme.md).

config/automation/System/CucKoo_Clock.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@
3939
data:
4040
entity_id: media_player.livingroomCC
4141
media_content_id: >
42-
{% if now().strftime("%M")|int == 30 %}
43-
{% if now().strftime("%B") == 'October' %}
44-
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/october-clock/cuckoo-clock-01.wav
42+
{% set month = now().strftime("%B") %}
43+
{% set base = "https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/" %}
44+
{% if month == 'October' %}
45+
{% set folder = 'october-clock' %}
46+
{% elif month == 'December' %}
47+
{% set folder = 'december-clock' %}
4548
{% else %}
46-
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/cuckoo-clock/cuckoo-clock-01.wav
47-
{% endif %}
48-
{% else %}
49-
{% if now().strftime("%B") == 'October' %}
50-
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/october-clock/cuckoo-clock-{{now().strftime("%I")}}.wav
51-
{% else %}
52-
https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/sounds/cuckoo-clock/cuckoo-clock-{{now().strftime("%I")}}.wav
53-
{% endif %}
49+
{% set folder = 'cuckoo-clock' %}
5450
{% endif %}
51+
{% set file = 'cuckoo-clock-01.wav' if now().strftime("%M")|int == 30 else 'cuckoo-clock-' ~ now().strftime("%I") ~ '.wav' %}
52+
{{ base ~ folder ~ '/' ~ file }}
5553
media_content_type: audio/mp4

config/sounds/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Audio assets (alert tones, chimes, TTS snippets) used by automations and scripts
2727
### Tips
2828
- Keep filenames descriptive so automations stay readable.
2929
- Subfolders hold themed or device-specific sounds.
30+
- Seasonal cuckoo clock uses `october-clock` (Halloween) and `december-clock` (Christmas) variants, falling back to `cuckoo-clock`.
3031

3132

3233
**All of my configuration files are tested against the most stable version of home-assistant.**
784 KB
Binary file not shown.
1.63 MB
Binary file not shown.
2.39 MB
Binary file not shown.
3.15 MB
Binary file not shown.
3.92 MB
Binary file not shown.
4.68 MB
Binary file not shown.

0 commit comments

Comments
 (0)