I am new to the Home Assistant game so I am learning as I go. I created a script a couple days ago and it was working as expected and I was getting no configuration errors. Then suddenly my configuration keeps giving me the following error:
"Invalid config for [script]: [action] is an invalid option for [script]. Check: script->script->1583173228512->action. (See /config/configuration.yaml, line 21). "
I am trying to have a script that toggles the mute on and off of a media player.
I did upgrade Home Assistant version and HassOS version when they appeared on the console. I have tried rolling back to 0.105.5 but the issue persists.
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
#Uncomment this if you are using SSL/TLS, running in Docker container, etc.
#http:
# base_url: example.duckdns.org:8123
# Text to speech
tts:
- platform: google_translate
##Discovery##
discovery:
##Speedtest##
speedtestdotnet:
group: !include groups.yaml
automation: !include automations.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
script: !include scripts.yaml
I have been reading through the forums and have worked through multiple issues that way but this one is stumping me. Mostly cause it worked fine for a day or 2 before it suddenly stopped.
but I am getting the following in the configurator:
“bad indentation of a mapping entry at line 5, column 20:
data_template:”
^
and this in my logs:
“mapping values are not allowed here
in “/config/scripts.yaml”, line 5, column 20”
“Invalid config for [script]: [data_template] is an invalid option for [script]. Check: script->script->1583173228512->data_template. (See /config/configuration.yaml, line 21).”
I really appreciate all your help. I have read through the scripts documentation, everything I read seems to imply this error is due to indentation formatting error but the indentations look right to a noob like me.
The issue ended up being there was an extra ’ in the code that did not show up in the configurator in HA but when I opened the YAML in Visual Studio Code I saw it.
I guess I learned the hard way not to use the configurator.