oops. Needed to tweak christmas countdown tweet

This commit is contained in:
Jeffrey Stone 2020-01-03 12:25:12 -05:00
parent d547060e27
commit a3e12002aa
1 changed files with 16 additions and 8 deletions

View File

@ -179,6 +179,12 @@ automation:
{%- if event > 0 %} {%- if event > 0 %}
true true
{%- endif -%} {%- endif -%}
- condition: template
value_template: >
{%- set event=states.sensor.halloween_countdown.state | int %}
{%- if event < 31 %}
true
{%- endif -%}
action: action:
- delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - 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_notify
@ -213,6 +219,12 @@ automation:
{%- if event > 1 %} {%- if event > 1 %}
true true
{%- endif -%} {%- endif -%}
- condition: template
value_template: >
{%- set event=states.sensor.christmas_countdown.state | int %}
{%- if event < 31 %}
true
{%- endif -%}
action: action:
- service: script.twitter_notify_image - service: script.twitter_notify_image
data_template: data_template:
@ -253,10 +265,8 @@ automation:
action: action:
- service: script.twitter_notify_image - service: script.twitter_notify_image
data_template: data_template:
tweet: >- tweet: Tomorrow is Christmas. It is practically here! Santa is coming tonight! Do not forget the cookies!
"Tomorrow is Christmas. It is practically here! Santa is coming tonight! Do not forget the cookies!" image: /config/www/tweet_images/santa.png
image: >-
"/config/www/tweet_images/santa.jpg"
- id: Christmas Day Tweet - id: Christmas Day Tweet
alias: Christmas Day Tweet alias: Christmas Day Tweet
@ -277,10 +287,8 @@ automation:
action: action:
- service: script.twitter_notify_image - service: script.twitter_notify_image
data_template: data_template:
tweet: >- tweet: From everyone at Anchorage House, Merry Christmas!
"From everyone at Anchorage House, Merry Christmas!" image: /config/www/tweet_images/merry-christmas.jpg
image: >-
"/config/www/tweet_images/merry-christmas.jpg"
- id: Freeze Warning Tweet - id: Freeze Warning Tweet
alias: Freeze Warning Tweet alias: Freeze Warning Tweet