mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-20 04:04:06 +00:00
Made a weird mistake with Last_triggered so had to back it out. There has to be a better way but for now, this is fine.
This commit is contained in:
@@ -23,21 +23,13 @@ automation:
|
||||
attribute: battery_level
|
||||
below: 20
|
||||
|
||||
- condition: numeric_state
|
||||
entity_id: automation.vacuum_tweet
|
||||
attribute: last_triggered
|
||||
above: 15000
|
||||
|
||||
# - 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 -%}
|
||||
- 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
|
||||
|
Reference in New Issue
Block a user