(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.turn_on_config if state['value'] else self.turn_off_config,
            validate_config=False,
            blocking=True,
            context=data.context
        )
async def set_state ( self , data : RequestData , state : dict [ str , Any ] ) : await async_call_from_config ( self . hass , self . turn_on_config if state [ 'value' ] else self . turn_off_config , validate_config = False , blocking = True , context = data . context )