I searched a lot but didn’t find the correct answer.
I want to notify my family when a window is open and the temperature in that specific room dropped by 2 degrees within 1 hour.
How can I realise that. Something with history stats?
In my opinion I need to do the following.
Store the actual room temperature in a sensor when the window changes it state to open.
Trigger an automation when the actual room temperature is 2 degrees below the saved temperature and the window is open.
Can somebody please help how to do that? I also would like to do that for all rooms. Maybe there is a way to simplyfy that instead of creating 8 different automations.
Thx for your help.
jchh
(my username is my initials (and my first name isn't John))
2
this should tell you the max temp in the last hour.
- platform: statistics
name: "room name max temp"
entity_id: sensor.room_temp
state_characteristic: value_max
max_age:
hours: 1
sampling_size: 12
precision: 1
You could trigger your automation if this sensor (sensor.room_name_max_temp) > sensor.room_name by 2.0 with the condition that the window is open.
Unfortunately it didn’t work. Last time when I tried it I manually changed the max temp.
But now I checked the difference between the temperature and max temp and its always nearly the same. any idea?
I think I need to store the actual temperature when the window is opened and as soon as the real temperature gets 2°C below that stored point I need to send an alarm.
Any idea how that could work?
Heres a picture of the max temp and actual temp and the reason why it didn’t work.
jchh
(my username is my initials (and my first name isn't John))
7
hoe many times does the temps sensor update per hour?
The problem may be that this is not frequent enough?
OK, let’s try your original idea.
What’s the temp sensor’s entity_id and have you set up an input_number for the saved temp? No worries if not, I’ll try and write your automation for you later today…
1 Like
jchh
(my username is my initials (and my first name isn't John))
8