Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

VSCode autocompletion #399

Unanswered
idogrf asked this question in Q&A
Nov 2, 2022 · 2 comments · 1 reply
Discussion options

Hi,

Was wandering if anyone knows of a way for getting autocompletions for pyscript's entities in vscode in .py files
for example, when you write input_boolean - get all the possible options

I know this is possible using jupyter, and I thought I could use vscode's jupyter extension instead of the Jupyter Notebook UI...
I can start the jupyter server and connect to it using vscode, I can even run things, by I don't have autocompletion here either

any ideas?

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

I just started working on a script that generates a builtins.pyi file for pylance to accomplish exactly this. I am a total beginner to both python and visual studio code so I don't know if this is best way but it's working pretty well. Right now the script runs on my dev client and i manually run it when my home assistant setup changes but it should be possible to run it in the Pyscript server environment so that it automatically keeps up to date. I will probably be able to share in a while.

You must be logged in to vote
1 reply
Comment options

Been looking into this myself, did you ever get very far with it? This is something that'd really help with developing pyscript automations

Comment options

Can we broaden the scope and also get the basics working? I now am not able to get autocompletion on the hass object. It is suggested to configure as a global, which kills autocompletion, and there is NO documentation on how to import it.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /