Python Script get Config?

After dealing with the limitations of regular scripts I have started using Python Scripts. So far so good, passing data and calling services is simple enough. What I would really want to do though is to read some default configuration in my configuration.yaml

i.e.

python_script:
  - my_script
    default_option: some data

Is this possible without going to full component development? The documentation isn’t very clear as it just points to a forum not specifically related to python_scripts for advanced examples so it’s like finding a needle in a very poorly organized hay stack.

Why don’t you put the default data into the script instead of adding a layer of complexity?

Well I’m already doing that. I just wanted to make it a bit more portable, yaml is a little simpler for a few people I know to not break vs python dictionary/strings. That and I like having configs all in one place.

I don’t think it can be done the way you want it to be done. You’d have to make a custom component. The yaml for python_script component doesn’t accept anything but the name. I don’t think additional parameters would make it through the validation. Also, python_scripts are limited in their functionality. Many of the built-ins don’t have access to run. You’re better off creating your own component if you really want to use a custom configuration.