Updated to not tweet more than once every 4 hours. #747

This commit is contained in:
ccostan 2020-05-23 16:34:20 -04:00
parent ab8d2065b4
commit a109fd6223
1 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,14 @@ automation:
- condition: template
value_template: "{{ states.vacuum.carlo_neato.attributes.battery_level |int < 20 }}"
- condition: template
value_template: >
{%- if states.automation.vacuum_tweet.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.vacuum_tweet.attributes.last_triggered)) > 15000 }}
{%- else -%}
true
{%- endif -%}
action:
- service: script.tweet_engine_image
data_template: