-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Implement vacuum area mapping in the frontend. Needed for home-assistant/core#149315.
More entity info
Link to the area mapping dialog from more entity info.
Config flow
Launch the dialog at the end of the config flow if any supported vacuum entities were added.
Changed identifiers
Handle a special repair raised by core (translation key: segments_changed), if any internal vacuum identifiers have changed.
Discovered vacuum
Handle a new discovered supported vacuum for an already existing integration.
Ideally the frontend would detect a new vacuum, that should be configured, and show it in a dedicated place for users to interact with. But we don't have any such good place right now. So for now let's display it in the same place a repairs.
Open question: should this still be handled purely by the frontend, or should backend detect it and raise actual special repair?
Area mapping dialog
Implement area mapping dialog, allowing users to map internal vacuum areas to HA areas.
Read the internal vacuum segments using vacuum/get_segments websocket.
When the mapping is saved by users, put the following in the vacuum entity options:
area_mappingdictionary, mapping each specified HA area to a list of mapped internal vacuum identifierslast_seen_segmentslist of segments, simply copied from the result of the above mentioned websocket