I am using a Jason Dictionary to store times (the key) that rain gauge trips occur in my home automation system. If I wanted to come up with a routine that would tell me how many trips have occurred in the last 24 or 48 hours, what might that look like? I’m a bit out of practice on coding, so any help would be welcome.
For each trip:
Dictionary_Rain_Gauge.Value(datetime.now.SQLDateTime) = “Rain Gauge Trip Time” //Set trip time to current time
Save_Json_Dictionary(“Dictionary Rain Gauge Json”,Dictionary_Rain_Gauge)