Home Assistant Automate Boring Stuff

Alexa, warm up the milk

When I became a father, I had to warm up the milk for my daughter every couple of hours. The most popular milk warmer on the market doesn’t come with a timer, so I had to plug the bottle warmer in, start a timer on my phone, and unplug the warmer when the timer is up. During the daytime this was fine, but I didn’t want to pick up my phone during the night and risk opening up Reddit and losing my precious sleep. So I automated this with the help of Home Assistant, Kasa smart switch, Zigbee push button, Echo Dot, and Alexa routine.

Version 1

So I created this simple routine in Alexa which turns the Kasa smart switch on, waits for 3 minutes, and turns the switch off. All I had to do when I wanted to warm up the milk is, say “Alexa, warm up the milk.”

But how do I know when the switch was turned off? So I added some sound after the timer was finished, so I know when the milk is ready.

Version 2

Version 1 did its job, but it was too simple. It still required me to command Alexa using my voice and sometimes Alexa won’t understand what I am saying because I had to whisper so my wife or my daughter doesn’t wake up. Also, I wanted my parents to be able to use this automation, but they always have a hard time using Alexa.

The solution was simple – Attach a Zigbee push button which triggers automation from Home Assistant. Alexa integration for Home Assistant lets me trigger the Alexa routine, so I can keep my original routine within Alexa and just have Home Assistant trigger this Alexa routine when I press the Zigbee button.

Version 3

While version 2 automation was nearly perfect, I lost the ability to play the sound on the correct echo dot when the timer finished since Home Assistant wouldn’t know which room I was in. During the daytime, we move the bottle warmer downstairs to the kitchen. During the nighttime, we keep the bottle warmer in our bedroom. But sometimes, our daughter will stay with our parents in the guest room and they take care of feeding my daughter. So when someone pressed the button, I needed a way for Home Assistant to know which room the bottle warmer was in, so that it could trigger the Alexa routine from the echo dot in that room.

At first, I used the motion sensor to identify which echo dot to select for running the Alexa. However I started running into false positives if there was motion detected in multiple rooms at the same time. So it was time to come up with a different strategy.

I use mesh wifi from Eero and I used the information from Eero integration for Home Assistant to find out which router the Kasa smart switch from the bottle warmer is connected to. I can then map which room the bottle warmer is in. Now, Home Assistant can trigger the Alexa routine from the echo dot in the correct room.

Bottle warmer switch connected to Eero mesh wifi

Please take a look at my Home Assistant nursery dashboard I have created for my daughter if you are looking for automation ideas. You can also check out my Home Assistant setup post if you are new to Home Assistant and want to get started.

One thought on “Alexa, warm up the milk

Leave a Reply