Two input_select different (not equal) in condition

Hi at all, i’ve 2 input_select and i need to check that:
value X choosen from select 1 is different from value Y choosen from select 2…

i wrote this automation but it doesn’t works.

- id: '1587752785963'
 alias: test
  trigger:
  - entity_id: input_select.start_timer
    from: OFF
    platform: state
    to: ON
  condition:
  - condition: template
    value_template: '{{ states.input_select.start_hour.state != states.input_select.end_hour.state}}'
  action:
  - data: {}
    entity_id: automation.start_timer
    service: automation.turn_on

The automation in action starts even if both values in input_select are equal…
Is it possible to show a message (notification f.e) if the condition is not verified?

Thanks a lot

value_template: "{{ states('input_select.start_hour')|float != states('input_select.end_hour')|float }}'
1 Like

Did the suggestion above solve your problem? If so, please mark it the solution.

If not, then how are you triggering the automation? Are you changing input_select.start_timer, or are you manually triggering it via the TRIGGER button?

thanks. it works

1 Like