(self, data: RequestData, state: dict[str, Any])
Set device state.
Set device state.
Set device state .
async def set_state(self, data: RequestData, state: dict[str, Any]):
        """Set device state."""
        await async_call_from_config(
            self.hass,
            self.set_mode_config,
            validate_config=False,
            variables={'mode': self.get_ha_mode_by_yandex_mode(state['value'])},
            blocking=True,
            context=data.context
        )
async def set_state ( self , data : RequestData , state : dict [ str , Any ] ) : await async_call_from_config ( self . hass , self . set_mode_config , validate_config = False , variables = { 'mode' : self . get_ha_mode_by_yandex_mode ( state [ 'value' ] ) } , blocking = True , context = data . context )