async def set_state(self, parameter):
command_send = CommandSend(pyvlx=self.pyvlx, node_id=self.node_id, parameter=parameter)<EOL>await command_send.do_api_call()<EOL>if not command_send.success:<EOL><INDENT>raise PyVLXException("<STR_LIT>")<EOL><DEDENT>self.parameter = parameter<EOL>await self.after_update()<EOL>
Set switch to desired state.