Sun azimuth enitity comparing with value of helper, not always triggering

I’ve made an automation that should start when the azimuth angle of the sun is above the angle of a helper that I can set manually. Sometimes the automation gets triggered, but not every time. Can someone please help me?

alias: RolluikenAutoSolarWoonkamer
description: ""
triggers:
  - trigger: template
    value_template: >
      {{ states('sensor.sun_solar_azimuth') | float >
      states('input_number.woonkamer_azimuth_sluit') | float }}
    id: "1"
    alias: Zon is in sluitstand
  - trigger: template
    value_template: >
      {{ states('sensor.sun_solar_azimuth') | float >
      states('input_number.woonkamer_azimuth_open') | float }}
    id: "2"
    alias: Zon is in openstand
conditions:
  - condition: state
    entity_id: input_select.rolluikmodus
    state: AutoSolar
actions:
  - if:
      - condition: trigger
        id:
          - "1"
    then:
      - action: cover.set_cover_position
        metadata: {}
        data:
          position: 20
        target:
          entity_id: cover.rolluik_woonkamer
  - if:
      - condition: and
        conditions:
          - condition: trigger
            id:
              - "2"
    then:
      - action: cover.open_cover
        target:
          entity_id:
            - cover.rolluik_woonkamer
        data: {}
mode: single