Upgraded to 0.115 and trying out Attribute conditions.
This commit is contained in:
parent
11382df649
commit
cdc1a826b5
|
@ -27,6 +27,7 @@ __pycache__
|
|||
hacs
|
||||
alexa_media
|
||||
custom_components
|
||||
image
|
||||
tts
|
||||
secrets.yaml
|
||||
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:
|
||||
- alias: 'Vacuum -Tweet'
|
||||
id: 2346efcd-e8a8-4e86-b5b6-43e54a72a95f
|
||||
mode: single
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: vacuum.carlo_neato
|
||||
to: 'cleaning'
|
||||
|
||||
condition:
|
||||
- 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: numeric_state
|
||||
entity_id: vacuum.carlo_neato
|
||||
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 -%}
|
||||
|
||||
action:
|
||||
- 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