Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103097

This seems to work, but is it valid?

$
0
0

I was looking thru my code to clean up some of the and / or conditions with the new shortcut from Thomas, and I found this one I was using.
Don’t know how or where I came up with it, but it appears to be working. I look at the samples in the Docs and every list item appears to start with ‘condition:’. Is that word not needed if the condition is a template?

Like I said, this appears to work, but is that intended. Looking for a Masters Opinion.

This is what I was using:

condition:
  condition: or
  conditions:
    - "{{ trigger.to_state.state != '' }}"
    - "{{ trigger.to_state.state != 'off' }}"

This is what I’m changing it to:

or:
  condition:
    - "{{ trigger.to_state.state != '' }}"
    - "{{ trigger.to_state.state != 'off' }}"

I’m worried that it’s not actually doing what I think it is.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103097

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>