Its a new month, so this is a good time to remind you that I am powered by#homeassistant. Find my code at https://github.com/thejeffreystone/home-assistant-configuration
You can #homeassistant content related to Anchorage House at -> Blog: https://slacker-labs.com | Videos: https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg | Config:https://github.com/thejeffreystone/home-assistant-configuration
You can find my #homeassistant content at -> Blog: https://slacker-labs.com | Videos: https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg | Config:https://github.com/thejeffreystone/home-assistant-configuration
{% set day=states("sensor.date").split('-')[2] | int %}
{%- if day == 1 -%}
true
{%- endif -%}
action:
- delay:'0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service:script.twitter_notify_image
data_template:
who:'slackerlabs'
tweet:>-
You can find my #homeassistant content at -> Blog: https://slacker-labs.com | Videos: https://www.youtube.com/channel/UCipZJ6748kd8TbelSxcvcVg | Config:https://github.com/thejeffreystone/home-assistant-configuration
"Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors. They need to get here in {{states.sensor.halloween_countdown.state}} days."
{%- set event=states. calendar.birthdays.attributes.message %}
{%- if event == "Skylar's Birthday" %}
true
{%- endif -%}
action:
# - service: script.speech_engine
# data:
# who: main
# message: >
# May I have your attention. At this very monent {{ states.sensor.birthday_skylar.attributes.years }} years ago, Skylar was born and the world has been better ever since.
- service:script.twitter_notify
data_template:
message:Today is a very special day here at Anchorage House! It is Skylar's birthday! So have some cake and play some minecraft. Live Feed from the Kitchen -> https://www.youtube.com/watch?v=JOBYJrVQm3A
"/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: "Yesterday in the US there was {{ states.sensor.covid_pv_new_cases.state }} new cases of COVID-19 reported and {{ states.sensor.covid_pv_new_dead.state }} more deaths. We now have a total of {{ states.sensor.covid_pv_confirmed.state }} people that have been infected and {{ states.sensor.covid_pv_dead.state }} that have died. So far {{ states.sensor.covid_pv_recovered.state }} have recovered, but {{ states.sensor.covid_pv_critical.state }} are in critical condition."
# - service: script.twitter_notify
# data_template:
# message: >-
# COVID-19 Stats for yesterday in the US: New Infections: {{ states.sensor.covid_pv_new_cases.state }} (Daily Change:{{ (((states.sensor.covid_pv_new_cases.state |replace(",", "") | int - states.sensor.covid_old_new_count.state |replace(",", "") | int) / states.sensor.covid_pv_new_cases.state |replace(",", "") | int * 100) | round)}}%) | New Deaths: {{ states.sensor.covid_pv_new_dead.state}} (Daily Change:{{ (((states.sensor.covid_pv_new_dead.state |replace(",", "") | int - states.sensor.covid_old_dead_count.state |replace(",", "") | int) / states.sensor.covid_pv_new_dead.state |replace(",", "") | int * 100) | round)}}%) | Total Cases: {{ states.sensor.covid_pv_confirmed.state }} | Total Dead:{{ states.sensor.covid_pv_dead.state }} | Total Recovered: {{ states.sensor.covid_pv_recovered.state }} ({{ ((states.sensor.covid_pv_recovered.state |replace(",", "") | int / states.sensor.covid_pv_confirmed.state |replace(",", "") | int) * 100) | round }}%)| Critical Cases: {{ states.sensor.covid_pv_critical.state }}