Skip to content

Implement vacuum area mapping #28808

@arturpragacz

Description

@arturpragacz

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_mapping dictionary, mapping each specified HA area to a list of mapped internal vacuum identifiers
  • last_seen_segments list of segments, simply copied from the result of the above mentioned websocket

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions