mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-09-14 07:45:48 +00:00
Tweaking twitter content
This commit is contained in:
31
config/templates/twitter_great_content.yaml
Executable file
31
config/templates/twitter_great_content.yaml
Executable file
@@ -0,0 +1,31 @@
|
||||
>
|
||||
{# Twitter Great Content #}
|
||||
{%- macro getRandomPromo() -%}
|
||||
{{- [
|
||||
"Want to get YouTube Certified in Home Assistant? @ccostan has the courses to get you there. Subscribe at https://www.youtube.com/channel/UC301G8JJFzY0BZ_0lshpKpQ ",
|
||||
"Checkout one of my favorite Home Assistant Youtubers @ccostan at https://www.youtube.com/channel/UC301G8JJFzY0BZ_0lshpKpQ ",
|
||||
"Don't miss @Dr_Zzs next live stream and besure to follow him on Youtube at https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng ",
|
||||
"Looking for some great Home Assistant content? @JuanMTech has you covered. Subscribe at https://www.youtube.com/user/Jfelipe83M ",
|
||||
"Want some Home Assistant and Home Automation content? @hasscasts has what you want at https://hasscasts.com",
|
||||
"Need some How-To's to juice up your Home Assistant skills? @juanMTech has something for everyone at https://www.juanmtech.com"
|
||||
] | random -}}
|
||||
{%- endmacro -%}
|
||||
{%- macro getTags() -%}
|
||||
#homeassistant #youcandoit #spreadtheword #givingback
|
||||
{%- 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