Tweaking twitter content

This commit is contained in:
Jeffrey Stone
2020-04-10 12:41:46 -04:00
parent f3f2cf15f2
commit 181bf3c214
5 changed files with 169 additions and 45 deletions

View 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()) -}}

View File

@@ -1,27 +1,39 @@
>
{# Twitter Promos #}
{%- macro getRandomIntro() -%}
{{- [
"Do you want your house to be a #smarthome? ",
"Your house can be a #smarthome too. ",
"Transform your home into a #smarthome. ",
"You get a #smarthome and you get a smarthome and you get a smarthome. ",
"Looking to automate your house? ",
"Want to get into Home Automation? "
] | random -}}
{%- endmacro -%}
{%- macro getRandomLead() -%}
{{- [
"All you need is #home_assistant, and these config files ->",
"Just grab @home_assistant and checkout ",
"Just grab #home_assistant and for inspiration checkout ",
"It is easy. Install #home_assistant, and add some config files like ",
"You can't go wrong with #home_assistant. For an example of what you can do checkout "
] | random -}}
{%- endmacro -%}
{%- macro getRandomPromo() -%}
{{- [
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/skalavala/mysmarthome ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/arsaboo/homeassistant-config ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/Vasiley/Home-Assistant-Main ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/home-assistant-config cc: @teachingbirds ",
"Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JuanMTech/Home_Assistant_files cc: @JuanMTech ",
"Want to get YouTube Certified in Home Assistant? @ccostan has you covered. Subscribe at https://www.youtube.com/channel/UC301G8JJFzY0BZ_0lshpKpQ ",
"Want to get YouTube Certified in Home Assistant? @thejeffreystone has you covered. Subscribe at https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg ",
"Want to get YouTube Certified in Home Assistant? @Dr_Zzs has you covered. Subscribe at https://www.youtube.com/channel/UC7G4tLa4Kt6A9e3hJ-HO8ng ",
"Want to get YouTube Certified in Home Assistant? @JuanMTech has you covered. Subscribe at https://www.youtube.com/user/Jfelipe83M ",
"Want to get YouTube Certified in Home Assistant? @bhautomation has you covered. Subscribe at https://www.youtube.com/channel/UCSKQutOXuNLvFetrKuwudpg ",
"You can watch videos about how I came to be and all the cool things I'm learning to do at https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg ",
"Anchorage House's Automation was built under the guiding principles of The Three Laws of Home Automation -> https://github.com/thejeffreystone/home-assistant-configuration#anchorage-houses-three-laws-of-home-automation"
"https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ",
"https://github.com/skalavala/mysmarthome ",
"https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ",
"https://github.com/arsaboo/homeassistant-config ",
"https://github.com/Vasiley/Home-Assistant-Main ",
"https://github.com/JamesMcCarthy79/Home-Assistant-Config ",
"https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ",
"https://github.com/isabellaalstrom/home-assistant-config cc: @teachingbirds ",
"https://github.com/JuanMTech/Home_Assistant_files cc: @JuanMTech ",
] | random -}}
{%- endmacro -%}
{%- macro getTags() -%}
#homeassistant #youcandoit #promo #spreadtheword
#homeassistant #youcandoit #spreadtheword #givingback
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
@@ -32,6 +44,8 @@
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getRandomIntro() }}
{{ getRandomLead() }}
{{ getRandomPromo() }}
{{ getTags() }}
{%- endmacro -%}

View File

@@ -0,0 +1,35 @@
>
{# Twitter Self Promos #}
{%- macro getRandomPromo() -%}
{{- [
"Be sure to my follow my Github Repo -> https://github.com/thejeffreystone/home-assistant-configuration",
"Be sure to subscribe to my Youtube channel https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg for videos on Home Assistant.",
"Want to know how to add USPS Notifications to your Home Assistant? @thejeffreystone made a video -> https://www.youtube.com/watch?v=TjVeoAKn-r0",
"You can watch videos about how I came to be and all the cool things I'm learning to do at https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg ",
"You can bring a little Disney #imagineering into your home using @home_assistant. Check out this video @thejeffreystone posted -> https://www.youtube.com/watch?v=Tm9ZXtk5P-s #homemadedisney",
"Anchorage House's Automation was built under the guiding principles of The Three Laws of Home Automation -> https://jeffreystone.net/2020/04/02/the-three-laws-of-home-automation/",
"You can read about how I came to be and all the cool things I'm learning to do at https://jeffreystone.net ",
"Be sure to follow along at https://jeffreystone.net so you can keep up today with the latest updates to my Home Asissitant Configuration",
"Want to know how I was migrated from Hassbian to Home Assistant? Now you can at https://jeffreystone.net/2020/04/05/migrating-from-hassbian-to-hassio/",
"Did you see the post about how I can turn into Disney's Haunted Mansion on command using #home_assistant? Visit https://jeffreystone.net/2020/04/04/how-i-turned-my-anchorage-house-into-disneys-haunted-mansion-using-home-assistant/ #homemadedisney"
] | random -}}
{%- endmacro -%}
{%- macro getTags() -%}
#homeassistant #lookwhatidid
{%- 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()) -}}

View File

@@ -21,7 +21,16 @@
"The wind blows an average of {{ states.sensor.wind_speed_stats.attributes.mean | round}} mph here at Anchorage House.",
"The Washing Machine uses an an average of {{ states.sensor.washer_power_stats.attributes.mean | round}} watts here at Anchorage House.",
"I am currently managing {{ states.sensor.lights_count.state }} lights and {{ states.sensor.tracker_count.state }} devices.",
"Amazon Polly enables me to sound more lifelike by incorporate breathing into my speech. #AWS"
"Amazon Polly enables me to sound more lifelike by incorporating breathing into my speech using #SAML. #AWS",
"According to my latest speed tests Anchorage House is getting
{{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
Mbps up thanks to #ATTFiber. ",
"How fast is your internet? I just checked
am Im seeing {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
Mbps up. Beat that. ",
"My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt
and is {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }}
Mbps up."
] | random -}}
{%- endmacro -%}
{%- macro getTags() -%}