Hi all,
I have my Dashboard views casting to my Google Home Nest Hub v2 working, with a Media Control Card:
If I select the Dashboard View, it will be send to the Google Hub. But I have to do this by hand:
:
I also have an alarm system setup with Alarmo. I had used the tutorial from Juan MTech for this. He is using scripts to Start Alarm and Stop Alarm which are used in the Alarmo Card. This is working fine.
Bu now I want to add in the Stop Alarm Script the action to Cast by dashboard again. And I cant get it to work.
This is the Yaml code of the Stop Alarm Script:
alias: 01 - Alarm - Stop sirene
sequence:
- service: media_player.turn_off
data: {}
target:
entity_id:
- media_player.hobbykamer
- media_player.nest_hub_wk_2
- service: media_player.volume_set
data:
volume_level: 0.2
target:
entity_id:
- media_player.hobbykamer
- media_player.nest_hub_wk_2
- service: media_player.play_media
target:
entity_id: media_player.hobbykamer
data:
media_content_id: media-source://radio_browser/96126f56-0601-11e8-ae97-52543be04c81
media_content_type: audio/mpeg
metadata:
title: NPO Radio 1
thumbnail: >-
https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/NPO_Radio_1_logo_2014.svg/640px-NPO_Radio_1_logo_2014.svg.png
media_class: music
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://radio_browser
- media_content_type: music
media_content_id: media-source://radio_browser/language
- media_content_type: music
media_content_id: media-source://radio_browser/language/nl
- service: media_player.play_media
target:
entity_id: media_player.nest_hub_wk_2
data:
media_content_id: /g-home/
media_content_type: lovelace
metadata:
title: Huis Bl-45
thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: lovelace
media_content_id: ""
- media_content_type: lovelace
media_content_id: /g-home/
- service: automation.trigger
data: {}
target:
entity_id: automation.01_cast_dashboard
mode: single
icon: mdi:bullhorn-variant
The Google Hub part is the last part of the script.
And this is the (simple) Yaml code of the Media Control Card which is working correctly:
type: media-control
entity: media_player.nest_hub_wk_2
BTW, In order to overcome the 10 second Google timeout with the casting, I also use the Blueprint from Timed-ThomasDOM
If I change the casting dashboard part to cast a radio, then it works; as soon as I run the Alarm Stop script (with the radio configured) then the radio comes back on.
But this is not working with the dashboard view…
Anyone who has an idea what I might be doing wrong?
Kind regards, Bert