Files
epenetGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>frenck
d766aae436 Remove import annotations from components (#169536)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
2026-04-30 21:14:48 +02:00

29 lines
1.0 KiB
Python

"""The Deluge integration."""
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DEFAULT_NAME, DOMAIN
from .coordinator import DelugeDataUpdateCoordinator
class DelugeEntity(CoordinatorEntity[DelugeDataUpdateCoordinator]):
"""Representation of a Deluge entity."""
_attr_has_entity_name = True
def __init__(self, coordinator: DelugeDataUpdateCoordinator) -> None:
"""Initialize a Deluge entity."""
super().__init__(coordinator)
self._server_unique_id = coordinator.config_entry.entry_id
self._attr_device_info = DeviceInfo(
configuration_url=(
f"http://{coordinator.api.host}:{coordinator.api.web_port}"
),
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, coordinator.config_entry.entry_id)},
manufacturer=DEFAULT_NAME,
name=DEFAULT_NAME,
sw_version=coordinator.api.deluge_version,
)