def device_entities(hass: HomeAssistant, device_id: str) -> Iterable[str]:
    'Get entity ids for entities tied to a device.'
    entity_reg = entity_registry.async_get(hass)
    entries = entity_registry.async_entries_for_device(entity_reg, device_id)
    return [entry.entity_id for entry in entries]
Get entity ids for entities tied to a device.
def device_entities(hass: HomeAssistant, device_id: str) -> Iterable[str]:
    
    entity_reg = entity_registry.async_get(hass)
    entries = entity_registry.async_entries_for_device(entity_reg, device_id)
    return [entry.entity_id for entry in entries]