Can't get this CONDITION to pass

It passes config OK but I can’t get it to pass logically. The states of my entities all check out correctly so I’m guessing it’s my configuration but I can’t see where it’s incorrect.

Any ideas?

  condition: #  ((NOT day) OR (walk test mode = ON)) AND ((Lights on) OR (Lights on Auto))
    condition: and
    conditions: 
      - condition: or # 'when dark or walk test' 
        conditions: 
          - condition: template
            value_template: "{{ states.sensor.period_of_day.state != 'day' }}"
          - condition: state
            entity_id: input_boolean.walk_test 
            state: ‘on’
      - condition: or # Lights turned ON or on Manual 
        conditions:
          - condition: state
            entity_id: input_boolean.security_lights_onoff
            state: ‘on’
          - condition: state
            entity_id: input_boolean.security_lights_automan
            state: ‘on’

Your quotes are not correct.
Use ' and not or

Which quotes do you mean?

It passes config check but the logic seems wrong.

OK. Got it!

Thank you so much for your help.