> {# Twitter Self Promos #} {%- macro getRandomPromo() -%} {{- [ "Use #homeassistant to build a haunted house -> https://youtu.be/3dsUEsu3Evo ", "Randomize #homeassistant automations to keep people guessing what will happen next. Like in a Haunted House -> https://youtu.be/3dsUEsu3Evo", "Did you you know you can use scripts to build smarter #homeassistan automations? I walk you through it -> https://slacker-labs.com/2020/10/23/build-smarter-automations-in-home-assistant/ ", "ICYMI: Build smarter #homeassistant automations using scripts -> https://youtu.be/RIGQy8ZmEf4 ", "If you are running #homeassistant on a Raspbery Pi3 the Raspberry Pi4 is a big improvement. Learn how to migrate everything over and not loose anything at https://slacker-labs.com/2020/08/26/migrating-home-assistant-from-raspberry-pi3-to-a-raspberry-pi4/ ", "Did you see the article about how I can turn into Disney's Haunted Mansion on command using #homeassistant? Visit https://slacker-labs.com/2020/04/04/how-i-turned-my-anchorage-house-into-disneys-haunted-mansion-using-home-assistant/ #homemadedisney ", "ICYMI: How I set up presence detection in #homeassistant -> https://youtu.be/1J776MtLuH4 ", "Presence Detection is critical to a smart home. Follow along how I used four #homeassistant integrations to nail it -> https://slacker-labs.com/2020/11/12/how-i-set-up-presence-detection-in-home-assistant/ ", "#homeassistant automation modes give you a lot more control. Learn how to use them to improve your automation flow -> https://slacker-labs.com/2020/11/21/how-to-use-modes-in-home-assistant-automations/ ", "ICYMI: Use the #homeassistant automation modes to automate the boring stuff -> https://youtu.be/_ni6iFuhozQ ", "If you wanted to know how to install presence detection in #homeassistant Ive got a guide for you. Head over to https://slacker-labs.com/2020/11/25/installing-presence-detection-in-home-assistant/ " ] | random -}} {%- endmacro -%} {%- macro getTags() -%} #homeautomation {%- endmacro -%} {# a macro that removes all newline characters, empty spaces, and returns formatted text #} {%- macro cleanup(data) -%} {%- for item in data.split("\n") if item | trim != "" -%} {{ item | trim }} {% endfor -%} {%- endmacro -%} {# a macro to call all macros :) #} {%- macro mother_of_all_macros() -%} {{ getRandomPromo() }} {{ getTags() }} {%- endmacro -%} {# Call the macro #} {{- cleanup(mother_of_all_macros()) -}}