Hi,
I’m trying to make a script which will send a media source to a chromecast. I have previously used the same service and data in a automation where it works perfectly, but when I tried to put the same lines into a script it just creates errors and does not work. Could anybody see a obvious problem with the code below?
Thanks for the quick answers @lolouk44 Ok, that’s good input, I will try that. But is there any reason why that was not a problem when it was put into an automation? I do not have my system available now, but I will share the log later today.
@bonterra good question, but kjkken is correct. The chrome name is Kjøkken, so I guess HA removed the norwegian letter.
Ha! I don’t speak Norwegian
Not sure why it would work in an automation and not in a script. but my script has the quotes and in the past mp3 would stop it from working whereas mp4 did work.
might be an idea to name your kitchen kjokken without special characters at least for entity_id names?
Invalid config for [script]: [radioON] is an invalid option for [script]. Check: script->script->radioON. (See /home/homeassistant/.homeassistant/configuration.yaml, line 451). Please check the docs at https://home-assistant.io/components/script/
However I managed to get it to work! To me it looks like it does not accept capital letters in the script name. I.e. “radioON” will not work, but “radioon” will work. I did not now it was case sensitive.
ahh good spot.
Generally yes it’s best / good practice to name all entities, automations, etc in lowercase. Only use Uppercase and Special characters for the front end