code: def report(self, name, ok, msg=None, deltat=20):
          '''report a sensor error'''
          r = self.reports[name]
          if time.time() < r.last_report + deltat:
              r.ok = ok
              return
          r.last_report = time.time()
          if ok and not r.ok:
              self.say("%s OK" % name)
          r.ok = ok
          if not r.ok:
              self.say(msgf report(self, name, ok, msg=None, deltat=20):
          '''report a sensor error'''
          r = self.reports[name]
          if time.time() < r.last_report + deltat:
              r.ok = ok
              return
          r.last_report = time.time()
          if ok and not r.ok:
              self.say("%s OK" % name)
          r.ok = ok
          if not r.ok:
              self.say(msg)
docs: report a sensor error