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

Automation: input_select in condition not working?

$
0
0

@ItsMee wrote:

Hi,

I’m struggeling with this one for a while - hope someone can push me the right way.
My automation works - I’m trying to add a condition that verifies an input_select state.
However, none of the options I tried seems to be right…?

        - condition: template
          value_template: "{% if states.input_select.rolladenstatus.state != 'down' %} true {% else %} false {% endif %} "
#          value_template: "{% if is_states('input_select.rolladenstatus', 'down') %} 1 {% else %} 0 {% endif %}"
#          value_template: "{{ states('input_select.rolladenstatus') != 'down' }}"
#          value_template: "{{ states('input_select.rolladenstatus') not in ['down'] }}"

Same with a bit more context:

  - alias: 'RolladenNew-Sun-Down'
    initial_state: 'on'
    trigger:
      platform: sun
      event: sunset
    #    offset: "00:45:00"
    condition:
      condition: or
      conditions:
        - condition: template
          value_template: "{% if states.input_select.rolladenstatus.state != 'down' %} true {% else %} false {% endif %} "
#          value_template: "{% if is_states('input_select.rolladenstatus', 'down') %} 1 {% else %} 0 {% endif %}"
#          value_template: "{{ states('input_select.rolladenstatus') != 'down' }}"
#          value_template: "{{ states('input_select.rolladenstatus') not in ['down'] }}"
        - condition: time
          after: '17:00:00'
          before: '22:00:00'
          weekday:
            - sat
            - sun
        - condition: time
          after: '17:00:00'
          before: '22:00:00'
          weekday:
            - mon
[..]

Thanks!
ItsMee

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95533

Trending Articles



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