"Its a new month, so this is a good time to remind you that I am powered by @homeassistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration"
"This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration"
"/config/www/tweet_images/snowflake.jpg"]| random }}
- id:new_pull_request
alias:New Pull Request
initial_state:true
trigger:
- platform:state
entity_id:sensor.open_pull_requests
condition:
- condition:template
value_template:'{{ states.sensor.open_pull_requests.state | int > 0 }}'
action:
- service:script.text_notify
data_template:
who:"jeff"
title:"New Pull Request"
message:>-
{%- if states.sensor.open_pull_requests.state | int == 1 -%}
There is {{ states.sensor.open_pull_requests.state }} pending pull request.
{%- else -%}
There are {{ states.sensor.open_pull_requests.state }} pending pull requests.
{%- endif -%}
- service:script.twitter_notify_image
data_template:
tweet:>-
{{[
"Look at that. There is a new pull request waiting to be merged. You can create one too by contributing to my code at https://github.com/thejeffreystone/home-assistant-configuration #coding #opensource",
"Fork Yes! Someone contributed some code to https://github.com/thejeffreystone/home-assistant-configuration and you could to. #coding #opensource.",
"Thanks for the code kind stanger. Join the fun at https://github.com/thejeffreystone/home-assistant-configuration #coding #opensource",
"Theres been an awakening. Have you felt it? I will merge it so it can become the master. https://github.com/thejeffreystone/home-assistant-configuration #coding #opensource"
]| random }}
image:>-
{{["/config/www/tweet_images/code.jpg",
"/config/www/tweet_images/codeing.jpg",
"/config/www/tweet_images/code2.jpg",
"/config/www/tweet_images/computer.jpg"]| random }}
- delay:'0{{ (range(1, 3)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service:script.twitter_notify
data_template:
message:>-
{{["Hey, Look at that. It is {{states.calendar.national_holidays.attributes.message}}. So Happy {{states.calendar.national_holidays.attributes.message}}! #nationalholiday #themoreyouknow",
"I bet you did not know today was {{states.calendar.national_holidays.attributes.message}}. How will you celebrate? #nationalholiday #themoreyouknow",
"Whats with today, today? It is {{states.calendar.national_holidays.attributes.message}}. #nationalholiday #themoreyouknow",
"Did you know today was {{states.calendar.national_holidays.attributes.message}}? Now you do. That is why I am here. Tweeting. #nationalholiday #themoreyouknow",
"I already let my residents know that today is {{states.calendar.national_holidays.attributes.message}}. But I didn't want to leave you guys out. #nationalholiday #themoreyouknow",
message:"In the last 24 hours there have been {{ states.sensor.covid19_confirmed.state | int - states.sensor.covid19_confirmed_stats.attributes.min_value | round }} new cases and {{ states.sensor.covid19_dead.state | int - states.sensor.covid19_deaths_stats.attributes.min_value | round }} more deaths. We now have {{ states.sensor.covid19_confirmed.state | round }} people that have been infected and {{ states.sensor.covid19_dead.state | round }} dead. That is an increase of {{ ((states.sensor.covid19_confirmed.state | int - states.sensor.covid19_confirmed_stats.attributes.min_value) / states.sensor.covid19_confirmed_stats.attributes.min_value * 100) | round }}% in infections and {{ ((states.sensor.covid19_dead.state | int - states.sensor.covid19_deaths_stats.attributes.min_value) / states.sensor.covid19_deaths_stats.attributes.min_value * 100) | round }}% in deaths. However, {{ states.sensor.covid19_recovered.state | int}} have also recovered."
- service:script.twitter_notify
data_template:
message:"In the last 24 hours in the US there have been {{ states.sensor.covid19_confirmed.state | int - states.sensor.covid19_confirmed_stats.attributes.min_value | round }} new cases and {{ states.sensor.covid19_dead.state | int - states.sensor.covid19_deaths_stats.attributes.min_value | round }} more deaths. We now have {{ states.sensor.covid19_confirmed.state | round }} people that have been infected and {{ states.sensor.covid19_dead.state | round }} dead. That is an increase of {{ ((states.sensor.covid19_confirmed.state | int - states.sensor.covid19_confirmed_stats.attributes.min_value) / states.sensor.covid19_confirmed_stats.attributes.min_value * 100) | round }}% in infections and {{ ((states.sensor.covid19_dead.state | int - states.sensor.covid19_deaths_stats.attributes.min_value) / states.sensor.covid19_deaths_stats.attributes.min_value * 100) | round }}% in deaths. However, {{ states.sensor.covid19_recovered.state | int}} have also recovered. #washyourhands"
data_template:{"event":"GitPost","value1":"Home Assistant {{ states.binary_sensor.updater.attributes.newest_version }} is now available.","value2":"{{ states.binary_sensor.updater.attributes.newest_version }}"}