This is amazing!! I just installed Home Assistant, and I am absolutely mindblown. After years of using TuneIn on my Nest Mini I feel finally like I can breathe! THANK U !!
@BeardedTinker Жыл бұрын
Great to hear! Don't forget to check my Music Assistant video too. It adds some other options to playing media.
@clairerovic2 жыл бұрын
I must say I do enjoy your channel - especially some of the deeper dives (for me) this was perfect to take my knowledge level up one notch. This worked beautifully and very happy with the outcome, just for fun I added the below to stop the speaker. Especially as the stream was often out of sync from the initially started stream. Anyway off to discover how to move the stream easily. Have an awesome 2022. radio_play: alias: Play Radio on Chromecast sequence: - service: media_player.turn_off entity_id: - media_player.lounge_speakers - media_player.study_speaker - media_player.master_speaker - service: media_player.volume_set
@BeardedTinker2 жыл бұрын
Thank you Claire very much - really appreciate your comment!!! Check also this link here - github.com/BeardedTinker/Home-Assistant_Config/commit/f80c4c63ffbe272e75c7338ccdf25283f76f6a79 I've improved and added some things like the STOP you also added, but also mute, volume up/down etc.
@ESK8IL3 жыл бұрын
thank you for a great video! unforetnly my result is - entity not available input_select.radio_station and the same for input_select.radio_speaker and the same for input_select.radio_volume..... i did everything step by step like you did... what am i doing wrong?
@tdse25042 жыл бұрын
Hi BeardedTinker! Thank you for your tutorials. I tried this one but it does not work with “Chromecast-Buitin” on my my Pioneer AVR. It seems to be a problem in general since normal apps do not work with chromecast either. I installed an integration (onkyo) which works properly and I can change the volume, the source, and switch it on and off. With the following automation I can change the radio (dab) channels with 1 automation for each channel ( shell_command: onkyo_command: onkyo --host {{ ip }} {{ cmd }} ): 'xxxxxxxxxx': alias: 107.7 sequence: - service: shell_command.onkyo_command data: ip: 192.168.9.28 cmd: preset=6 - delay: 1 Could you please outline how to change your approach so that I can use my channels with your solution. Thank you. Thomas
@lupuid2 жыл бұрын
KZbin has one issue, I cannot put like twice! :-) Great video! I was not aware on how to define a choice list! Thank you!
@BeardedTinker2 жыл бұрын
Thank you 😂 really mean a lot!!!
@synco19854 жыл бұрын
Hello, man, I really love your channel and your work. Keep it up. Best regards from Romania! Have a really nice day!
@BeardedTinker4 жыл бұрын
Hey Mihai! Thank you very much for your comment and support! And best regards from Croatia!
@daveocatnz Жыл бұрын
Awesome thanks for this, i had issues copying the code and getting all the indents correctly, i didn't realize how much 2 spaces 4 spaces or 6 makes such a difference in the yaml.
@BeardedTinker Жыл бұрын
Those are of of the main things you learn with YAML :) it has to follow strict rules. Glad you got it running at the end!
@Zumpic3 жыл бұрын
Awesome guide, big thanks for the help. I will be more carefull with capital letters and spacing in the future
@BeardedTinker3 жыл бұрын
Thanks Tobias! We've all been there ☺️
@wilcosmit21032 жыл бұрын
Hi BeardedTinker, nice and clear tutorial. Just a question. i want to switch my Denon receiver to the correct source (Network) when choosing the Run command. do you think that this is possible?
@BeardedTinker2 жыл бұрын
Sorry for a late reply. Really not sure. Never played with Denon receiver. One possible way is to add change source in script so it changes it to one you need when you hit run. Or create automation that would be triggered by service. But this is just my guess as I didn't try anything like that.
@Runehorn3 жыл бұрын
This looks like a nice system, whenever I get my house smart speakered up, I will give it a go.
@BeardedTinker3 жыл бұрын
And it really woks nicely. You can also check my repository on GitHub, I've extended this a bit there to include also radio station logos.
@EsotericArctos4 жыл бұрын
Thank you for this. I have worked on a few scripts in the past, but grabbing the URL for radio stations seems to be trickier than it looks. Anyway, another thank you as this is helpful to me :)
@BeardedTinker4 жыл бұрын
Thanks for the comment Brendan! Yes, getting URL is annoying - most of the radio stations are free to air and still getting direct URL feels like you need to hack instead of being more openly available. Hope you'll enjoy this!😉
@wvidal20072 жыл бұрын
Hi it is a great video. But I could not play in my Bose 500. Any hints?
@BeardedTinker2 жыл бұрын
Sorry for a late replay - not sure really. It is can be added as media player it should work. But also depends on what kind of audio streams it can play. Google speaker (while low in audio quality) have a large range of supported formats. Some others can't play all types of the stream.
@hot_dammn90252 жыл бұрын
Awesome video and explained very well. I am just starting out with home assistant and have learnt so much from your explanations. I was wondering. Is it possible to cast the radio to a group of speakers through out my house, so it is playing everywhere? Can this also be done with Sonos or Bose speakers as well? Thank you!
@BeardedTinker2 жыл бұрын
Welcome to HA club :) and thank you for your comment! There are few ways on how you can do group streaming. You can create media_player group (www.home-assistant.io/integrations/media_player.group/) This is simplest way to do it. Other thing what I did was create group inside Google Home App and this group is then also pushed and available in Home Assistant. Sonos should work with this script too, but I think it needs radio station name (Display name) to play it, and not URL. I haven't got a single Sonos speaker to test it, but I know some are using this with them.
@gyorgysodar2 жыл бұрын
This is a great and very usefull video. Thank you to create it! All steps was really clear for me. Only the last steps when I called Play Radio on Chromecast script (script.radio_play) is not visible in my list. Do I need to create this script separately, or have I done something wrong? Thank you!
@BeardedTinker2 жыл бұрын
Sorry for a late reply - yes, you need to copy the script to and put it under your other scripts. Here is link to my repository and this play script: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml
@gyorgysodar2 жыл бұрын
@@BeardedTinker Thank you!
@chemi18993 жыл бұрын
Amazing work... im following your channel since a few mounths ago... i have a question, you use ths for chromecast speakers.... this works with Alexa speakers?. Thanks in advice
@BeardedTinker3 жыл бұрын
Thank you Jose Maria!!! There is here in the comments somewhere how to for making it work with Alexa. It's even easier as you can use name of the station from TuneIn, instead of using stream URL.
@chemi18993 жыл бұрын
@@BeardedTinker Tanks man... now it works... the problem now is to get the correct radio station becouse seems the name is not the same than the madia linck that you use on Chromecast
@BeardedTinker3 жыл бұрын
@@chemi1899 I think that it uses names of the radio station from TuneIn. This was sample that Strider wrote: {% if is_state("input_select.radio_station", "The Pulse") %} WZFJ And then change media_content_type: 'TUNEIN' and this will utilize native radio in Alexa.
@kmtsvetanov9 ай бұрын
Hello I need a little help. How to all music to HA? Do I need a normal speaker? Can I do it without chrome cast or any other outside of my network clolds like google? I;m looking for 5 days now ....
@BeardedTinker9 ай бұрын
If you have local music, you can use samba share to expose it to HA and than use any media_player you have to play it on that speaker. But you need to have media_player already available in HA.
@herxemer0073 жыл бұрын
Nice Video. Does it work with Sonos speakers?
@BeardedTinker3 жыл бұрын
If I remember correctly, yes. I don't have them myself, but I think someone posted that it works. If it can be added to Home Assistant, and if it is seen as media_player, then the only possible problem could be media stream format. And most should play on Sonos.
@ninasmart31033 жыл бұрын
I really enjoy your videos they have helped me so much. I am just starting out and you are my go-to when I need help. I am however having a problem this time. I was able to pull the URL streams for a few stations, but I am not able to locate them on a few other stations. They do not display media as file type, however, there are a number of mp2t files. How do I get the URL in those cases?
@BeardedTinker3 жыл бұрын
Much appreciated Nina!! OK - so unfortunately, not all stations can be played this way - most can, but some can't. MP2T if I'm not mistaken is video stream and that will not work. Google is picky about what it allows to be played, but not as picky as Sonos for example.
@ytwoen41373 жыл бұрын
Yet again a nice tutorial!!! I love it and set it up directly. I would like to the same with youtube music in combination with the mini media player that is in HACS. Aby plans for that :D ? I love your work sir!
@BeardedTinker3 жыл бұрын
Thank you for your comment!!! I did look into that but still haven't tried it myself. Will do it definitely but no idea when.
@theC0cky12 жыл бұрын
New to HA, love the vids. I was able to follow everything but got stuck running on Alexa. I noticed that you mentioned that there was one small modification... I can't find the modification... Love the videos, keep up the great work... Hopefully I'll learn enough to contribute one day
@BeardedTinker2 жыл бұрын
If I remember correctly, you need to change in script meda_type to TUNEIN, and then instead of URL copy exact name of radio station from TuneIn. BUT!!! Looks like 2022.3 version of Home Assistant will introduce embedded radio player, so you may wait for that one and see if it will fit you more.
@theC0cky12 жыл бұрын
@@BeardedTinker Thanks so much!!!!
@meluvalli2 жыл бұрын
For some reason, I can't get this to work. I'm trying to do it with an Alexa. I have my speaker setup, it sets the volume correctly, but then when it goes to stream the music Alexa says: "Sorry, text to speech can only be called with the notify.alexa_media service" It doesn't start the stream. I even tried one of the streams you have in the video.
@BeardedTinker2 жыл бұрын
I've replied you on Discord. But short answer here. content_type: should be TUNEIN for Alexa And I think instead of radio URL, you need to use name of radio station from TuneIn.
@mongizeglam51682 жыл бұрын
Hi ,thks for the tutorial,tried with echo but no luck ,i have an error when run the exec button ,the cho says that only tts are available...
@BeardedTinker2 жыл бұрын
Echo devices are a different beast! But since HA now was Radio Browser embedded in it, you may try using that one instead. If you want to try Echo with this script, you have to replace few things. Instead of URL you'll have to use Radio station name, exact name from TuneIn and instead of media_content_type: audio, type TuneIn. That way Echo will use TuneIn app to match radio name there.
@fotiskanellopoulos3 жыл бұрын
Hello. I cannot find the script anywhere. I have placed the code in scripts.yaml but it is nowhere to be found, not even in configuration/scripts where I have other scripts. Am I doing something wrong ?
@BeardedTinker3 жыл бұрын
You should add this code from scripty.yaml to where ever you already have scripts. If it's in configuration.yaml file put it there at the bottom, if you have all in some other file, it needs to be there. I have split configuration and for me every script is in separate file in folder/scripts.
@fred7flinstone3 жыл бұрын
I don't see any stream links on the radio station I am looking for on tune in. I can see adds, scripts, stylesheets, gifs and xhr only. Am I missing something? Great tutorial by the way.
@BeardedTinker3 жыл бұрын
Hey Steve! You should have at least one of the links in dev tools that has very long bar indicating lot of traffic. That should be the link to stream.
@fred7flinstone3 жыл бұрын
@@BeardedTinker Thanks, I've been looking but there is nothing there that matches that description. Just the files I've mentioned. I'm using chrome on a Mac if that makes any difference.
@BeardedTinker3 жыл бұрын
Can you post a link to webpage of the station on Tunein. I'll try to have a look.
@SVRockChalk3 жыл бұрын
Should this work with Amazon Alexa? I have not stations being played? Thx.
@BeardedTinker3 жыл бұрын
For Alexa, media type has to me TuneIn and you don't have to use URL, you can use radio station name from TuneIn
@tinkarakovse63613 жыл бұрын
Hello BeardedTinker i have problem i have already script: !include scripts.yaml in configuration.yaml in use,how to add another scripts. tnx
@BeardedTinker3 жыл бұрын
There are 2 ways to do it. Easy way is just to add script inside scripts.yaml, at the bottom of your file. Just be careful that alignment matches one above.
@svenmartin46853 жыл бұрын
Hi, I have a problem only with the sript, please can you help me?
@BeardedTinker3 жыл бұрын
If you post it on Discord server, I can try and help.
@user-zr7kz4vs7c2 жыл бұрын
Thank you for your video! Possible to play youtube music from Home assistant to google home mini? Thanks
@BeardedTinker2 жыл бұрын
There is HACS integration called KZbin Music Player - it should enable you to use your KZbin music in Home Assistant and also stream from there.
@user-zr7kz4vs7c2 жыл бұрын
@@BeardedTinker thanks a lot!
@GioBen682 жыл бұрын
great tutorial thank you ! I struggle to find a way to resume playing the radio channel once a tts message was transmitted. is there a way to avoid tts stopping the music or that music resumes after tts ? thank a lot
@BeardedTinker2 жыл бұрын
Unfortunately, not so easy and not with this setup. That's the problem since smart speaker doesn't know what is being played on it and considers both TTS and media same. I was looking at resolving this with Assistant Relay (addon). It would use Broadcast instead of TTS, and by doing so, it would continue playing what was played before. BUT it's not being developed anymore and project has no maintainer - converting all of the TTS to broadcast just to have some small change on Google side kill it would be in my opinion pointless.
@GioBen682 жыл бұрын
@@BeardedTinker thanks a lot for your prompt response. one day maybe something will be available ;-) and not a major issue anyway. I can still resume with home assitant :-D have a good day and keep on the great work !
@rokacio143 Жыл бұрын
Hey there, how can I troubleshoot this? I have set up everything, the Entities card looks good, but the radios just won’t start playing. I have checked the radio URLs in VLC, they all work there
@BeardedTinker Жыл бұрын
You can start with checking logs. If there was an error when starting to play. What speakers are you using to play radio?
@rokacio143 Жыл бұрын
@@BeardedTinker Ikea Symfonisk (Sonos) and Belkin Soundconnect. Both worked in HA before
@rokacio143 Жыл бұрын
@@BeardedTinker But anyways, I ended up going a different path, using the Mini Media Player, the setup there was pretty easy
@BeardedTinker Жыл бұрын
Ahh, this works best with Google Speakers. Problem is different speakers require different formats etc. For ex. Alexa works if you instead of URL use radio station name and instead of type: music use type: tunein. But glad you got it sorted.
@aryeguetta85924 жыл бұрын
Would it work on any version of HA? I have 0.114 and I am not able to make it work. Thanks Edit: Managed to figure out what I was missing - Need to put 'data template' and not data - Maybe it because I don't have the new media in my HA (that starts from version 0.115) - that might be the cause.
@BeardedTinker4 жыл бұрын
Nice catch - yes, _template got removed... Media is not necessary I think.
@jeremyharris2463 жыл бұрын
Great tutorial, thank you. I was getting a 'string index out of range' error and after plenty of googling and head scratching, saw that it was just a good old typo in the if statements - 'iput_select.radio_speaker'! One thing I did need to change in the script was to specify the volume_level value as a float: Line 14: volume_level: '{{ states("input_number.radio_volume") | float}}' otherwise would get this error: Invalid data for call_service at pos 1: expected float for dictionary value @ data['volume_level']
@BeardedTinker3 жыл бұрын
Thanks! I've had my share of typos there :) Haven't seen error for float there - thanks for this if I ever encounter it!
@techtim3 жыл бұрын
@BeardedTinker I've followed your video to a T and everything works except the scripts part. I've confirmed that my "configuration.yaml" file has "script: !include scripts.yaml" loaded but no matter what when I go to add it as an Entity on the last step of your tutorial it never appears. What could I be missing? Thank you for your help.
@BeardedTinker3 жыл бұрын
Do you have any other script in that file? Or maybe a script inside configuration.yaml file? Also, when you go to Configuration - Scripts - do you have any script there? And have you restarted Home Assistant maybe?
@techtim3 жыл бұрын
@@BeardedTinker Thank you for your quick reply. In the configuration file I have "script: !include scripts.yaml", noted below. Under "Configuration - Scripts -" nothing is listed there. And I have restarted multiple times, no luck... =( :Configuration file: # Configure a default setup of Home Assistant (frontend, api, etc) default_config: # Text to speech tts: - platform: google_translate group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml input_number: !include input_number.yaml input_select: !include input_select.yaml
@BeardedTinker3 жыл бұрын
Missed your answer. Ok. And is your scripts.yaml file located in same folder as configuration.yaml and can you just check spelling of the name (for ex. script.yaml Vs scripts.yaml etc) In scripts.yaml file, how is first line indented? Does it have any space befor it? This is really strange as it is completely ignoring and not loading anything from it. BTW currently I'm experiencing something similar but with rest_command - it's just ignoring it. Can't figure out what happened as it worked in previous version. And on what HA version are you currently,?
@BeardedTinker3 жыл бұрын
And one additional thing... Can you create one simple script using UI editor - just anything. And check if you see it added to your scripts.yaml file?
@techtim3 жыл бұрын
@@BeardedTinker No problem. Yes I've verified all that. When I use the UI editor scripts work great. However inputting this one in manually just won't work.
@tommysecondspace69773 жыл бұрын
Hey, this worked great. Everything workes fine, but how to switch the radio off? :-) I could not find anything in the home assistant media player integration doku that stops the player, except changing the volume to zero. there must be a simple solution i do not see.
@BeardedTinker3 жыл бұрын
It's like Pringles - once you open it, you can't stop :) Please check this issue here. I've expanded Radio functionality to also include nice buttons, including STOP :) github.com/BeardedTinker/Home-Assistant_Config/issues/29
@tommysecondspace69773 жыл бұрын
@@BeardedTinker Thanks so much! That looks great. More things to play with. ;-)
@BeardedTinker3 жыл бұрын
@@tommysecondspace6977 it's always fun to add more stuff. Wish I had more time ...
@jepeswe4 жыл бұрын
Hello BeardedTinker. I folloed this guide but my HA wil not accept this, i get this error in check the configuration. Invalid config for [input_select]: initial state Nrj is not part of the options: Nrj Sverige for dictionary value @ data['input_select']['radio_station']. Got OrderedDict([('name', 'Select Radio Station'), ('options', ['Nrj Sverige']), ('initial', 'Nrj'), ('icon', 'mdi:radio')]). (See /config/configuration.yaml, line 160). I only have one station for now and one speaker, but it should work anyway?
@BeardedTinker4 жыл бұрын
Hi Jerry! Just to make sure - radio is called Nrj Svierge? Did you put name for initial value in quotes '' - if not, can you try with it?
@jepeswe4 жыл бұрын
@@BeardedTinker The radio name have to be exactly what its called at tune in? tunein.com/radio/NRJ-Sverige-1051-s2340/ the link to the station # Radiokanaler radio_station: name: 'Select Radio Station' options: - 'Nrj Sverige' initial: Nrj icon: mdi:radio radio_speaker: name: 'Select Speaker' options: - 'Köket Ikea' initial: 'Köket Ikea' icon: mdi:speaker-wireless
@BeardedTinker4 жыл бұрын
No, it's up to you - stream URL is only important thing. You can shorten the name if you want. But if radio station has two words for the name, use quotes like this 'For Name' of radio station.
@lelandclayton54624 жыл бұрын
@@jepeswe Try it with double quotes instead of single so instead of 'Nrj Sverige' use "Nrj Sverige"
@BeardedTinker4 жыл бұрын
We switched to Discord in the middle of this. Problem was that initial state for radio_station (Nrj) didn't match any available options (Nrj Sverige).
@a.dekater7534 Жыл бұрын
Thanks for this Beardman. Nice video and I'm going to us it. A faster way to get the URL's for the streams is radio-browser Now I still have to fix that when playing music and the washing machine is ready it sends an message, the music stops. I wish there was an easy way to continue playing.
@BeardedTinker Жыл бұрын
Check Google Resume Blueprint/package - I'm using it myself to continue playing music after TTS announcement.
@pahl99 Жыл бұрын
First I like to say thanks for another very good video and instructions. followed instructions but when Card is in place my Execute button (scrips.play_radio) is not there and text is gray. Would I have missed anyting? Anyone who have any ideá why?
@BeardedTinker Жыл бұрын
Did you see anything in log files? Maybe there is an error in script. Most common error is typo (extra space, missing quotes, etc). And to confirm, this script is still working (currently listening radio with it).
@padlefot3 жыл бұрын
Hi, whats a good way to debug this? I implemented it all but nothing happens when I hit the "execute" button. :)
@BeardedTinker3 жыл бұрын
The only thing that pops on my mind is to try and play radio URLs directly from HA without this. Copy URL and use Developer Tools, Services - and here type media_player.play_media and fill in required fields: - entity id - where you want to play it - content id - URL - type - audio/mp4 or try music
@henkdeboer43023 жыл бұрын
Amazing man! 1 question is it possible to change the name execute to play in de card?
@BeardedTinker3 жыл бұрын
I have a bit improved setup, by using picture glance card, where I used standard play icon to execute script. Full script (with card yaml code) is here github.com/BeardedTinker/Home-Assistant_Config/issues/29
@henkdeboer43023 жыл бұрын
@@BeardedTinker thanks it work 1 play the radio on my google home hub with screen. How I can add a picture?
@BeardedTinker3 жыл бұрын
@@henkdeboer4302 When streaming radio? I'm not sure you can do that. Some radio streams have image in them, others not. If you would try to push image, it would stop playing. Searched a bit now about that, and the only way would be to capture stream and re-encode it with image.
@patrikritzen37192 жыл бұрын
Hi, great video! However, everything works fine but when I press execute nothing happens.. Any ideas?
@BeardedTinker2 жыл бұрын
There is probably error in the log file - my guess are few thigs: - you have error in script file - there is an error in the URL of the radio you are using - if you are using external scripts.yaml, you ddin't specify: script: !include scripts.yaml In script you probably made an typo somewhere if that's the error. Or lines are not spaced as needed.
@patrikritzen37192 жыл бұрын
Found the problem, had put : instead of _ in two lines, beginners mistake 😀
@svenmartin46853 жыл бұрын
Hi, now everything is Running fine but The only thing is that I cannot change the volume…. What could be the reason for this?
@BeardedTinker2 жыл бұрын
Hi Sven, looks like I missed the message. Do you see any error in log file when you try to change the volume?
@mervynmtajem50823 жыл бұрын
Hi thanks for the tutorial..I can only get the 1st 2 stations to work. I followed the tutorial to the T but still cant get the others to work
@BeardedTinker3 жыл бұрын
It's very hard to debug this - but from other having issues this is what it usually ended up being the problem: - stream is in format that is not supported by speakers - typo in name/url to the stream - other typos (in media player name, ...) If you can, try pushing the stream directly to your speaker to see if it is supported or not. That would be first thing I would check.
@njord197713 жыл бұрын
hi, i have a problem whit this. here is my log error: play radio: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id'] can you please help me. thnx!!
@BeardedTinker3 жыл бұрын
Can't tell from this, but check that you haven't missed , somewhere, that player/speaker is named correctly. Usually this error is some small typo somewhere.
@nunobexiga3 жыл бұрын
Good morning. ;) I have the same issue... when trying to play. Did you fixed it? How? Thanks
@hanreelick6722 жыл бұрын
Great tutorial. Stil having a problem getting it running. When i try to run the script i get an error: "Error rendering data template: Result is not a Dictionary" Could you tel me what i do wrong?
@BeardedTinker2 жыл бұрын
You probably have formatting issue somewhere. Hard to guess what and where. This is also most conman problem. BUT - one hint, wait a few days until version 2022.3 of Home Assistant is released. It will have everything embedded as internal Radio integration and it will be much easier to add and use ;)
@hanreelick6722 жыл бұрын
Thanks for the quick response. Looking forward to the new release. But i' am stil curious what i'm doing wrong here. I checked the srcipts.yaml file over and over but can' t find any issiues. Perhaps you can take a look? radio_play: alias: Play Radio on Beo sequence: - service: media_player.volume_set data: entity_id:> {% if is_state("input_select.radio_speaker", "Beosound Shape") %} media_player.beosound_shape_2 {% elif is_state("input_select.radio_speaker", "Stage") %} media_player.stage_2 {% endif %} volume_level:'{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id:> {% if is_state("input_select.radio_speaker", "Beosound Shape") %} media_player.beosound_shape_2 {% elif is_state("input_select.radio_speaker", "Stage") %} media_player.stage_2 {% endif %} media_content_id:> {% if is_state("input_select.radio_station", "Arrow Classic Rock") %} stream.player.arrow.nl/arrow {% elif is_state("input_select.radio_station", "Radio 10 Gold") %} 22553.live.streamtheworld.com/RADIO10.mp3?dist=tunein {% elif is_state("input_select.radio_station", "Qmusic") %} stream.qmusic.nl/qmusic/mp3 {% elif is_state("input_select.radio_station", "Radio 538") %} 23613.live.streamtheworld.com/RADIO538.mp3?dist=tunein {% endif %} media_content_type:"music" @@BeardedTinker
@BeardedTinker2 жыл бұрын
From what I've seen, there is one error with spacing - entity_id:> it has to have space after : Also, same error for media_content_id:> - needs space after: . One additional place, same error: volume_level:'{{ Check where ever you have ":" that there is space after it. Looms there is additional one at the end :) media_content_type:"music" - same
@hanreelick6722 жыл бұрын
@@BeardedTinker Thank you very much. I was trying to get this working the whole day and now it does for most of the functions. The only thing that does't work is changing the volume.
@stephencallnan34823 жыл бұрын
Hi, Just starting to learn. I don't have an entity called script.radio_play. "Play Radio on Chromecast" is not in the dropdown. Have I missed something? Everything else seems to check out, except the play button :(. Time stamp 24.09
@BeardedTinker3 жыл бұрын
I'm on vacation now and have mobile phone access only so it's hard to write. But, check if your scripts file is loaded in home assistant. I don't know if you already have any other script or not. If not you can add (but please verify as I'm typing on the phone) script: !include scripts.yaml And use the code I posted there. You can also search for that file in my GitHub repository - in scripts folder. github.com/BeardedTinker/Home-Assistant_Config
@stephencallnan34823 жыл бұрын
@@BeardedTinker Thank you for your reply. I very much enjoyed your video. I think I've verified it correctly. "script: !include scripts.yaml" is entered in my configuration.yaml file. The scripts.yaml file was empty and I put the entries as in your video. In the video, the 4th entity is called "Play Radio on Chromecast" using script.radio_play. That doesn't show up in the drop down on my system. I successfully have configuration validation.
@BeardedTinker3 жыл бұрын
Sorry, was travelling whole day and just got home. Hard to guess without seeing the code, but I would bet on wrong formatting of the code - space in front of it, wrong quote or something like that. Did you restart home assistant after adding the script? Was there any error during startup related to it? If you by any chance have Discord, you could post your code here discord.gg/HkxDRN6 - just so I can check it if formatting is OK or not. My whole script is here: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml
@stephencallnan34823 жыл бұрын
@@BeardedTinker Just to understand, if the script was loaded, it would show script.radio_play in the entity drop-down? this is my script.yaml # Radio play script radio_play: alias: Play Radio on Chromecast sequence: - service: media-player.volume_set data: entity_id: > {% if is_state("input_select.radio_speaker", "Living Room Speaker") %} media_player.aliving_room_speaker {% elif is_state("input_select.radio_speaker", "Living Room TV") %} media_player.Living_room_tv {% elif is_state("input_select.radio_speaker", "Bedroom Speaker") %} media_player.bedroom_speaker {% elif is_state("input_select.radio_speaker", "Kitchen Speaker") %} media_player.kitchen_speaker {% elif is_state("input_select.radio_speaker", "Porch Speaker") %} media_player.entryway_speaker {% endif %} volume_level: '{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id: > {% if is_state("input_select.radio_speaker", "Living Room Speaker") %} media_player.Living_room_speaker {% elif is_state("input_select.radio_speaker", "Living Room TV") %} media_player.Living_room_tv {% elif is_state("input_select.radio_speaker", "Bedroom Speaker") %} media_player.bedroom_speaker {% elif is_state("input_select.radio_speaker", "Kitchen Speaker") %} media_player.kitchen_speaker {% elif is_state("input_select.radio_speaker", "Porch Speaker") %} media_player.porch_speaker {% endif %} Media_content_id: > {% if is_state("input_select.radio_station", "WHOU") %} centova.whoufm.com:8000/1?DIST=TuneIn&TGT=TuneIn&maxServers=2&partnertok=eyJhbGciOiJIUzI1NiIsImtpZCI6InR1bmVpbiIsInR5cCI6IkpXVCJ9.eyJ0cnVzdGVkX3BhcnRuZXIiOnRydWUsImlhdCI6MTYyODcyODU5MiwiaXNzIjoidGlzcnYifQ.iLWcEEOlQM-4PpAk0SHeJzfES29bqo2j_AE78OWm_TE {% endif %} media_content_type: 'music'
@BeardedTinker3 жыл бұрын
Yes, it should show up if loaded. I'll have a look at this and get back to you. EDIT: one thing I already see that you have Uppercase M in media_content_id - try fixing this and reload scripts.
@elchinefa9524 Жыл бұрын
Hi. Could you please tell me if it possible to integrate a radio without any external speaker? I mean when you run radio it will play on your PC/Laptop's speaker?And can i use Alexa as speaker? By the way I did everything as you did but getting "Error loading /config/configuration.yaml: in "/config/configuration.yaml", line 18, column 15: Unable to read file /config/input_number.yaml." Thanks in advamce.
@crusadersgaming2630 Жыл бұрын
I got the same error, did you fix it??
@elchinefa9524 Жыл бұрын
@@crusadersgaming2630 Hi. Yes i fixed it. There are a little bir more steps to do. I documented it and have in PDF format. If you want give me ur email address i will send it to u.
@lelandclayton54624 жыл бұрын
That is totally awesome. Thank you.
@BeardedTinker4 жыл бұрын
Thank you Leland! 😃
@stephaneprevost91532 жыл бұрын
I can't seem to get it working. I alway's get this error: Invalid config for [script]: template value should be a string for dictionary value @ data['sequence'][1]['data']. Got None. (See /config/configuration.yaml, line 6).
@BeardedTinker2 жыл бұрын
There are a lot of things that could be wrong from this error: - typo - you misspelled something - not aligned everything correctly Those are 2 most common ones that result in that error. Use mine script here and check for any typo first: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml
@stephaneprevost91532 жыл бұрын
@@BeardedTinker I've copy pasted your script and did the changes to get my stations in it. IT WORKS!!!! On first glance I don't see my error but it's important that it works and now I'm happy. Thank you very much for your quick reply!
@stephaneprevost91532 жыл бұрын
@@BeardedTinker Found it!! In the "volume_level" I've used 1 space in the {{[1 space here] states("input_number.radio_volume")" and in your script it has 2 spaces.
@BeardedTinker2 жыл бұрын
That's Yaml for you :) Glad you got it working! It's fun script. And if you check my GitHub, there are some additions to it - for example, add buttons for stop/start, volume control etc.
@gerritmoss6653 жыл бұрын
Hi there this is an awesome integration method, though I have done all of this with no errors on my validations I still can not run the script.. Its live with no errors but not executing..What I do get after scratching is - Failed to call Service script/radio_play. not a valid value for dictionary value @data ['entity_id'] Any ideas..?
@BeardedTinker3 жыл бұрын
It's very hard to debug it like this. From past, people usually don't format it properly (spacing in front of each line has to be identical as in example), or there is missing ' or ". And lastly there can be , missing. You should look into code for entity_id and try to see if something is typed incorrectly. It can be simple typo
@gerritmoss6653 жыл бұрын
@@BeardedTinker thank you! I’m sure it is! Will check it out! Keep up doing the good work 🤙🏻🤙🏻
@brucerawiri71702 жыл бұрын
Hi BeardedTinker. This works perfectly thank you. Can additional media_content_type: be added in addition to TUNEIN? What I mean is we have a couple of radio stations that I would like to add to this list that are not on Tunein. The streaming service is called "ROVA" So I would have some stations that are on TUNEIN and a few that are on ROVA that I would like to add. Hope this makes sense to you. In the media_content_type: I have TUNEIN and I am not using URLs to for the streams as others have said in this forum, I am sure the radio station name as they appear in TUNEIN and it works no problem. Hope you can help with ideas or options. Cheers
@BeardedTinker2 жыл бұрын
If you are not using Alexa, you should be able to just use the URL for media. For Alexa, not sure, can't test it at the moment, but it would also make it difficult as you would need to match contect_type between stations. Probably doable, but a lot of workarounds...
@brucerawiri71702 жыл бұрын
@@BeardedTinker Thanks for reply. Yes I am using Alexa sadly. I do have a google mini somewhere. Would a google media player be easier? If so what do i put as media_content_type:?? and do I just use the URL Links? Thanks again
@yghezini92344 жыл бұрын
Thanks it's worked for me great
@BeardedTinker4 жыл бұрын
Great! Hope you have some fun with it!!
@borissekulic50386 күн бұрын
Pozdrav drug. Imam problem, uradio sam sve kao i ti ali dobijam error "extra keys not allowed". Da li znaš u čemu bi bio problem?
@borissekulic50386 күн бұрын
Nasao sam da je problem u "entety id" ali ne znam kako da resim to jer je sve dobro upisano. data: entety_id: > {% if is_state("input_select.radio_speaker", "Home Tv") %} media_player.home_tv {% endif %} volume_level: "{{ states(\"input_number.radio_volume\") }}" action: media_player.volume_set
@BeardedTinker4 күн бұрын
Hmm - probaj promjeniti ovo: volume_level: "{{ states(\"input_number.radio_volume\") }}" u ovo: volume_level: {{ states("input_number.radio_volume") }} Nešto mi tu ne valja, ali nisam siguran šta :)
@111Leonidas2 жыл бұрын
Works great! Good tutorial. Unfortunately not every radiostation can be retreived; they seem to do their best to hide their adress. Like troplicalisima merengue, Tropicalisima Bachata, Tropicalisima Salsa etc.
@BeardedTinker2 жыл бұрын
That's right. Some radio station do try and hide stream URLs
@111Leonidas2 жыл бұрын
I just found out that you don't always get the data with F12. Sometimes you also have to pres Ctrl-R and then they appear.
@JoseBerruezo4 жыл бұрын
Great video, but I didn't understand how I can send the radio to listen on Amazon Echo. Could you, please, explain to me in more detail? Thank you
@BeardedTinker4 жыл бұрын
Do you have Amazon Echo available as media_players inside HA? I don't use any Amazon device so can't help you with exact problem, but I know that you have to do that first. There is a custom component for it - github.com/custom-components/alexa_media_player/wiki And with that, you can even set routine for TuneIn and that way you wold use this component for Radio instead of script I created.
@strider114 жыл бұрын
I had to change the Script file > media_content_id portion to the name of the station on TuneIN (ie. ESPN) instead of the URL (the rest of the IF statement is the same.) Here's one of my lines: {% if is_state("input_select.radio_station", "The Pulse") %} WZFJ And then change media_content_type: 'TUNEIN' Those tweaks work for me with Echo devices.
@BeardedTinker4 жыл бұрын
For Alexa? That's great! So it's clever enough to figure that one out. Thanks for the tip!!!
@JoseBerruezo4 жыл бұрын
@@BeardedTinker Thank you
@JoseBerruezo4 жыл бұрын
@@strider11 I will try, thank you
@neilyoung96532 жыл бұрын
Great video and channel Have I done something wrong I’m getting a message saying radio_play not allowed in the script.yaml page
@BeardedTinker2 жыл бұрын
Thank you Neil! I think so - does radio_play have : after it? Not sure what else could be - depends if you have other scripts or not there. Check my script here - and work on it: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml
@neilyoung96532 жыл бұрын
@@BeardedTinker many thanks I will try and let you know how I get on
@neilyoung96532 жыл бұрын
still stuck on this!!!! now my problem is when i press on it starts then stops Play Radio on Chromecast Audio turned off by Neil Young 10:02:31 PM -
@neilyoung96532 жыл бұрын
any ideas why???
@BeardedTinker2 жыл бұрын
No, if you have Discord account, use the link below and post you play_radio yaml in #homeassistant channel It's almost impossible to debug it like this.
@martijn.faberr3 жыл бұрын
hello do you have the whole source code for me including the scripts.yaml file?
@BeardedTinker3 жыл бұрын
Hey Martjin! It's all on my GitHub page: github.com/BeardedTinker/Home-Assistant_Config script: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml speaker selection: github.com/BeardedTinker/Home-Assistant_Config/blob/master/entities/input_selects/radio_speaker.yaml radio selection: github.com/BeardedTinker/Home-Assistant_Config/blob/master/entities/input_selects/radio_station.yaml And here you can find some enhancements: github.com/BeardedTinker/Home-Assistant_Config/issues/29
@forgeforge78723 жыл бұрын
bad indentation of a mapping entry at line 11, column 21: volume_level: '{{ states("input_number.radio ... Get this error in Script,can't find the error in this line!! ^
@BeardedTinker3 жыл бұрын
Hi Forge and sorry for a late reply - very long day at work :D Can you check that this line: volume_level: ... in script is indented same way as the entity_id: > above it - spaces on the right of the text should be the same
@LordNikon-fk3 жыл бұрын
I always get the following error: Invalid config for [script]: invalid template (TemplateSyntaxError: expected token ',', got 'string') for dictionary value @ data['sequence'][0]['data']. Got None. (See /config/configuration.yaml, line 28). I can't find the fault . Can you help me ? My scipts.yaml: # Radio play script radio_play: alias: Play Radio on Alexa sequence: - service: media_player.volume_set data: entity_id: > {% if is_state("input_select.radio_speaker", "Kuche") %} media_player.kuche {% elif is_state("input_select.radio_speaker", Flur") %} media_player.flur {% elif is_state("input_select.radio_speaker", Stube") %} media_player.stube {% elif is_state("input_select.radio_speaker", Schlafzimmer") %} media_player.schlafzimmer {% elif is_state("input_select.radio_speaker", Buro") %} media_player.buro {% endif %} volume_level: '{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id: > {% if is_state("input_select.radio_speaker", "Kuche") %} media_player.kuche {% elif is_state("input_select.radio_speaker", Flur") %} media_player.flur {% elif is_state("input_select.radio_speaker", Stube") %} media_player.stube {% elif is_state("input_select.radio_speaker", Schlafzimmer") %} media_player.schlafzimmer {% elif is_state("input_select.radio_speaker", Buro") %} media_player.buro {% endif %} media_content_id: > {% if is_state("input_select.radio_station", "Bollerwagen") %} ffn-stream21.radiohost.de/radiobollerwagen_mp3-192 {% elif is_state("input_select.radio_station", "FFN") %} tunein.com/radio/radio-ffn-1031-s8954 {% endif %} media_content_type: 'audio'
@BeardedTinker3 жыл бұрын
In each room name, you are missing one " - in front of it. radio_play: alias: Play Radio on Alexa sequence: - service: media_player.volume_set data: entity_id: > {% if is_state("input_select.radio_speaker", "Kuche") %} media_player.kuche {% elif is_state("input_select.radio_speaker", "Flur") %} media_player.flur {% elif is_state("input_select.radio_speaker", "Stube") %} media_player.stube {% elif is_state("input_select.radio_speaker", "Schlafzimmer") %} media_player.schlafzimmer {% elif is_state("input_select.radio_speaker", "Buro") %} media_player.buro {% endif %} volume_level: '{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id: > {% if is_state("input_select.radio_speaker", "Kuche") %} media_player.kuche {% elif is_state("input_select.radio_speaker", "Flur") %} media_player.flur {% elif is_state("input_select.radio_speaker", "Stube") %} media_player.stube {% elif is_state("input_select.radio_speaker", "Schlafzimmer") %} media_player.schlafzimmer {% elif is_state("input_select.radio_speaker", "Buro") %} media_player.buro {% endif %} media_content_id: > {% if is_state("input_select.radio_station", "Bollerwagen") %} ffn-stream21.radiohost.de/radiobollerwagen_mp3-192 {% elif is_state("input_select.radio_station", "FFN") %} tunein.com/radio/radio-ffn-1031-s8954 {% endif %} media_content_type: 'audio'
@LordNikon-fk3 жыл бұрын
@@BeardedTinker WOW. many thanks. Found the bug. Unfortunately, no Alexa device plays a radio station. :(
@BeardedTinker3 жыл бұрын
@@LordNikon-fk for Alexa it's simpler. I know someone also posted this here in comments, but I'll try to remember. I think for media type, you need to change audio/mp4 to TuneIn (can't remember if it needs to have exact capital letters or not). And then instead of URLs you just use exact name of the radio station like it is in Tune In. It should automagically match name with URL for stream. Sorry, have no Alexa and this is only from what I've remembered from someones post here.
@crusadersgaming2630 Жыл бұрын
Hi, thank you very much for the video, on my side didn`t work it give me this on check configuration: Configuration invalid! Error loading /config/configuration.yaml: mapping values are not allowed here in "/config/input_number.yaml", line 3, column 13 I give you thumb up anyway, if you could explain where I mistake, I really appreciate.
@BeardedTinker Жыл бұрын
It's probably in typo in code. Usual ones are missing " or ' in file. By the looks of it, there is error in the list that is used as dropdown. Check line 1, 2 and 3 - and compare with example.
@jamesking8903 жыл бұрын
i keep running into roadblocks setting up the script. has anyone set up the script using the GUI from configuration>scripts area?
@BeardedTinker3 жыл бұрын
This script is intended to be copy/past in YAML. You can use UI, but still you have to add code using YAML. And from what I've seen most of the errors people make are: using caps in names - use only lower case letters, wrong formatting (missing or extra space in front of the line), but also typos. Those were most common mistakes so far. github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml
@jamesking8903 жыл бұрын
@@BeardedTinker probably a spacing issue, but i got it to come up when i put it under script: in my config file. im cool with it there for now. lol thanks for sharing this, and all of your other great videos!
@BeardedTinker3 жыл бұрын
That's great. Problem with the script is that it's very repetitive and everything looks the same - so you can easily go over typo without seeing it. Glad you got it working!!! And thanks for the comment - really appreciate it 🙂
@nytram764 жыл бұрын
How would we add our podcasts to this please ? Is it possible Thanks
@BeardedTinker4 жыл бұрын
Thanks for your comment Martyn. While it could be possible, I don't think that would be best way to do it. You would need to add URL each time there is a new podcast. For example HA Podcast has new url with each episode. And you would need to get that URL and insert in HA.
@nytram764 жыл бұрын
@@BeardedTinker hi. Totally understand. Do you have a vlog or can you do one with how to play podcasts via the speakers in your house ? Would be a great follow up vlog. Also a vlog on hownto have 2 or more home Assistant on same machine. Im using Docker currently. Thanks again Martyn
@BeardedTinker4 жыл бұрын
That's great idea - just have to think of easy way to do it. Will have to test it first.
@aryeguetta85924 жыл бұрын
@@BeardedTinker Can that be done using an RSS feeder for the Podcasts? But, yet gain that would need further manipulation of the script itself.
@BeardedTinker4 жыл бұрын
Yes, I was thinking about that. But easiest way would be to only have latest podcast for wash RSS field available. More then that would probably be too complex.
@99percentsmart754 жыл бұрын
Hello. I like yours videos wery much, and I implement a lot of your stuf to my HA. I'm not wery good in programing, and I'm more of the copy paste men. Can you vrite the code for the entity to stop the playing the radio, so that we can have the stop button in the same lovelace card. Thanks fore your good work.
@BeardedTinker4 жыл бұрын
Thank you very much for your comment!! Here is a script that you can use to stop stream: radio_stop: alias: Stop Radio on Chromecast Audio sequence: - service: media_player.turn_off data: entity_id: > {% if is_state("input_select.radio_speaker", "Living room") %} media_player.living_room_tv_2 {% elif is_state("input_select.radio_speaker", "Loft TV") %} media_player.loft_tv {% elif is_state("input_select.radio_speaker", "Display me") %} media_player.display_me {% elif is_state("input_select.radio_speaker", "Clock me") %} media_player.clock_me {% endif %} - service: input_select.select_option data: entity_id: input_select.radio_station option: Stopped Just substitute speakers with the ones you have.
@99percentsmart754 жыл бұрын
@@BeardedTinker Hello. Works very well. Thanks for this and for your videos in general. I can’t wait for the next video
@BeardedTinker4 жыл бұрын
@@99percentsmart75 next video (and I talked about it yesterday on the stream) will be one that probably a lot of people will not use, but I find it very fun to have around.
@sekt19533 жыл бұрын
how to set input_select for the radio channel when changing player so that it reflects the channel being played, the same with the volume Thanks for a great video
@BeardedTinker3 жыл бұрын
Sorry for a late replay - wasn't ignoring it but trying to see what is use case - if I'm not mistaken you want to move music from room to room, keeping it playing?
@sekt19533 жыл бұрын
@@BeardedTinker no, if I have setup for 3 chromecast devices, all of which play different channels, when I then switch from one chromcast device to another, I would like the settings for program and volume to follow, his not then I come to unwanted to switch channel and volume on the one I switch to
@BeardedTinker3 жыл бұрын
That one is not easy. HA doesn't keep what you've sent to each of those devices. There could be potentially a way but would this a bit more complex. You would need to create individual input fields for each Chromecast devices. That way each o e would be tied in to specific speaker. But that would be easiest to implement. Other would be to store specific speaker status into temporary fields and then recall data when you select speaker. But that will add a lot of complexity.
@sekt19533 жыл бұрын
@@BeardedTinker I found this about AppDeamon I think that will do the trick kzbin.info/www/bejne/qmapiJKXgtair8U
@BeardedTinker3 жыл бұрын
This looks ok. I've fast forwarded video but it looks like this can be used to achieve same thing with radio on Chromecast.
@boyocska2 жыл бұрын
It is works very fine, thank you. Please help me to create an automation. I want to wake up to a radio station every morning.
@BeardedTinker2 жыл бұрын
The easiest way is to select for radio station and speaker default one, which will be the one where you want it to play morning radio. Then just create automation with time platform, specify time. And for action, run script - play_radio. That's the simplest way to do it
@boyocska2 жыл бұрын
@@BeardedTinker It was success, thanks!
@BeardedTinker2 жыл бұрын
@@boyocska that's great! Glad you got it going. Completely forgot on my GitHub there was a bit more complex automation for kids school day, that does that - wake them up and play radio! Slow brain 😜
@boyocska2 жыл бұрын
@@BeardedTinker If my dad had used Home Assistant, I would have been smarter too ... 🤣
@BeardedTinker2 жыл бұрын
@@boyocska 😂🤣
@pgianotto3 жыл бұрын
Is there a way to stop the streaming of the stations?
@BeardedTinker3 жыл бұрын
Check this one here github.com/BeardedTinker/Home-Assistant_Config/issues/29 That's my a bit improved version I have - has play/stop buttons :D
@pgianotto3 жыл бұрын
@@BeardedTinker I did see that link. But very new to HA and not sure how to add it all in with the entities etc.
@Lezcarr3 жыл бұрын
Just watched your video and followed the step by step guide but did not work, nothing from google speakers, tested all my radio links so no issues there no code issues, is this just a old out of date video now due to updates etc.
@BeardedTinker3 жыл бұрын
Hey Lez! It should still work - I use it for wakeup alarm and all has been well.
@Lezcarr3 жыл бұрын
Could you add to the video the intergration on the google cast to see the full install including any Config.yaml coding etc so it’s an end to end install, as something is not right, thanks for taking the time to reply
@BeardedTinker3 жыл бұрын
There is really nothing to record with it. Google cast doesn't need any yamll files. If everything is working in your system, HA should discover all Google cast devices and will offer you to add them. It's just one button click and all is done. On the other hand, if you don't see them as discovered devices, you could be having network issues or your Google device are not in same subnet as HA
@Lezcarr3 жыл бұрын
All devices are discovered but show unavailable for some reason, would you have any idea on this
@BeardedTinker3 жыл бұрын
Have you maybe used configuration.yaml file to configure them before? It cou6be that IP addresses have changed to to DHCP and now system can't find them
@Zumpic3 жыл бұрын
Nice guide, but im doing something wrong Invalid config for [input_number]: [Step] is an invalid option for [input_number]. Check: input_number->input_number->radio_volume->Step. (See /config/configuration.yaml, line 20). Invalid config for [input_select]: invalid slug radio_Station (try radio_station) for dictionary value @ data['input_select']. Got OrderedDict([('radio_Station', OrderedDict([('name', 'Select radio station'), ('options', ['Rix Fm', 'Mix Megapol', 'P3']), ('initial', 'Rix FM'), ('icon', 'mdi:radio')])), ('radio_speaker', OrderedDict([('Name', 'Radio Speaker'), ('options', ['Köket', 'Nest Gruppen', 'Vardagsrummet', 'Matsal']), ('initial', 'Nest Gruppen'), ('icon', 'mdi:speaker-wireless')]))]). (See /config/configuration.yaml, line 21). any idea?
@BeardedTinker3 жыл бұрын
Hi Tobias and sorry to see you have issues. Can't be 100% sure, but can you check alignment of code in yaml files. If you have Discord account, please join my server (link is in video description) as it's much easier to copy/past code and troubleshoot then in YT comments.
@BeardedTinker3 жыл бұрын
Ohh, I think I see what's the issue - Step in yaml file, needs to be lowercase and also rasio_Station, should be radio_station. Use in names only lower case.
@Zumpic3 жыл бұрын
@@BeardedTinker tried that, and did not work, will try to reach you in discord :)
@sameerkureemun98103 жыл бұрын
Hi @BeardedTinker, first Great Job and very helpful for me ! However i met some problem with the script, i launch from the card and nothing happens, all is green about the check configuration, the entities, the input number/select and the cast devices but the script is failed, i have this error message in the log, can you help me ? Logger: homeassistant.components.script.1590524359919 Source: helpers/script.py:1122 Integration: Script (documentation, issues) First occurred: 11:51:36 AM (4 occurrences) Last logged: 11:53:20 AM Play Radio on Device Cast: Error executing script. Invalid data for call_service at pos 1: not a valid value for dictionary value @ data['entity_id'] any idea what's wrong ? Thanks for your help
@sameerkureemun98103 жыл бұрын
This is my script and it seems the same than you except the radio stations and the devices cast : '1590524359919': alias: Play Radio on Device Cast sequence: - service: media_player.volume_set data: entity_id: > {% if is_state("input_select_radio_speaker", "Google Nest Hub") %} media_player.google_nest_hub {% elif is_state("input_select_radio_speaker", "Chambre Kelia") %} media_player.chambre_kelia {% elif is_state("input_select_radio_speaker", "Chambre Liam") %} media_player.chambre_liam {% elif is_state("input_select_radio_speaker", "Kodi Shield TV") %} media_player.kodi_a0b9effa0acd11eba74f1d3c5e9ac184 {% elif is_state("input_select_radio_speaker", "Google Home") %} media_player.google_home {% elif is_state("input_select_radio_speaker", "Echo Spot") %} media_player.echo_spot {% endif %} volume_level: '{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id: > {% if is_state("input_select_radio_speaker", "Google Nest Hub") %} media_player.google_nest_hub {% elif is_state("input_select_radio_speaker", "Chambre Kelia") %} media_player.chambre_kelia {% elif is_state("input_select_radio_speaker", "Chambre Liam") %} media_player.chambre_liam {% elif is_state("input_select_radio_speaker", "Kodi Shield TV") %} media_player.kodi_a0b9effa0acd11eba74f1d3c5e9ac184 {% elif is_state("input_select_radio_speaker", "Google Home") %} media_player.google_home {% elif is_state("input_select_radio_speaker", "Echo Spot") %} media_player.echo_spot {% endif %} media_content_id: > {% if is_state("input_select_radio_station", "NRJ") %} cdn.nrjaudio.fm/audio1/fr/30001/mp3_128.mp3?origine=fluxradios {% elif is_state("input_select_radio_station", "NOSTALGIE") %} cdn.nrjaudio.fm/audio1/fr/30601/mp3_128.mp3?origine=fluxradios {% elif is_state("input_select_radio_station", "VIRGIN RADIO") %} ais-live.cloud-services.paris:8000/virgin.mp3 {% elif is_state("input_select_radio_station", "BFM BUSINESS") %} chai5she.cdn.dvmr.fr/bfmbusiness {% elif is_state("input_select_radio_station", "JAZZ RADIO") %} jazzradio.ice.infomaniak.ch/jazzradio-high.mp3 {% elif is_state("input_select_radio_station", "FRANCE CULTURE") %} direct.franceculture.fr/live/franceculture-midfi.mp3 {% endif %} media_content_type: 'music'
@BeardedTinker3 жыл бұрын
Hi Sameer and thank you for the comment. You have error in script - input_select_ should be with . after select, not _. Try fixing this and see if it will work.
@sameerkureemun98103 жыл бұрын
@@BeardedTinker Thanks for the quick reply ! it did the trick ! i feel stupid ! One last question is there a way to have the status playing from the same card and the logos radio but i guess i'm asking too much :)
@BeardedTinker3 жыл бұрын
You can check my GitHub repository. There I also added radio station logos. It's a bit more work, but it looks a bit better too.
@sameerkureemun98103 жыл бұрын
@@BeardedTinker thanks i just subscribe to your channel !
@cdrynan3 жыл бұрын
So all I get is: Invalid config for [script]: invalid template (TemplateSyntaxError: unexpected char '#' at 95) for dictionary value @ data['sequence'][0]['data']. Got None. (See /config/configuration.yaml, line 52).
@cdrynan3 жыл бұрын
The script is not being recognized, but I can't figure out why...
@BeardedTinker3 жыл бұрын
@@cdrynan do you have other scripts in the system already? I know that script is working as I'm still using it daily.
@BeardedTinker3 жыл бұрын
Just to add this here if anyone has similar issues. Problem was with wrong symbol used - # instead of ".
@ernstrietbergen18762 жыл бұрын
Hello i copied your script but have an error wich i can't find Could you help me a little bit To start de error: Logger: homeassistant.config Source: config.py:464 First occurred: 20:56:25 (1 occurrences) Last logged: 20:56:25 Invalid config for [script]: extra keys not allowed @ data['sequence'][0]['volume_level']. Got None invalid template (TemplateSyntaxError: expected token ',', got 'string') for dictionary value @ data['sequence'][0]['data']. Got None. (See /config/configuration.yaml, line 36). In the output i have not the button execute the other three are there A copy of the script: #Radios play script radio_play: alias : play Radio on Chromecast sequence: - service: media_player.volume_set data: entity_id . {% if is_state("input_select.radio_speaker", "Woonkamerassistent") %} media_player.woonkamerassitent {% elif is_state(input_select.radio_speaker", "Keukenassistent") %} media_player.keukenassistent {% elif is_state(input_select.radio_speaker", "badkamerassisten") %} media_player.badkamerassistent {% elif is_state(input_select.radio_speaker", "audio") %} media_player.audio {% endif %} volume_level: '{{ states("input_number.radio_volume") }}' - service: media_player.play_media data: entity_id . {% if is_state("input_select.radio_speaker", "Woonkamerassistent") %} media_player.woonkamerassitent {% elif is_state(input_select.radio_speaker", "Keukenassistent") %} media_player.keukenassistent {% elif is_state(input_select.radio_speaker", "badkamerassisten") %} media_player.badkamerassistent {% elif is_state(input_select.radio_speaker", "audio") %} media_player.audio {% endif %} media_content_id: > {% if is_state("input_select.radio_station", "Twentse piraten") %} www.radio-nederland.nl/piraten-stream-twente {% elif is_state("input_select.radio_station", "Radio 10") %} stream.radio10.nl/radio10 {% elif is_state("input_select.radio_station", "100%NL") %} stream.100p.nl/100pctnl.mp3 {% elif is_state("input_select.radio_station", "Radio 10 80s") %} 20103.live.streamtheworld.com/TLPSTR20.mp3 {% endif %} media_content_type: 'music' I hope it's simple for you I can't find what's wrong. I realy enjoy your video's and i learn much from it.
@BeardedTinker2 жыл бұрын
Check my script here: github.com/BeardedTinker/Home-Assistant_Config/blob/master/scripts/radio_play.yaml From what I've seen at first glace, you have . instead of > after entity_id - in two places. Try fixing that first.
@ernstrietbergen18762 жыл бұрын
@@BeardedTinker Great i managed to get the error away and save the script. Now it looks good and i can select station and speaker but still have no execute button. What could be the reason for that ?
@ernstrietbergen18762 жыл бұрын
Hello please forget my last question i just typet the name of the radio script wrong. The only thing now is there is still no music and no error so very dificult to find the reason. do you have any tip? any tip ?
@BeardedTinker2 жыл бұрын
I see that you've posted additional comments, but they are gone. You can try reposting questions.
@ernstrietbergen18762 жыл бұрын
@@BeardedTinker Hello, The situation now is : I copied your scripts and filled in my stations and mediaplayers. now there are no errors i can select station player and volume but if i click execute the button flashes very quick and nothing happens Is there anything i can do to get it working looking at the script does not work unfortunately because i'm pretty sure it's a one to one copie. I have seen the last line in your script is else as the one in the video i tried both but allso no result.
@ChrisWolbers3 жыл бұрын
The overcomplicated is there an how to ? Cant fint it
@BeardedTinker3 жыл бұрын
The video is how to :) You can check GitHub repo for code, link is in video description.
@michiel27973 жыл бұрын
This is probably going to be something really stupid but I get the following message: Logger: homeassistant.config Source: config.py:443 First occurred: 11:07:09 AM (5 occurrences) Last logged: 11:28:26 AM Invalid config for [script]: Service media.player.volume_set does not match format . for dictionary value @ data['sequence'][0]['service']. Got None expected dict for dictionary value @ data['sequence'][0]['data']. Got None extra keys not allowed @ data['sequence'][0]['volume_level']. Got None not a valid value for dictionary value @ data['sequence'][0]['entity_id']. Got None. (See /config/configuration.yaml, line 15). Invalid config for [script]: Service media.player.volume_set does not match format . for dictionary value @ data['sequence'][0]['service']. Got None. (See /config/configuration.yaml, line 15).
@michiel27973 жыл бұрын
Any ideas 💡🤔
@BeardedTinker3 жыл бұрын
With this it's probably not properly spaced or something like that. If you can paste code somewhere and link it here, I'll have a look. Or post it here: discord.gg/HkxDRN6
@BeardedTinker3 жыл бұрын
In case you missed my previous reply. I think the problem is how code is formatted. Most common mistake is - spacing, wrong or missing " and missing ,. If you can post code somewhere, * can check it, or post it on discord server - link is above, in my reply and also in video description.