mirror of
https://github.com/sudoxnym/roomba_rest980.git
synced 2026-04-14 11:37:46 +00:00
i goofed the entry/entity/unique ids when i replaced them and some identifiers that broke the config entries
This commit is contained in:
parent
336499f9d1
commit
8904c9349f
8 changed files with 12 additions and 9 deletions
|
|
@ -19,7 +19,7 @@ import aiohttp
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Debug: Save UMF data to file for analysis
|
# 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")
|
DEBUG_UMF_PATH = Path("/workspaces/ha-core/config/debug_umf_data.json")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from homeassistant.helpers import issue_registry as ir
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
|
DOMAIN,
|
||||||
binMappings,
|
binMappings,
|
||||||
cleanBaseMappings,
|
cleanBaseMappings,
|
||||||
cycleMappings,
|
cycleMappings,
|
||||||
|
|
@ -129,6 +132,7 @@ def createExtendedAttributes(self) -> dict[str, any]:
|
||||||
robotCleanMode = "Auto"
|
robotCleanMode = "Auto"
|
||||||
else:
|
else:
|
||||||
robotCleanMode = "n-a"
|
robotCleanMode = "n-a"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"extendedStatus": extv,
|
"extendedStatus": extv,
|
||||||
"notready_msg": notReadyMappings.get(notReady, notReady),
|
"notready_msg": notReadyMappings.get(notReady, notReady),
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class RoombaSensor(CoordinatorEntity, SensorEntity):
|
||||||
"""Return the Roomba's device information."""
|
"""Return the Roomba's device information."""
|
||||||
data = self.coordinator.data or {}
|
data = self.coordinator.data or {}
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={DOMAIN, self._entry.unique_id},
|
identifiers={(DOMAIN, self._entry.unique_id)},
|
||||||
name=data.get("name", "Roomba"),
|
name=data.get("name", "Roomba"),
|
||||||
manufacturer="iRobot",
|
manufacturer="iRobot",
|
||||||
model="Roomba",
|
model="Roomba",
|
||||||
|
|
@ -86,7 +86,7 @@ class RoombaCloudSensor(CoordinatorEntity, SensorEntity):
|
||||||
"""Return the Roomba's device information."""
|
"""Return the Roomba's device information."""
|
||||||
data = self.coordinator.data or {}
|
data = self.coordinator.data or {}
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={DOMAIN, self._entry.unique_id},
|
identifiers={(DOMAIN, self._entry.unique_id)},
|
||||||
name=data.get("name", "Roomba"),
|
name=data.get("name", "Roomba"),
|
||||||
manufacturer="iRobot",
|
manufacturer="iRobot",
|
||||||
model="Roomba",
|
model="Roomba",
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class FavoriteButton(ButtonEntity):
|
||||||
"""Creates a button entity for entries."""
|
"""Creates a button entity for entries."""
|
||||||
self._attr_name = f"{data['name']}"
|
self._attr_name = f"{data['name']}"
|
||||||
self._entry = entry
|
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_entity_category = EntityCategory.CONFIG
|
||||||
self._attr_extra_state_attributes = data
|
self._attr_extra_state_attributes = data
|
||||||
self._data = data
|
self._data = data
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ class RoombaMapCamera(Camera):
|
||||||
|
|
||||||
# Camera attributes
|
# Camera attributes
|
||||||
self._attr_name = f"Roomba Map - {self._map_header.get('name', 'Unknown')}"
|
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
|
# Device info
|
||||||
self._attr_device_info = {
|
self._attr_device_info = {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ CLOUD_SCHEMA = vol.Schema(
|
||||||
class RoombaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
class RoombaConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
"""Config flow."""
|
"""Config flow."""
|
||||||
|
|
||||||
VERSION = 1
|
VERSION = 2
|
||||||
|
|
||||||
_proposed_name: str
|
_proposed_name: str
|
||||||
_user_data: dict[str, any]
|
_user_data: dict[str, any]
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
],
|
],
|
||||||
"documentation": "https://github.com/ia74/roomba_rest980",
|
"documentation": "https://github.com/ia74/roomba_rest980",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"issue_tracker": "https://github.com/ia74/roomba_rest980/issues",
|
|
||||||
"quality_scale": "bronze",
|
"quality_scale": "bronze",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"aiofiles==24.1.0"
|
"aiofiles==24.1.0"
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class RoombaVacuum(CoordinatorEntity, StateVacuumEntity):
|
||||||
self.hass = hass
|
self.hass = hass
|
||||||
self._entry: ConfigEntry = entry
|
self._entry: ConfigEntry = entry
|
||||||
self._attr_supported_features = SUPPORT_ROBOT
|
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
|
self._attr_name = entry.title
|
||||||
|
|
||||||
def _handle_coordinator_update(self):
|
def _handle_coordinator_update(self):
|
||||||
|
|
@ -83,7 +83,7 @@ class RoombaVacuum(CoordinatorEntity, StateVacuumEntity):
|
||||||
"""Return the Roomba's device information."""
|
"""Return the Roomba's device information."""
|
||||||
data = self.coordinator.data or {}
|
data = self.coordinator.data or {}
|
||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={DOMAIN, self._entry.unique_id},
|
identifiers={(DOMAIN, self._entry.unique_id)},
|
||||||
name=data.get("name", "Roomba"),
|
name=data.get("name", "Roomba"),
|
||||||
manufacturer="iRobot",
|
manufacturer="iRobot",
|
||||||
model="Roomba",
|
model="Roomba",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue