Highest and lowest outdoors temperature during day

I want to receive a push message with the maximum and minimum temperature during the last day. This temp sensor is outdoors. I don’t get it done. I receive same temp for both max and minimum temp. So i think when the temp becomes higher this will set max temp. when temp becomes lower, this will set minimum temp. Can anyone show me with example flow what to do.? Using logica(type) etc. Thanks

What is during the last day?

And what did u try? Can u show us some screenies of the flows u tried and not working?

This is the way I do it. Every night I reset these values with a flow.

This does it for me.
This flow sets the minimum temperature of the day

This sets the max temperature of the day

This sends a message to a user and resets the variables.

I use it to tell the time and temperature of max and min temp in our greenhouse.

Kind regards.


1 Like

Thanks gonna give it a try

Thanks for this! Works like a charm!

For the ones not so familiar with logic: add the Drivhus:mintemp (or greenhouse:mintemp or kas:mintemp) as a text/string variable (or with the app Better Logic). Once you have added the string it can be used as a tag in a flow.

I have exactly this use case, but instead of triggering a flow on each temparature change, I have created a HomeyScript. This HomeyScript calculates the min and max temperature based on the log from Insights.

My script:

let MinVarName=“MinTemp”;
let MaxVarName=“MaxTemp”;

//uri = tuinsensor(Philips Hue)
//id = temperatuur
let entries = await Homey.insights.getLogEntries({uri: “homey:device:3245df43-c818-2289-98c6-ec033472dbf3”,
id: “measure_temperature”,
resolution: “last24Hours”});


var lowest = Number.POSITIVE_INFINITY;
var highest = Number.NEGATIVE_INFINITY;
var tmp;
for (var i=entries.values.length-1; i>=0; i–) {
tmp = entries.values[i].v;
if (tmp != null && tmp < lowest) {
lowest = tmp;
if (tmp != null && tmp > highest){
highest = tmp;
console.log("Max: " + highest + " Min: " + lowest);

await setTagValue(MinVarName, {type: “number”, title: MinVarName}, lowest );
await setTagValue(MaxVarName, {type: “number”, title: MaxVarName}, highest );

return true;

Every morning I run this script from a flow and then the flow updates two variables with the min and max temperature.