diff --git a/custom_components/roomba_rest980/CloudApi.py b/custom_components/roomba_rest980/CloudApi.py index 4fe6bb0..ad034ad 100644 --- a/custom_components/roomba_rest980/CloudApi.py +++ b/custom_components/roomba_rest980/CloudApi.py @@ -19,7 +19,7 @@ import aiohttp _LOGGER = logging.getLogger(__name__) # Debug: Save UMF data to file for analysis -DEBUG_SAVE_UMF = False +DEBUG_SAVE_UMF = True DEBUG_UMF_PATH = Path("/workspaces/ha-core/config/debug_umf_data.json") diff --git a/custom_components/roomba_rest980/LegacyCompatibility.py b/custom_components/roomba_rest980/LegacyCompatibility.py index 0640235..47ae8ae 100644 --- a/custom_components/roomba_rest980/LegacyCompatibility.py +++ b/custom_components/roomba_rest980/LegacyCompatibility.py @@ -2,7 +2,10 @@ from datetime import datetime +from homeassistant.helpers import issue_registry as ir + from .const import ( + DOMAIN, binMappings, cleanBaseMappings, cycleMappings, @@ -129,6 +132,7 @@ def createExtendedAttributes(self) -> dict[str, any]: robotCleanMode = "Auto" else: robotCleanMode = "n-a" + return { "extendedStatus": extv, "notready_msg": notReadyMappings.get(notReady, notReady), diff --git a/custom_components/roomba_rest980/RoombaSensor.py b/custom_components/roomba_rest980/RoombaSensor.py index 02ef439..7935a5e 100644 --- a/custom_components/roomba_rest980/RoombaSensor.py +++ b/custom_components/roomba_rest980/RoombaSensor.py @@ -33,7 +33,7 @@ class RoombaSensor(CoordinatorEntity, SensorEntity): """Return the Roomba's device information.""" data = self.coordinator.data or {} return DeviceInfo( - identifiers={DOMAIN, self._entry.unique_id}, + identifiers={(DOMAIN, self._entry.unique_id)}, name=data.get("name", "Roomba"), manufacturer="iRobot", model="Roomba", @@ -86,7 +86,7 @@ class RoombaCloudSensor(CoordinatorEntity, SensorEntity): """Return the Roomba's device information.""" data = self.coordinator.data or {} return DeviceInfo( - identifiers={DOMAIN, self._entry.unique_id}, + identifiers={(DOMAIN, self._entry.unique_id)}, name=data.get("name", "Roomba"), manufacturer="iRobot", model="Roomba", diff --git a/custom_components/roomba_rest980/button.py b/custom_components/roomba_rest980/button.py index de7ce38..e0f0528 100644 --- a/custom_components/roomba_rest980/button.py +++ b/custom_components/roomba_rest980/button.py @@ -35,7 +35,7 @@ class FavoriteButton(ButtonEntity): """Creates a button entity for entries.""" self._attr_name = f"{data['name']}" self._entry = entry - self._attr_unique_id = f"{entry.unique_id}_{data['favorite_id']}" + self._attr_unique_id = f"{entry.entry_id}_{data['favorite_id']}" self._attr_entity_category = EntityCategory.CONFIG self._attr_extra_state_attributes = data self._data = data diff --git a/custom_components/roomba_rest980/camera.py b/custom_components/roomba_rest980/camera.py index 2c9f824..748af63 100644 --- a/custom_components/roomba_rest980/camera.py +++ b/custom_components/roomba_rest980/camera.py @@ -131,7 +131,7 @@ class RoombaMapCamera(Camera): # Camera attributes self._attr_name = f"Roomba Map - {self._map_header.get('name', 'Unknown')}" - self._attr_unique_id = f"{entry.unique_id}_map_{pmap_id}" + self._attr_unique_id = f"{entry.entry_id}_map_{pmap_id}" # Device info self._attr_device_info = { diff --git a/custom_components/roomba_rest980/config_flow.py b/custom_components/roomba_rest980/config_flow.py index b2d0d0f..670e5b3 100644 --- a/custom_components/roomba_rest980/config_flow.py +++ b/custom_components/roomba_rest980/config_flow.py @@ -34,7 +34,7 @@ CLOUD_SCHEMA = vol.Schema( class RoombaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Config flow.""" - VERSION = 1 + VERSION = 2 _proposed_name: str _user_data: dict[str, any] diff --git a/custom_components/roomba_rest980/manifest.json b/custom_components/roomba_rest980/manifest.json index f2241b2..819937e 100644 --- a/custom_components/roomba_rest980/manifest.json +++ b/custom_components/roomba_rest980/manifest.json @@ -26,7 +26,6 @@ ], "documentation": "https://github.com/ia74/roomba_rest980", "iot_class": "local_polling", - "issue_tracker": "https://github.com/ia74/roomba_rest980/issues", "quality_scale": "bronze", "requirements": [ "aiofiles==24.1.0" diff --git a/custom_components/roomba_rest980/vacuum.py b/custom_components/roomba_rest980/vacuum.py index 064b787..3aa9cc1 100644 --- a/custom_components/roomba_rest980/vacuum.py +++ b/custom_components/roomba_rest980/vacuum.py @@ -47,7 +47,7 @@ class RoombaVacuum(CoordinatorEntity, StateVacuumEntity): self.hass = hass self._entry: ConfigEntry = entry self._attr_supported_features = SUPPORT_ROBOT - self._attr_unique_id = f"{entry.entry_id}_vacuum" + self._attr_unique_id = f"{entry.unique_id}_vacuum" self._attr_name = entry.title def _handle_coordinator_update(self): @@ -83,7 +83,7 @@ class RoombaVacuum(CoordinatorEntity, StateVacuumEntity): """Return the Roomba's device information.""" data = self.coordinator.data or {} return DeviceInfo( - identifiers={DOMAIN, self._entry.unique_id}, + identifiers={(DOMAIN, self._entry.unique_id)}, name=data.get("name", "Roomba"), manufacturer="iRobot", model="Roomba",