mirror of
https://github.com/home-assistant/core.git
synced 2026-08-03 20:24:55 +02:00
Mark Google Health account device as service device (#177996)
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user