.. If Front Porch temp sensor has updated in the last 2 hours, use that value for Virtual Temperature
.. If Deck temp sensor has updated in the last 2 hours, use that value for Virtual Temperature
.. Otherwise - use the OpenWeatherMap data for temperature for Virtual Temperature
Basic idea -- I just discovered that my Porch/Deck temperature devices aren't working in this sub-10 degree weather (highly unusual)
BUT -- am also discovering that OpenWeatherMap is reporting, sometimes, highly inaccurate readings for my area (microclimate) -- like now, it says it's 21 degrees but it's really 9
At this moment -- none of my outdoor sensor have reported in the last 24 hours, and OpenWeatherMap data is inaccurate. I may have an ultimate fall-back to a window sensor that's usually about 30+/- degrees off in freezing weather (like indoors it's 66 degrees, the window contact sensor reads 40 -- it's right on a cold windowsill -- it's a hack, highly inaccurate, but better than anything else -- it could be the final-final-final fall-back)
Basically -- trying to have a rule that does "use the best you can with what you've got" temperature
What I can't find is how to "set a variable" to the "last update time" of a sensor -- I can put that info in a dashboard, but I can't find where to get that data out of the Rule Manager
I wonder if there's an alternate approach that used a couple of variables instead. The rule would trigger any time there was a change in temperature to either sensor and it would update a variable with the current time and the current temperature. That variable essentially becomes the last update time of the sensor and can then be used in comparisons.
@Brad5 -- hey, that's one way to do it. I'd have to create discrete rules -- one for each sensor as a specific trigger to track the time-of-change for that last sensor.
Now, technically, that's not "lastupdated" -- eg, same temp, reported back-to-back -- but it's close enough.
Yup -- got time to ponder on it. It is interesting that "LastUpdated" is exposed to Dashboards, but not - from what I can find - in RM5. Gotta be a technical reason.
There's also the "Averaging Plus" app -- but I don't think it skips-over devices not reporting -- may play with that and/or ask the developer how it works. An "average" of just the functional devices may work.
Ish. Doesn't help with the OpenWeatherMap being wonky. LastUpdate for working sensors is a better solution.
HooHoo -- yes "Averaging Plus" will. So this may be closer. Not exactly my "use this first, use this second, use this third" -- but an average of only things that are alive, is closer
AhHa! -- one of my projects this weekend was to get Blink cameras integrated. Done.
The Blink driver also pulls in temperature from those cams that support it. I've got a couple of outside cameras, and a few are offline (need new batteries). That was a good use-case for this kind of a rule. And it WORKS!
Basically -- as every temperature report comes in -- (from any working outside device that can report temperature) -- update a variable with that latest reading. As long as ONE of the devices reports, I get a current temperature to use. A hack, heck yea. But closes the gap on getting an outside temperature from "sources that are alive"