I am looking to make an automation informing me I should close the windows if the outside temperature is rising, or open the windows if it starts falling.
The difficult part for me is to compare the outside temp with the inside temp.
I have a onewire thermometer and I am monitoring the house temp.
So, here is what I want to do:
example:
Inside temp is 25c
Outside temp is 23
IF:
outside temp starts rising for the last hour and is about to exceed / or already exceeded the inside temp
THEN:
close the windows
Same goes for the opposite.
This is messing with my head while I am trying to figure it out. It looks so simple, yet I cant even start making the automation.
Thank you! It works.
I am testing it for 2 days now and it is ok, but now my problem is that it is repeating itself. For example: when the outside temperature is already lower than the inside and stops droping, when it starts droping again, the automation is activated again. Any idea on how to prevent this?
I only want it to execute the automation only once.
I donβt understand. If it is dropping, then stops and again start dropping, the trend rising sensor will be False and the automation should not be triggered.
I am not really sure. It is just what I noticed. When it stops dropping/rising and starts again after a while, I have the notification triggered again. Maybe I am the one missing something. Here, check it out for yourself:
This is my automations.yaml
- id: 'close windows'
alias: '[Info] Temp Rising Close Windows'
trigger:
- entity_id: binary_sensor.temp_rising
platform: state
to: 'on'
condition:
- condition: template
value_template: '{{ states.sensor.owm_temperature.state >= states.sensor["280417a2e4d6ff_temperature"].state }}'
action:
- data:
message: "Close the windows"
title: "Custom subject"
service: persistent_notification.create
This works great, but havent put it in the frontend yet. I am still trying to see how to fit it and the truth is, I dont have much time to do it. I was just messing around with my configuration today and bumped into my trend sensor. I have 2 sensors to read. Do you guys think I can make them into one by using a template sensor? I tried some combinations with βifβ but I am not very good at this.
I also want to use icons.
The goal is to have only one sensor to see the temp rising or falling, The sensor should show an arrow showing up if it is rising, one showing down if falling and a dash if idle.