mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-09-14 07:45:48 +00:00
Moving some tweets around, adding some new content to the promos, adding some new tweets
This commit is contained in:
31
config/templates/twitter_follow_me.yaml
Executable file
31
config/templates/twitter_follow_me.yaml
Executable file
@@ -0,0 +1,31 @@
|
||||
>
|
||||
{# Twitter Self Promos #}
|
||||
{%- macro getRandomPromo() -%}
|
||||
{{- [
|
||||
"Be sure to Star My #homeassistant Github Repo -> https://github.com/thejeffreystone/home-assistant-configuration so you can stay up to date with changes to my config. ",
|
||||
"Follow my #homeassistant Github repo and you could be one of the {{ states.sensor.home_assistant_configuration.attributes.stargazers}} people currently following everything that happens in realtime. ",
|
||||
"Be sure to subscribe to my Youtube channel https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg for videos on #homeassistant and building a smart home. ",
|
||||
"Be sure you follow my other accounts on Twitter @thejeffreystone @slackerlabs for #homeassistant content ",
|
||||
"If you haven not already, checkout my blog at https://slacker-labs.com for articles om Home Automation and Smart Home tech and #homeassistant ",
|
||||
"Be sure to follow along at https://slacker-labs.com so you can keep up today with the latest #homeassistant how-tows, reviews, and join the conversation. ",
|
||||
"Do you want your house to be a #smarthome? It is easy. Install #homeassistant, and add some config files like https://github.com/thejeffreystone/home-assistant-configuration "
|
||||
] | 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()) -}}
|
Reference in New Issue
Block a user