code: def set_heartbeat(self, state):
          
  
          if state in ["on", "off", "open"]:
              self.heartbeat = state
              self.server.request("screen_set %s heartbeat %s" % (self.ref, self.heartbeat))
docs: Set Screen Heartbeat Display Mode