esphome / esphome-vscode

ESPHome VSCode plugin
Other
75 stars 14 forks source link

Schema generation error #79

Closed grahambrown11 closed 1 year ago

grahambrown11 commented 1 year ago

@glmnet the "newish" speaker component breaks the build scheme script: https://github.com/esphome/esphome/blob/17fed954bf74a018f527b541dab2d30101169bb8/script/build_language_schema.py#L533 My quick fix was to add

if x == "speaker.SPEAKER_SCHEMA":
    continue

But don't think that's a solution 😜, I am trying to get the new alarm_control_panel component to get the auto complete suggestions in the dashboard.

The VSCode script refers tobuild_jsonschema.py which seems to be replaced by build_language_schema.py but that is missing the #! & the execute flag so it doesn't run 😞

All the "docs" attributes are removed after running build_language_schema.py

glmnet commented 1 year ago

Yes. I've already lost a battle against the speaker thing.

The docs ara added to the json by another script which is in the docs repo.

I might just push an schema update for the non conflicting components meanwhile.

Thanks for giving it a try!

grahambrown11 commented 1 year ago

So I fiddled and manually pulled out just the new component I created https://github.com/esphome/dashboard/pull/496 would be nice if this could be handled by an automated GitHub Action routine...

jesserockz commented 1 year ago

@glmnet I am happy to remove the base SPEAKER_SCHEMA as its really not needed? It can be added back later if something gets added into the common schema

glmnet commented 1 year ago

I was looking at it. Actually the oddity here is that the schema is empty, I didn't understand first hand why it was different.

Let's keep it this way as it makes sense.

I'll wait for this month release and push a full schema update.

Thank you

glmnet commented 1 year ago

Close with #80