Trigger binary sensor issue

I have set up a trigger binary sensor that i want to update when states change to any value for either of 2 helpers (input_text.front_bedroom_right_lamp_state or input_text.front_bedroom_left_lamp_state) or a third sensor changes to on (binary_sensor.template_ha_restarted_3minutes).

I have changed the value for the first of these.


The sensor is yet to be created so the trigger has not been fired.

I know the template code to set the state is fine as it is returning the correct on state in developer tools. Does anything look odd with this code?

- trigger:
  - trigger: state
    entity_id:
      - input_text.front_bedroom_right_lamp_state
  - trigger: state
    entity_id:
      - input_text.front_bedroom_left_lamp_state
  - trigger: state
    entity_id:
      - binary_sensor.template_ha_restarted_3minutes
    to: "on"
  binary_sensor:
    - name: front_bedroom_lamps_state
    - state: >-
        {% if is_state("input_text.front_bedroom_right_lamp_state", "LampTouch1") or 
        is_state("input_text.front_bedroom_right_lamp_state", "LampTouch2") or 
        is_state("input_text.front_bedroom_right_lamp_state", "LampTouch3") or 
        is_state("input_text.front_bedroom_right_lamp_state", "LampTouchRGB") or 
        is_state("input_text.front_bedroom_left_lamp_state", "LampTouch1") or 
        is_state("input_text.front_bedroom_left_lamp_state", "LampTouch2") or 
        is_state("input_text.front_bedroom_left_lamp_state", "LampTouch3") or 
        is_state("input_text.front_bedroom_left_lamp_state", "LampTouchRGB") or 
        states("input_text.front_bedroom_right_lamp_state") is match("[\x23]") or
        states("input_text.front_bedroom_left_lamp_state") is match("[\x23]") -%}
          on
        {% else -%}
          off
        {% endif %}

Replace the hyphen in front of state: with a space.

Change this:

  - state: >-

To this:

    state: >-

Thanks.

Not sure why I didn’t spot this although maybe I was fooled by the editor reporting no syntax errors.