From Trace Timeline "Choose: Error:" but choice is made and executed

Hello,

Thank you for your assistance.

I have the below automation that when option 1 is choosen it works most of the time and all of the time I get “Choose: Error:” as a step in the Trace Timeline. The step Detail says:

Error

Executed: January 21, 2025 at 7:25:13 AM
Result:
result: false
state: 1
wanted_state_above: 3

Error

Here is the automation and you can see the wanted state 3 comes from option 5

alias: Motion Camera Detected
description: ""
triggers:
  - entity_id:
      - binary_sensor.all_motion_except_backyard
    to: "on"
    id: Motion Detected Except Backyard
    trigger: state
    alias: Any Motion Except Backyard
  - entity_id:
      - timer.security_lights
    id: Idle
    trigger: state
    to: idle
  - trigger: state
    entity_id:
      - sensor.named_person_on_cameras
    to: "True"
    id: Named Person
  - device_id: 11ed6aa090a2e55f696f3f9cdccaf911
    domain: cover
    entity_id: cc55f61991e65c053c87f166b3d91cf9
    type: opening
    trigger: device
    id: Garage Main Open
  - device_id: 64d72dea311e5924652f77a01a9a4bc3
    domain: cover
    entity_id: 207e47d21cee2f5373f3fb223fab4a42
    type: opening
    trigger: device
    id: Garage 3rd Open
  - device_id: 11ed6aa090a2e55f696f3f9cdccaf911
    domain: cover
    entity_id: cc55f61991e65c053c87f166b3d91cf9
    type: closing
    trigger: device
    id: Garage Main Closed
  - trigger: numeric_state
    entity_id:
      - counter.camera_motion_count
    above: 3
    id: High Count
  - trigger: state
    entity_id:
      - switch.group_zzz
    to: "on"
    id: Night
  - trigger: state
    entity_id:
      - timer.security_lights
    to: idle
    id: Gawn
    for:
      hours: 0
      minutes: 10
      seconds: 0
conditions:
  - condition: state
    entity_id: sun.sun
    state: below_horizon
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Motion Detected Except Backyard
        sequence:
          - if:
              - condition: state
                entity_id: binary_sensor.all_person_motion_except_backyard
                state: "on"
            then:
              - action: homeassistant.turn_on
                metadata: {}
                data: {}
                target:
                  entity_id:
                    - switch.group_flood
                    - switch.group_coach
              - action: timer.start
                target:
                  entity_id:
                    - timer.security_lights
                data:
                  duration: "00:10:00"
            else:
              - action: timer.start
                target:
                  entity_id:
                    - timer.security_lights
                data:
                  duration: "00:05:00"
              - action: homeassistant.turn_on
                metadata: {}
                data: {}
                target:
                  entity_id:
                    - switch.group_coach
          - action: counter.increment
            metadata: {}
            data: {}
            target:
              entity_id: counter.camera_motion_count
      - conditions:
          - condition: trigger
            id:
              - Idle
        sequence:
          - action: homeassistant.turn_off
            metadata: {}
            data: {}
            target:
              entity_id:
                - switch.group_flood
                - switch.group_coach
          - action: counter.reset
            metadata: {}
            data: {}
            target:
              entity_id: counter.camera_motion_count
      - conditions:
          - condition: trigger
            id:
              - Named Person
          - condition: or
            conditions:
              - condition: state
                entity_id: select.ditto_guard_mode
                state: Away
              - condition: state
                entity_id: select.ditto_guard_mode
                state: Custom 1
        sequence:
          - device_id: 64c0004472292e2388752f72cf86317e
            domain: select
            entity_id: 1c75ad9416e6283589be3fa17843ac5b
            type: select_option
            option: Custom 2
      - conditions:
          - condition: and
            conditions:
              - condition: trigger
                id:
                  - Garage Main Open
                  - Garage 3rd Open
              - condition: state
                entity_id: sun.sun
                state: below_horizon
        sequence:
          - action: homeassistant.turn_on
            metadata: {}
            data: {}
            target:
              entity_id:
                - switch.group_flood
                - switch.group_coach
          - action: timer.start
            metadata: {}
            data: {}
            target:
              entity_id: timer.security_lights
          - action: counter.increment
            metadata: {}
            data: {}
            target:
              entity_id: counter.camera_motion_count
      - conditions:
          - condition: trigger
            id:
              - High Count
        sequence:
          - action: timer.pause
            metadata: {}
            data: {}
            target:
              entity_id: timer.security_lights
      - conditions:
          - condition: trigger
            id:
              - Garage Main Closed
              - Night
        sequence:
          - action: timer.start
            metadata: {}
            data:
              duration: "00:00:30"
            target:
              entity_id: timer.security_lights
      - conditions:
          - condition: trigger
            id:
              - Gawn
        sequence:
          - choose:
              - conditions:
                  - condition: and
                    conditions:
                      - condition: device
                        device_id: 64c0004472292e2388752f72cf86317e
                        domain: select
                        entity_id: 1c75ad9416e6283589be3fa17843ac5b
                        type: selected_option
                        option: Custom 2
                      - condition: state
                        entity_id: input_boolean.lamps_living_room
                        state: "on"
                sequence:
                  - device_id: 64c0004472292e2388752f72cf86317e
                    domain: select
                    entity_id: 1c75ad9416e6283589be3fa17843ac5b
                    type: select_option
                    option: Custom 1
              - conditions:
                  - condition: and
                    conditions:
                      - condition: device
                        device_id: 64c0004472292e2388752f72cf86317e
                        domain: select
                        entity_id: 1c75ad9416e6283589be3fa17843ac5b
                        type: selected_option
                        option: Custom 2
                      - condition: state
                        entity_id: input_boolean.lamps_living_room
                        state: "off"
                sequence:
                  - device_id: 64c0004472292e2388752f72cf86317e
                    domain: select
                    entity_id: 1c75ad9416e6283589be3fa17843ac5b
                    type: select_option
                    option: Away
mode: single

More info I dont quite understant from the trace.

      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2025-01-21T12:25:13.560394+00:00",
          "changed_variables": {
            "context": {
              "id": "01JJ4D5WJRRXDG3A0DRKSY1731",
              "parent_id": "01JJ4D5VKBQJEE1NZTC6QN4N2D",
              "user_id": null
            }
          },
          "result": {
            "result": false,
            "state": 1,
            "wanted_state_above": 3
          }
        }
      ],
      "action/0/choose/0": [
        {
          "path": "action/0/choose/0",
          "timestamp": "2025-01-21T12:25:13.560422+00:00",
          "result": {
            "result": true
          }
        }
      ],```

ok changed the trigger and it works fine. It worked forever so something changed.

old

trigger: numeric_state
entity_id:
  - counter.camera_motion_count
above: 3
id: High Count
enabled: true
trigger: state
entity_id:
  - counter.camera_motion_count
to: "4"
id: High Count