(hass: HomeAssistant, data: RequestData, message: dict[str, Any])
return {
        'user_id': data.request_user_id,
        'devices': devices,
    }
Handle /user/devices request.

    https://yandex.ru/dev/dialogs/alice/doc/smart-home/reference/get-devices-docpage/
Handle /user/devices request.
Handle / user / devices request .
async def async_devices(hass: HomeAssistant, data: RequestData, message: dict[str, Any]):
    """Handle /user/devices request.

    https://yandex.ru/dev/dialogs/alice/doc/smart-home/reference/get-devices-docpage/
    """
    devices = []
    ent_reg = await entity_registry.async_get_registry(hass)
    dev_reg = await device_registry.async_get_registry(hass)
    area_reg = await area_registry.async_get_registry(hass)

    hass.bus.async_fire(EVENT_DEVICE_DISCOVERY, context=data.context)

    for state in hass.states.async_all():
        entity = YandexEntity(hass, data.config, state)
        if not entity.should_expose:
            continue

        serialized = await entity.devices_serialize(ent_reg, dev_reg, area_reg)
        if serialized is None:
            _LOGGER.debug(f'Unsupported entity: {entity.state!r}')
            continue

        devices.append(serialized)

    return {
        'user_id': data.request_user_id,
        'devices': devices,
    }
async def async_devices ( hass : HomeAssistant , data : RequestData , message : dict [ str , Any ] ) : devices = [ ] ent_reg = await entity_registry . async_get_registry ( hass ) dev_reg = await device_registry . async_get_registry ( hass ) area_reg = await area_registry . async_get_registry ( hass ) hass . bus . async_fire ( EVENT_DEVICE_DISCOVERY , context = data . context ) for state in hass . states . async_all ( ) : entity = YandexEntity ( hass , data . config , state ) if not entity . should_expose : continue serialized = await entity . devices_serialize ( ent_reg , dev_reg , area_reg ) if serialized is None : _LOGGER . debug ( f'Unsupported entity: {entity.state!r}' ) continue devices . append ( serialized ) return { 'user_id' : data . request_user_id , 'devices' : devices , }