So, I recently discovered home assistant last night and got everything set up to automate the task that I have been interested in for quite some time now.
I have guests living with me temporarily. I have my thermostat set up to 75 while away which is a reasonable temperature for my guests who don’t pay any bills. The problem is I will get off work and notice that the thermostat was manually set to 70. I already gave an amount of time they could stay with me, and I will just have to deal with this until then. Here is what my intentions are
Task steps:
-Run task every 20 minutes
-if I am not home and the set temperature is below 75 (there’s 2 ways to do this with my t-stat)
-
then (
-
send a notification to my phone
-change the hvac mode to cool (we live in Texas). My t-stat is usually in auto with a heat setpoint and a cool setpoint or it can be in cool mode with only a cool setpoint (still auto)
-set temp to 75
)
-done
So far, I think the task has been working the way I want it to. I tested the task 2 ways. First with a gps simulator on my phone to simulate being away and changing the set temp below my desired setpoint, 75. Also, I tested separately by changing “pixel is not home” to “pixel is home” and changing the temp below the sp.
My phone location would not update when I would leave my home network, so I used DuckDNS to access my Home Assistant server on my phone while I was off the home Wi-Fi so my phone location would update. Can anyone tell me if this was even necessary, and is this even a safe way to do this?
I did notice that when I was away and changed the temp below 75 from my t-stat app it did change to my desired setpoint, but I did not get a notification.
Eventually I plan to run my HA server on a raspberry Pi or an old laptop I don’t care for but for now its running on my desktop until I get familiar with HA.
Questions:
Did I set up my HA task correctly, what would you have done differently?
Was it necessary to use DuckDNS, or something similar so I could get my phone location to update when off the home Wi-Fi? Was that method even safe?
Any ideas why when I am off the home network, I don’t receive a notification, but the task does change the setpoint back to 75?
I’m basically a HA newborn so I apologize if I left out any useful information that would be needed to answer my questions.
if:
- condition: and
conditions:
- condition: device
device_id: ###
domain: device_tracker
entity_id: ###
type: is_not_home
- condition: or
conditions:
- condition: numeric_state
entity_id: climate.t9_thermostat
attribute: target_temp_high
below: 75
- condition: numeric_state
entity_id: climate.t9_thermostat
attribute: temperature
below: 75
then:
- service: notify.mobile_app_pixel_8
metadata: {}
data:
message: TEMPERATURE CHANGED
title: Thermostat
- service: climate.set_hvac_mode
metadata: {}
data:
hvac_mode: cool
target:
entity_id: climate.t9_thermostat
- service: climate.set_temperature
metadata: {}
data:
temperature: 75
target:
entity_id: climate.t9_thermostat