Upgraded to 0.115 and trying out Attribute conditions.
This commit is contained in:
parent
11382df649
commit
cdc1a826b5
|
@ -27,6 +27,7 @@ __pycache__
|
||||||
hacs
|
hacs
|
||||||
alexa_media
|
alexa_media
|
||||||
custom_components
|
custom_components
|
||||||
|
image
|
||||||
tts
|
tts
|
||||||
secrets.yaml
|
secrets.yaml
|
||||||
secrets
|
secrets
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.114.4
|
0.115.0
|
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
|
@ -10,22 +10,34 @@
|
||||||
automation:
|
automation:
|
||||||
- alias: 'Vacuum -Tweet'
|
- alias: 'Vacuum -Tweet'
|
||||||
id: 2346efcd-e8a8-4e86-b5b6-43e54a72a95f
|
id: 2346efcd-e8a8-4e86-b5b6-43e54a72a95f
|
||||||
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: vacuum.carlo_neato
|
entity_id: vacuum.carlo_neato
|
||||||
to: 'cleaning'
|
to: 'cleaning'
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
- condition: template
|
|
||||||
value_template: "{{ states.vacuum.carlo_neato.attributes.battery_level |int < 20 }}"
|
|
||||||
|
|
||||||
- condition: template
|
- condition: numeric_state
|
||||||
value_template: >
|
entity_id: vacuum.carlo_neato
|
||||||
{%- if states.automation.vacuum_tweet.attributes.last_triggered -%}
|
attribute: battery_level
|
||||||
{{ (as_timestamp(now()) - as_timestamp(states.automation.vacuum_tweet.attributes.last_triggered)) > 15000 }}
|
below: 20
|
||||||
{%- else -%}
|
|
||||||
true
|
- condition: numeric_state
|
||||||
{%- endif -%}
|
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 -%}
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: script.tweet_engine_image
|
- service: script.tweet_engine_image
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 37 KiB |
Binary file not shown.
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 188 KiB |
Loading…
Reference in New Issue