More Attribute condition changes.
This commit is contained in:
parent
cdc1a826b5
commit
2219e82166
|
@ -4,7 +4,7 @@
|
|||
|
||||
- alias: Rachio_Rain_Delay
|
||||
id: 55290018-b763-4739-873e-afb556b2b9be
|
||||
|
||||
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id:
|
||||
|
@ -16,13 +16,18 @@
|
|||
above: 20
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.random_house_stats.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.rachio_rain_delay.attributes.last_triggered)) > 43200 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
- condition: numeric_state
|
||||
entity_id: automation.random_house_stats
|
||||
attribute: last_triggered
|
||||
above: 43200
|
||||
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {%- if states.automation.random_house_stats.attributes.last_triggered -%}
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.automation.rachio_rain_delay.attributes.last_triggered)) > 43200 }}
|
||||
# {%- else -%}
|
||||
# true
|
||||
# {%- endif -%}
|
||||
|
||||
action:
|
||||
- service: ifttt.trigger
|
||||
|
|
|
@ -51,13 +51,19 @@ automation:
|
|||
state: 'disconnect'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 10000 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
|
||||
- condition: numeric_state
|
||||
entity_id: automation.juicebox_selfheal
|
||||
attribute: last_triggered
|
||||
above: 10000
|
||||
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {%- if states.automation.juicebox_selfheal.attributes.last_triggered -%}
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.automation.juicebox_selfheal.attributes.last_triggered)) > 10000 }}
|
||||
# {%- else -%}
|
||||
# true
|
||||
# {%- endif -%}
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
|
|
|
@ -240,18 +240,24 @@ automation:
|
|||
|
||||
- alias: 'Random House stats'
|
||||
id: b274a40d-cb67-4d6a-94d1-5fa685ae5ea4
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
hours: '/2'
|
||||
minutes: 45
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.random_house_stats.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_house_stats.attributes.last_triggered)) > 10000 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
- condition: numeric_state
|
||||
entity_id: automation.random_house_stats
|
||||
attribute: last_triggered
|
||||
above: 10000
|
||||
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {%- if states.automation.random_house_stats.attributes.last_triggered -%}
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.automation.random_house_stats.attributes.last_triggered)) > 10000 }}
|
||||
# {%- else -%}
|
||||
# true
|
||||
# {%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ range(0,2) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}'
|
||||
- service: script.tweet_engine_random
|
||||
|
@ -280,13 +286,18 @@ automation:
|
|||
hours: '/7'
|
||||
minutes: 18
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.random_youtube_videos_bearstone.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_bearstone.attributes.last_triggered)) > 10000 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
- condition: numeric_state
|
||||
entity_id: automation.random_youtube_videos_bearstone
|
||||
attribute: last_triggered
|
||||
above: 10000
|
||||
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {%- if states.automation.random_youtube_videos_bearstone.attributes.last_triggered -%}
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_bearstone.attributes.last_triggered)) > 10000 }}
|
||||
# {%- else -%}
|
||||
# true
|
||||
# {%- endif -%}
|
||||
action:
|
||||
- delay: '0{{ range(0,2) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}'
|
||||
- service: script.tweet_youtube_engine_setup
|
||||
|
@ -295,19 +306,26 @@ automation:
|
|||
|
||||
- alias: 'Random YouTube Videos CCostan'
|
||||
id: 3e8a4db0-165b-4e1b-acb0-ac4503525660
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
hours: '/22'
|
||||
minutes: 45
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{%- if states.automation.random_youtube_videos_ccostan.attributes.last_triggered -%}
|
||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_ccostan.attributes.last_triggered)) > 10000 }}
|
||||
{%- else -%}
|
||||
true
|
||||
{%- endif -%}
|
||||
- condition: numeric_state
|
||||
entity_id: automation.random_youtube_videos_ccostan
|
||||
attribute: last_triggered
|
||||
above: 10000
|
||||
|
||||
# - condition: template
|
||||
# value_template: >
|
||||
# {%- if states.automation.random_youtube_videos_ccostan.attributes.last_triggered -%}
|
||||
# {{ (as_timestamp(now()) - as_timestamp(states.automation.random_youtube_videos_ccostan.attributes.last_triggered)) > 10000 }}
|
||||
# {%- else -%}
|
||||
# true
|
||||
# {%- endif -%}
|
||||
action:
|
||||
- service: script.tweet_youtube_engine_setup
|
||||
data_template:
|
||||
|
|
Loading…
Reference in New Issue