Hi,
This is my first ever try with HA, i installed it manually on my RBP3, the aim of this is that I wanted to say hey google good morning, it would dim the lights (already done through smartthings) AND play music on chromecast (I have the 2nd gen chromecast not audio) <- this i got told can only be done with HA
So now i installed it and i used the following in my configurations.yaml:
radio538:
alias: Play Radio on Chromecast Audio
sequence:
- service: media_player.volume_set
data_template:
entity_id: >
{% if is_state("input_select.chromecast_radio", "Livingroom") %} media_player.ca_livingroom
{% elif is_state("input_select.chromecast_radio", "Hall") %} media_player.ca_hall
{% elif is_state("input_select.chromecast_radio", "Bedroom") %} media_player.bed_room
{% elif is_state("input_select.chromecast_radio", "Bathroom") %} media_player.ca_bathroom
{% elif is_state("input_select.chromecast_radio", "Everywhere") %} media_player.home_group
{% endif %}
volume_level: '{{ states.input_slider.volume_radio.state }}'
- service: media_player.play_media
data_template:
entity_id: >
{% if is_state("input_select.chromecast_radio", "Livingroom") %} media_player.ca_livingroom
{% elif is_state("input_select.chromecast_radio", "Hall") %} media_player.ca_hall
{% elif is_state("input_select.chromecast_radio", "Bedroom") %} media_player.bed_room
{% elif is_state("input_select.chromecast_radio", "Bathroom") %} media_player.ca_bathroom
{% elif is_state("input_select.chromecast_radio", "Everywhere") %} media_player.home_group
{% endif %}
media_content_id: >
{% if is_state("input_select.radio_station", "Radio 538") %} http://vip-icecast.538.lw.triple-it.nl:80/RADIO538_MP3
{% elif is_state("input_select.radio_station", "Q-Music") %} http://icecast-qmusic.cdp.triple-it.nl/Qmusic_nl_live_96.mp3
{% elif is_state("input_select.radio_station", "3FM") %} http://icecast.omroep.nl/3fm-bb-mp3
{% elif is_state("input_select.radio_station", "100% NL") %} http://stream.100p.nl/100pctnl.mp3
{% elif is_state("input_select.radio_station", "Veronica") %} http://8543.live.streamtheworld.com/VERONICACMP3
{% elif is_state("input_select.radio_station", "Sky Radio") %} http://8623.live.streamtheworld.com:80/SKYRADIOAAC_SC
{% elif is_state("input_select.radio_station", "Arrow Classic Rock") %} http://91.221.151.155/listen.mp3
{% elif is_state("input_select.radio_station", "Classic FM") %} http://19143.live.streamtheworld.com/CLASSICFM_SC
{% elif is_state("input_select.radio_station", "BNR Nieuwsradio") %} http://icecast-bnr.cdp.triple-it.nl/bnr_mp3_96_03
{% elif is_state("input_select.radio_station", "Smooth Jazz Tampa") %} http://us3.internet-radio.com:8007/listen.mp3
{% elif is_state("input_select.radio_station", "Classic Rock Florida") %} http://listen.shoutcast.com/Classic-RockFlorida
{% elif is_state("input_select.radio_station", "Bob Sinclar Radio") %} http://listen.shoutcast.com/prysmradio09-mp3
{% elif is_state("input_select.radio_station", "Chill Out Zone") %} http://air.chillout.zone:8000/radio
{% elif is_state("input_select.radio_station", "SLAM! Hardstyle") %} http://stream.radiocorp.nl/web11_mp3
{% elif is_state("input_select.radio_station", "Sleep Radio") %} http://37.59.28.208:8722/stream
{% elif is_state("input_select.radio_station", "Ambient Sleeping Pill") %} http://perseus.shoutca.st:8447/h
{% elif is_state("input_select.radio_station", "Radio Art - Sleep") %} http://live.radioart.com/fSleep.mp3
{% elif is_state("input_select.radio_station", "Ambi Nature Radio") %} http://94.23.252.14:8067/stream
{% elif is_state("input_select.radio_station", "Calm Radio - Sleep") %} http://streams.calmradio.com/api/39/128/stream
{% elif is_state("input_select.radio_station", "Dinamo.FM Sleep") %} http://channels.dinamo.fm/sleep-aac
{% endif %}
media_content_type: 'audio/mp4'
I now get the activate but nothing happens…
I can see my Chromecast widget and my Google home widget as well, the logs shows this:
2017-09-24 18:42:12 INFO (MainThread) [homeassistant.helpers.script] Script Play Radio on Chromecast: Executing step call service
2017-09-24 18:42:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1972524368-57, domain=media_player, service_data=entity_id=, media_content_id=, media_content_type=audio/mp4, service=play_media>
2017-09-24 18:42:12 ERROR (MainThread) [homeassistant.core] Invalid service data for media_player.play_media: Entity ID is an invalid entity id for dictionary value @ data[‘entity_id’]. Got ‘’
2017-09-24 18:42:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972524368-57>
2017-09-24 18:42:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1972524368-55>
2017-09-24 18:42:12 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=script.radio538, old_state=<state script.radio538=off; last_triggered=2017-09-24T20:36:52.562368+02:00, friendly_name=Play Radio on Chromecast @ 2017-09-24T20:34:24.628233+02:00>, new_state=<state script.radio538=off; last_triggered=2017-09-24T20:42:12.046148+02:00, friendly_name=Play Radio on Chromecast @ 2017-09-24T20:34:24.628233+02:00>>
Any help is appreciated