New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add entity id autocompletion to YAML code editors #11099
Conversation
I like this feature. I'll read up a bit more on the autocomplete and test with a lot of entities to see how the performance is. |
Thanks @zsarnett, appreciate you taking a look.
Sure! Please note I've added Side note: I have a separate branch where I play a bit with ninja2-homeassistant extension. In the future our yaml/template editors may become more powerful 😎 But one step at a time |
e597141
to
ff68ea1
Compare
When testing this, I got an error after every next char if autocomplete is open:
And autocomplete would no longer work |
@bramkragten I think it's codemirror's bug: I've yet to find a solution Edit: Thank you @bramkragten for fixing it in e56f313 <3 |
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
705b7d1
to
6e95486
Compare
src/panels/config/integrations/integration-panels/zha/dialog-zha-device-zigbee-info.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Breaking change
Proposed change
Add autocompletion to YAML code editors.
Accesses
hass
object and maps its statesentity_id
's as CodeMirror autocompletion labels.This PR adds
@codemirror/autocomplete
package.Autocompletion is not activated as editor's CodeMirror extension when:
readOnly
flaghasAutocomplete
flagRead more:
https://codemirror.net/6/docs/ref/#autocomplete.autocompletion
https://codemirror.net/6/examples/autocompletion/
Demo
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: