diff --git a/homeassistant/components/nice_go/cover.py b/homeassistant/components/nice_go/cover.py index 70bd4b136a5..4098d9ef426 100644 --- a/homeassistant/components/nice_go/cover.py +++ b/homeassistant/components/nice_go/cover.py @@ -25,7 +25,7 @@ async def async_setup_entry( coordinator = config_entry.runtime_data async_add_entities( - NiceGOCoverEntity(coordinator, device_id, device_data.name, "cover") + NiceGOCoverEntity(coordinator, device_id, device_data.name) for device_id, device_data in coordinator.data.items() ) diff --git a/homeassistant/components/nice_go/entity.py b/homeassistant/components/nice_go/entity.py index 5af4b9c8731..266ad72add3 100644 --- a/homeassistant/components/nice_go/entity.py +++ b/homeassistant/components/nice_go/entity.py @@ -17,12 +17,11 @@ class NiceGOEntity(CoordinatorEntity[NiceGOUpdateCoordinator]): coordinator: NiceGOUpdateCoordinator, device_id: str, device_name: str, - sub_device_id: str, ) -> None: """Initialize the entity.""" super().__init__(coordinator) - self._attr_unique_id = f"{device_id}-{sub_device_id}" + self._attr_unique_id = device_id self._device_id = device_id self._attr_device_info = DeviceInfo( identifiers={(DOMAIN, device_id)}, diff --git a/homeassistant/components/nice_go/event.py b/homeassistant/components/nice_go/event.py index fbbeaffcea9..a19511b0b11 100644 --- a/homeassistant/components/nice_go/event.py +++ b/homeassistant/components/nice_go/event.py @@ -23,7 +23,7 @@ async def async_setup_entry( coordinator = config_entry.runtime_data async_add_entities( - NiceGOEventEntity(coordinator, device_id, device_data.name, "event") + NiceGOEventEntity(coordinator, device_id, device_data.name) for device_id, device_data in coordinator.data.items() ) diff --git a/homeassistant/components/nice_go/light.py b/homeassistant/components/nice_go/light.py index 76730ea822f..4a08364688e 100644 --- a/homeassistant/components/nice_go/light.py +++ b/homeassistant/components/nice_go/light.py @@ -20,7 +20,7 @@ async def async_setup_entry( coordinator = config_entry.runtime_data async_add_entities( - NiceGOLightEntity(coordinator, device_id, device_data.name, "light") + NiceGOLightEntity(coordinator, device_id, device_data.name) for device_id, device_data in coordinator.data.items() ) diff --git a/homeassistant/components/nice_go/switch.py b/homeassistant/components/nice_go/switch.py index e7290aabdd6..26d42dab124 100644 --- a/homeassistant/components/nice_go/switch.py +++ b/homeassistant/components/nice_go/switch.py @@ -24,7 +24,7 @@ async def async_setup_entry( coordinator = config_entry.runtime_data async_add_entities( - NiceGOSwitchEntity(coordinator, device_id, device_data.name, "switch") + NiceGOSwitchEntity(coordinator, device_id, device_data.name) for device_id, device_data in coordinator.data.items() ) diff --git a/tests/components/nice_go/snapshots/test_cover.ambr b/tests/components/nice_go/snapshots/test_cover.ambr index 8f85fea2726..391d91584bf 100644 --- a/tests/components/nice_go/snapshots/test_cover.ambr +++ b/tests/components/nice_go/snapshots/test_cover.ambr @@ -28,7 +28,7 @@ 'previous_unique_id': None, 'supported_features': , 'translation_key': None, - 'unique_id': '1-cover', + 'unique_id': '1', 'unit_of_measurement': None, }) # --- @@ -76,7 +76,7 @@ 'previous_unique_id': None, 'supported_features': , 'translation_key': None, - 'unique_id': '2-cover', + 'unique_id': '2', 'unit_of_measurement': None, }) # --- diff --git a/tests/components/nice_go/snapshots/test_light.ambr b/tests/components/nice_go/snapshots/test_light.ambr index 294488e3d46..2e29d9589dd 100644 --- a/tests/components/nice_go/snapshots/test_light.ambr +++ b/tests/components/nice_go/snapshots/test_light.ambr @@ -32,7 +32,7 @@ 'previous_unique_id': None, 'supported_features': 0, 'translation_key': 'light', - 'unique_id': '1-light', + 'unique_id': '1', 'unit_of_measurement': None, }) # --- @@ -87,7 +87,7 @@ 'previous_unique_id': None, 'supported_features': 0, 'translation_key': 'light', - 'unique_id': '2-light', + 'unique_id': '2', 'unit_of_measurement': None, }) # ---