I’m building a custom platform, and I was wondering if there was any way to override the default entity_id. Currently, it defaults to a slugged version of the initial name, but my name changes (it’s based on where the cheapest fuel is, so it’s constant changing).
This ends up with an entity ID that has the first/initial cheapest location as the ID
First of all, if you derive your entities from the Entity class, then there is a property entity_id that you should be able to set when initialising your entity.
The other thing I would like to point out that I find it rather unusual that your entity’s name changes. State changes, attribute values change, but the name normally doesn’t change; even worse, a user can easily override the name in the UI. Are you sure you want to constantly change the name? From what you are describing, it sounds as if you may want to consider storing whatever you change the name to in an attribute instead.