code: def start(self):
          
          self.publish_properties()
          self.subscribe_topics()
          gc.collect()
  
          self.set_state("ready")
  
          while True:
              try:
                  if not utils.wlan.isconnected():
                      utils.wifi_connect()
  
                  # publish device data
                  self.publish_data()
  
                  # check for new mqtt messages
                  self.mqtt.check_msg()
  
                  idle()
                  sleep(1)
              except KeyboardInterrupt:
                  self.set_state("disconnected")
                  self.mqtt.disconnect()
docs: publish device and node properties, run forever