code: def on(self, state):
          
          self._on = state
          cmd = self.command_set.off()
          if state:
              cmd = self.command_set.on()
          self.send(cmd)
docs: Turn on or off.
  
          :param state: True (on) or False (off).