#I am looking to make the frontend more
1 messages · Page 1 of 1 (latest)
I agree with the summary by @fickle surge
Also, don't we already have a way for frontend to subscribe to changes, does it really reload the full registry?
In FE there is https://github.com/home-assistant/frontend/blob/3ac2434b6f6ab1c9da628c436574255afcb85365/src/data/entity/entity_registry.ts#L303 which listens to the "entity_registry_updated" event and fetches the whole registry ("config/entity_registry/list")
Ah, check, so it's indeed inefficient
I don't see how we need this for the label registry though
Or floor registry, that will never change except if you add another floor to your house
Paulus, can you please ask your army of agile agents to get their shit together and deduplicate so not every xxx-registry websocket interface has its own implementation. It should be possible to implement it once.
That event already contains the changes made, so a separate subscription shouldn't be necessary.
It does not contain changes. The event is safe for non admin users
It was just example implementation. First want to discuss if we want this.
Will make it more succint if we are ok
It is here in Core:
https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/entity_registry.py#L158
Do you mean this information doesn't get to frontend?
the changes are the old values, so event handlers don't need to keep a copy of the old objects