Hallo,
da wir zwei kleine Kinder haben ist der Plattenspieler aktuell nicht aufgebaut. Weil ich aber trotzdem gerne mal meine Lieblings Platten hören möchte, wenn mal keiner im Haus ist habe ich mir eine kleine Automation gebastelt.
Meine Platten habe ich in Rahmen an der Wand oder einfach im Regal stehen.
In jedes Plattencover habe ich einfach einen NFC Tag geschoben. Einfach lose reingelegt ohne ihn fest zu kleben. Wenn der Tag mit dem Handy gescannt wird, erhält man eine Actionable Notifications über die man entscheiden kann auf welchem Sonos Player die Platte wiedergegeben wird.
Hier mal eine Automatisierung. Die muss man dann natürlich für jede Platte erstellen bzw. kopieren und anpassen.
alias: Platte Dropkick Murphys Going out in style wird gescannt
description: ""
triggers:
- trigger: tag
tag_id: 4df4fad6-9c5c-4d10-9240-09b9647a9ba4
conditions: []
actions:
- variables:
action_wohnzimmer: "{{ 'Wohnzimmer_' ~ context.id }}"
action_armin: "{{ 'Armin_' ~ context.id }}"
action_kueche: "{{ 'Kueche_' ~ context.id }}"
- choose:
- conditions:
- condition: template
value_template: >-
{{ trigger.event.context.user_id ==
'16bea83c13d44fcb9331db4d0a36dd88' }}
sequence:
- action: notify.notify_armin
metadata: {}
data:
data:
actions:
- action: "{{ action_wohnzimmer }}"
title: Wohnzimmer 🔊
- action: "{{ action_armin }}"
title: Move Arbeitszimmer 🔊
- action: "{{ action_kueche }}"
title: Küche 🔊
title: 🎶 Für Auswahl gedrückt halten
message: 🎸Auf welchen Gerät soll die Platte abgespielt werden? 🤘
alias: Wenn Armin den Tag gescannt hat
- conditions:
- condition: template
value_template: >-
{{ trigger.event.context.user_id ==
'50bebf3a27164de38d6722d9dd131a0e' }}
sequence:
- action: notify.notify_wife
metadata: {}
data:
data:
actions:
- action: "{{ action_wohnzimmer }}"
title: Wohnzimmer 🔊
- action: "{{ action_armin }}"
title: Move Arbeitszimmer 🔊
- action: "{{ action_kueche }}"
title: Küche 🔊
title: 🎶 Für Auswahl gedrückt halten
message: 🪩 Auf welchen Gerät soll die Platte abgespielt werden? 💃
alias: Wenn die Frau den Tag gescannt hat
- wait_for_trigger:
- event_type: mobile_app_notification_action
event_data:
action: "{{ action_wohnzimmer }}"
trigger: event
id: Wohnzimmer
- event_type: mobile_app_notification_action
event_data:
action: "{{ action_armin }}"
trigger: event
id: Armin
- event_type: mobile_app_notification_action
event_data:
action: "{{ action_kueche }}"
trigger: event
id: Küche
continue_on_timeout: false
timeout:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- choose:
- conditions:
- condition: template
value_template: "{{ wait.trigger.event.data.action == action_wohnzimmer }}"
sequence:
- action: media_player.play_media
metadata: {}
data:
media:
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
media_content_type: spotify://album
metadata:
title: Going Out In Style - Live at Fenway Edition
thumbnail: >-
https://i.scdn.co/image/ab67616d0000b2736b991c69cc5c93afdc0271fd
media_class: album
children_media_class: track
navigateIds:
- {}
- media_content_type: spotify://library
media_content_id: spotify://01JCEFPP9JGEXVASQH87S50A4H
- media_content_type: spotify://current_user_followed_artists
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/current_user_followed_artists
- media_content_type: spotify://artist
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:artist:7w9jdhcgHNdiPeNPUoFSlx
- media_content_type: spotify://album
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
browse_entity_id: media_player.sonos_move
target:
device_id:
- 0b1f27e15f289e4b94352f972d79b4eb
- conditions:
- condition: template
value_template: "{{ wait.trigger.event.data.action == action_armin }}"
sequence:
- action: media_player.play_media
metadata: {}
data:
media:
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
media_content_type: spotify://album
metadata:
title: Going Out In Style - Live at Fenway Edition
thumbnail: >-
https://i.scdn.co/image/ab67616d0000b2736b991c69cc5c93afdc0271fd
media_class: album
children_media_class: track
navigateIds:
- {}
- media_content_type: spotify://library
media_content_id: spotify://01JCEFPP9JGEXVASQH87S50A4H
- media_content_type: spotify://current_user_followed_artists
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/current_user_followed_artists
- media_content_type: spotify://artist
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:artist:7w9jdhcgHNdiPeNPUoFSlx
- media_content_type: spotify://album
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
browse_entity_id: media_player.sonos_move
target:
device_id:
- 099afbc88908e69895633e1fdca1050c
- conditions:
- condition: template
value_template: "{{ wait.trigger.event.data.action == action_kueche }}"
sequence:
- action: media_player.play_media
metadata: {}
data:
media:
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
media_content_type: spotify://album
metadata:
title: Going Out In Style - Live at Fenway Edition
thumbnail: >-
https://i.scdn.co/image/ab67616d0000b2736b991c69cc5c93afdc0271fd
media_class: album
children_media_class: track
navigateIds:
- {}
- media_content_type: spotify://library
media_content_id: spotify://01JCEFPP9JGEXVASQH87S50A4H
- media_content_type: spotify://current_user_followed_artists
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/current_user_followed_artists
- media_content_type: spotify://artist
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:artist:7w9jdhcgHNdiPeNPUoFSlx
- media_content_type: spotify://album
media_content_id: >-
spotify://01jcefpp9jgexvasqh87s50a4h/spotify:album:3hGF53jgy4q2rTGiIfdxYN
browse_entity_id: media_player.sonos_move
target:
device_id:
- 120842470b368a43660069cccac70eee
mode: restart
Viele Grüße
Armin



