Adding Days Until Sensor to my Home Assistant Speech routines


A few videos and posts ago, we made a new Holiday sensor that would use Wolfram Alpha API to give us the days until a particular holiday.   You can read and watch the video on that subject here:

This time around, we use these sensors and add functionality to allow Home Assistant to append these types of stats into some of the speech routines that house normally processes.  So like a ‘and one more thing’, type of speech response.  These type of random house stats and facts help give Joanna more of a personality and spontaneity throughout the day.

For the speech macro, we first evaluate the month and if it is a holiday month like October or December, we will occasionally add in this fact to the overall speech message.  I say occasionally since the house does have several options to randomly choose from.

{# call a Random fact about the house or inspiration quote #}
{{ ([iss, moon, uv, holiday, days_until, outside_weather, outside_weather, inspirational_quote]|random)() }}

The holiday code is just one of those options.  The house also has stats on the Internaltional Space station, weather, moon phases and inspirational quotes. 
If you are interested in seeing how I did this, check out the video posted below:

Happy Automating!