Homeassistant

Away time in Home Assistant and surviving reboots

by Patrick Connelly posted on November 28, 2018

One of the biggest reasons I wanted to set up Home Assistant was to be able to handle a “vacation mode” for my house to change things like the thermostats and lighting. The addition of an input_boolean for this is really straight forward. However reminding myself to set vacation mode if we are away for a long period of time is something a bit harder. To do this, we need to calculate the away time for each user.

The Problem

The linchpin for knowing if I should send a reminder is around how long a person has been away. Originally thought I could just use my Ubiquiti access point’s last_seen time and calculate hours from there. However this field disappears after about 10 minutes of the user being disconnected from the access point. So I needed to find a way to persist the last_seen time event after the access point removes the data from the device_tracker entry.


Turning off a warmer: An intro to home automation

by Patrick Connelly posted on March 11, 2018

Scooter

Now this little warmer may look innocent enough, but it’s a disaster waiting to happen. If you leave it alone, it will kill your whole family without remorse. Ok, that may be a bit hyperbolic, but these things can be kind of dangerous. According to the National Fire Protection Association in 2013 seven people died each day in the US due to home fires. And half of those deaths occurred between the hours of 11 pm and 7 am. Now, how many were caused by this cute little scooter, probably not many. But devices like this can cause fires. This scooter is a wax warmer. It heats up a tray that melts wax and makes your house smell lovely. But if you leave it on too long (by lets say forgetting about it and leaving it on for 48 hours) you get a different result. This has happened more than once in our household, and that’s what leads me to my first real world application of home automation.