Moving some twitter stuff around...dont mind me

This commit is contained in:
Jeffrey Stone
2019-11-12 22:49:51 -05:00
parent 71c2bb030e
commit cbf2c01633
4 changed files with 158 additions and 44 deletions

View File

@@ -81,14 +81,10 @@ automation:
{%- endif -%}
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.twitter_notify
- service: script.twitter_bot_info
data_template:
message: >-
"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"
data:
media: >-
'{{ [ "/config/www/tweet_images/robot1.jpg",
"/config/www/tweet_images/robot2.jpg"] | random }}'
- id: net_speed_report
initial_state: true
@@ -97,7 +93,7 @@ automation:
- platform: time
at: '11:15:00'
action:
- service: script.twitter_notify
- service: script.twitter_speedtest
data_template:
message: '{{ [ "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 }}
@@ -106,10 +102,7 @@ automation:
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 }}'
data:
media: >-
{{ [ "/config/www/tweet_images/speed.jpg",
"/config/www/tweet_images/fiber-optic.jpg"] | random }}
- id: rex_manning_day_tweet_1
alias: Rex Manning Day Tweet One
@@ -224,13 +217,6 @@ automation:
"Have you finished your Chistmas shopping? You only have {{states.sensor.christmas_countdown.state}} days left.",
"Have you started your Chistmas shopping? You only have {{states.sensor.christmas_countdown.state}} days left."
] | random }}'
data:
media: >-
{{ [ "/config/www/tweet_images/xmas.jpg",
"/config/www/tweet_images/gift.jpg",
"/config/www/tweet_images/christmas-cookies.jpg",
"/config/www/tweet_images/christmas.jpg",
"/config/www/tweet_images/christmas-tree.jpg"] | random }}
- id: Christmas Eve Tweet
alias: Christmas Eve Tweet
@@ -250,19 +236,17 @@ automation:
{%- endif -%}
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.twitter_notify
- service: script.twitter_xmas_eve
data_template:
message: >-
'Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies!'
data:
media: /config/www/tweet_images/santa.jpg
'Tomorrow is Christmas. It is practically here! Santa is coming tonight! Don't forget the cookies!'
- id: Christmas Day Tweet
alias: Christmas Day Tweet
initial_state: true
trigger:
- platform: time
at: '13:00:00'
at: '04:00:00'
condition:
- condition: state
entity_id: calendar.holidays_in_united_states
@@ -275,12 +259,10 @@ automation:
{%- endif -%}
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.twitter_notify
- service: script.twitter_xmas_day
data_template:
message: >-
'From everyone at Anchorage House, Merry Christmas!'
data:
media: /config/www/tweet_images/merry-christmas.jpg
- id: Freeze Warning Tweet
alias: Freeze Warning Tweet
@@ -294,14 +276,10 @@ automation:
state: 'on'
action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00'
- service: script.twitter_notify
- service: script.twitter_freezing
data_template:
message: '{{ [ "Appears that the temperature will be below freezing soon. I think I will stay inside.",
"The forecasted temperature may kill sensative plants, so I will let the house know. I cannot through inaction allow another to come to harm.",
"Winter is coming. Actually it is already here. I suggest sleeping with Dragon Glass.",
"When the temperature is forcasted to get near freezing, or the NWS issues a Freeze Warning I make sure the residents of Anchorage House know." ] | random }}'
data:
media: >-
{{ [ "/config/www/tweet_images/ice.jpg",
"/config/www/tweet_images/snowfall.jpg",
"/config/www/tweet_images/snowflake.jpg"] | random }}