Code Editor in Picture Elements

Hey HA Dev !

Just a thought, I use picture elements to create my House Graphic / Sensor environment and my
Code is large simply as I have alot of sensors ( maybe 50 ? ) and try out alot of interesting effects, which is all great, however even though I try to keep the code managed and clean with good naming conventions its still very challenging to maintain / change / add to this configuration information as its
just alot of code in there.

Suggestion :

  1. If possible would it be doable to have a search function ? Then at least I could look for the
    name tags to change stuff instead of always having to scroll down.

  2. Could some sort of integration to add external editors into the Code Editor be possible so I could maintain the code with the code editor of my choice ? Sure I can cut and paste the code in and out of the code editor, which I in fact sometimes do but this is obviously fraught with snafu possibilities

  3. Could there be anyway to contextually colour code the code in the editor ? So names or attributes would have different colours ?

  4. Would a “filter” be possible so I could just see the entities names for instance and then click on something to expand the code at that point ?

Anyway thanks for simply listening, HA is fantastic, unbelievable, the challenge is being able to interact with the huge amount of features in a way that makes such a complex system manageable and at the moment at least on this point I’m struggling.

Best regards and thanks

David

Eeasiest was to do this is to access your files via a SAMBA share from a remote machine and then edit them with Visual Studio Code (that’s how I and probably 1000s of other people do it). There’s also a excellent Visual Studio Code plugin for Home Assistant for automatically populating entities and other nice thibgs.

This external editor can be useful https://pee.analogbrain.com/ you can upload floor plan add elements state-icon and state-labels then move by mouse and export all to YAML then past to picture-elements you can also import your entities in json

Thanks for the suggestion, I had a look at it and certainly when it can import the picture elements yaml as is it will be quite useful !

Kudos to the developer !

I like the instant graphical update in the default editor, it makes changes very realtime and easy to spot mistakes. The samba/visual editor makes that all offline