I am looking for help with two separate but related issues. I have a few battery-powered sensors that are programmed to go into a deep sleep for intervals of 1 hour, then wake up, measure and back to sleep. The battery lasts 1 to 2 months. I am trying to get a notification when they get unavailable. Here is the code that I am playing with;
they keep reporting temperature. one went to state unknown and the temperature becomes constant. so an easy (?) solution would be to check if temperature remains constant for a certain period of time.