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