Pyscript Services not showing up

Hello everyone. I installed Pyscript using Home Assistant Community Store, and when I go to Developer Tools → Services → and type in pyscript, the only services that show up are Reload Pyscript and Start Jupiter Kernel. I’ve created more scripts in my custom_components/pyscripts directory, however they don’t show up in my services. I’ve restarted home assistant, made sure everything is correct in my configuration.yaml file, checked the debug statements, and cannot find what is wrong. Any advice would be great!

Some debug logs below:

1 Like
  1. The .py files that you write should go into /config/pyscripts/, not /config/custom_components/pyscripts/

  2. Do you have this in your configuration.yaml? This will allow Pyscript logs to show in your Home Assistant logs.

logger:
  default: info
  logs:
    custom_components.pyscript: debug

I had the same problem of services not showing up. In my case, I had an import at the beginning of the script but I had not “allowed all imports” in the Pyscript configuration. This made the script stop before reaching the @service

 Exception in </config/pyscript/test.py> line 1: import requests ^ ModuleNotFoundError: import of requests not allowed 
1 Like