diff --git a/custom_components/portainer/entity.py b/custom_components/portainer/entity.py index c41dcdf..a34fadd 100644 --- a/custom_components/portainer/entity.py +++ b/custom_components/portainer/entity.py @@ -159,14 +159,21 @@ def device_info(self) -> DeviceInfo: dev_connection_value = dev_connection_value[6:] dev_connection_value = self._data[dev_connection_value] - return DeviceInfo( - connections={(dev_connection, f"{dev_connection_value}")}, - identifiers={(dev_connection, f"{dev_connection_value}")}, - default_name=f"{self._inst} {dev_group}", - default_manufacturer=f"{self.manufacturer}", - sw_version=f"{self.sw_version}", - configuration_url=f"http://{self.coordinator.config_entry.data[CONF_HOST]}", - ) + if self.description.ha_group == "System": + return DeviceInfo( + connections={(dev_connection, f"{dev_connection_value}")}, + identifiers={(dev_connection, f"{dev_connection_value}")}, + name=f"{self._inst} {dev_group}", + manufacturer=f"{self.manufacturer}", + sw_version=f"{self.sw_version}", + configuration_url=f"http://{self.coordinator.config_entry.data[CONF_HOST]}", + ) + else: + return DeviceInfo( + connections={(dev_connection, f"{dev_connection_value}")}, + default_name=f"{self._inst} {dev_group}", + default_manufacturer=f"{self.manufacturer}", + ) @property def extra_state_attributes(self) -> Mapping[str, Any]: diff --git a/hacs.json b/hacs.json index ef85745..bcbc2e7 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "Portainer", - "homeassistant": "2022.2.0", + "homeassistant": "2023.9.0", "render_readme": false, "zip_release": true, "filename": "portainer.zip"