"Hello everyone,
Lately, I’ve been encountering the problem that I need a virtual sensor which records the values of a real sensor over a defined period of time, calculates them, and outputs the desired value. For example:
My sensor, ‘sensor.popp_z_weather_velocity,’ is essentially a propeller that spins in the wind and indicates its speed in m/s. It could be referred to as a gust sensor. To determine the wind speed, it would require an average over 10 minutes. But how do I do that? (Additionally, it would be helpful to have a sensor that shows me whether this last 10-minute value has risen or fallen in the past 20 minutes, but that’s another topic.)
Anyway, I mentioned that I’ve been confronted with this issue lately. My biggest problem is that it involves all sorts of values, mostly meteorological/climatic, but unfortunately not electrical.
Before any misunderstandings arise: I’m not very familiar with line coding. I could handle templates in YAML or a Node-RED flow. Helpers would also be appreciated, but I haven’t yet seen how I can incorporate the time factor. Any ideas?