Set device entry type and integration type to service in Portainer integration (#162732)

This commit is contained in:
Manu
2026-02-10 17:51:03 +01:00
committed by GitHub
parent af07631d83
commit dea4452e42
3 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
from yarl import URL
from homeassistant.const import CONF_URL
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DEFAULT_NAME, DOMAIN
@@ -42,6 +42,7 @@ class PortainerEndpointEntity(PortainerCoordinatorEntity):
manufacturer=DEFAULT_NAME,
model="Endpoint",
name=device_info.endpoint.name,
entry_type=DeviceEntryType.SERVICE,
)
@property
@@ -87,6 +88,7 @@ class PortainerContainerEntity(PortainerCoordinatorEntity):
f"{self.coordinator.config_entry.entry_id}_{self.endpoint_id}",
),
translation_key=None if self.device_name else "unknown_container",
entry_type=DeviceEntryType.SERVICE,
)
@property

View File

@@ -4,7 +4,7 @@
"codeowners": ["@erwindouna"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/portainer",
"integration_type": "hub",
"integration_type": "service",
"iot_class": "local_polling",
"quality_scale": "bronze",
"requirements": ["pyportainer==1.0.23"]

View File

@@ -5220,7 +5220,7 @@
},
"portainer": {
"name": "Portainer",
"integration_type": "hub",
"integration_type": "service",
"config_flow": true,
"iot_class": "local_polling"
},