Input Boolean not to switch on button press

Hi All,
I’m using an input_boolean as a dummy switch for motion detection.
So I have multiple sensors in a room to trigger a motion. Each motion sets the dummy input_boolean to on for 5 minutes. So it stays on if within 5 minutes one of the sensors detects motion. I present the input_boolean in lovelace using a custom-button and I’m only interested in the colour of the button (‘motion’ or ‘no-motion’).
But if I press the button now accidentily, it toggles. Any suggestions how to prevent this?
Thx, PPee

Read the docs? action: none looks to me like it would work.

Rather than an input boolean you could use a binary template sensor.

binary_sensor:
  - platform: template
    sensors:
      movement:
        friendly_name: "Movement"
        device_class: motion
        value_template: >-
          {{ is_state_attr('binary_sensor.pir_1', 'on') or
             is_state_attr('binary_sensor.pir_2', 'on') or
             is_state_attr('binary_sensor.pir_3', 'on') or
             is_state_attr('binary_sensor.pir_4', 'on')  }}
        delay_off:
          minutes: 5

great Tom,
Thx

Tried that Troon, but did not work. But reading the docs :upside_down_face: I figured out I missed the tap_action part… works fine now.

1 Like