Mark Google Health account device as service device (#177996)

This commit is contained in:
Allen Porter
2026-08-01 23:32:48 -07:00
committed by GitHub
parent c0a3957179
commit 3530e4c622
2 changed files with 3 additions and 0 deletions
@@ -123,6 +123,7 @@ async def async_setup_entry(
config_entry_id=entry.entry_id,
identifiers={(DOMAIN, entry.entry_id)},
manufacturer="Google",
entry_type=dr.DeviceEntryType.SERVICE,
)
await hass.config_entries.async_forward_entry_setups(entry, _PLATFORMS)
@@ -25,6 +25,7 @@ from homeassistant.const import (
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import (
CONNECTION_NETWORK_MAC,
DeviceEntryType,
DeviceInfo,
async_get_device_id_by_identifier,
)
@@ -356,6 +357,7 @@ class GoogleHealthSensor[_CoordinatorT: GoogleHealthDataUpdateCoordinator[Any]](
self.entity_description = description
self._attr_unique_id = f"{entry_id}_{description.key}"
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, entry_id)},
manufacturer="Google",
)