I would like to dynamically update the contents of a lovelace card.
Is there a way to remotely (programatically, ideally via the API but I did not find anything relevant) edit the YAML file to add/remove some entries?
EDIT: I found that .storage/lovelace actually holds the configuration of the frontend. Can I directly edit this file?
EDIT 2: a direct edition of the file does not propagate to the fronted (even after reloading the page). HA probably needs to be told to take the change into consideration (?)
EDIT 3: The closest I got to editing the file is to switch to YAML mode for lovelace (https://www.home-assistant.io/lovelace/yaml-mode/) and edit the YAML file. Not the best solution but if there is nothing ready for remote interaction (via the API) it will do.
I have an entity-filter card with 80 entities which are dynamically created in Home Assistant by an external script (via the API).
I would like this script to also update the card (in addition to creating the entity and setting its state) instead of having to manually update it myself.
This is not perfect as it will require some acrobatics when editing it via a program (ideally that could have been been an API functionality) but that’s the closest I can get, probably.
@flamingm0e Sorry, by “program” I mean code (Python, node, …) which will access the file remotely (via ssh, then parse it, then push back to HA) like I mentioned in my question.