From cfdef2550181aa3848b5953307f0156e4f4ca6c1 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 24 Dec 2023 09:09:19 +0100 Subject: [PATCH] temperature skipped (OK) for shelly1 - no sensor --- check_shelly | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check_shelly b/check_shelly index c6738c5..6fea73b 100755 --- a/check_shelly +++ b/check_shelly @@ -19,6 +19,7 @@ FS_WARNING = .30 # TMP_WARNING = 50 TMP_ERROR = 57 +# if __name__ == "__main__": parser = argparse.ArgumentParser( @@ -79,6 +80,8 @@ if __name__ == "__main__": elif args.check == 'temperature': temperature = data.get('tmp', {}).get('tC') if temperature is None: + if args.hostname.startswith('shelly1-'): + n.exit(n.OK, "Shelly1 has no temperature information") status = n.UNKNOWN elif temperature >= TMP_ERROR: status = n.ERROR