Sensor state to does not work in trigger

Hi , i can use some help with an automation that did work in the pass…
I have a remote that i use for activating and disarm my hass alarm

Normailly i use trigger 4 (to state Disarm) and the correspondening trigger condition Disarm did work. Ofcource they were enabled!

I made a workaround trigger 1 that does not check the state; this check is done by the condition with the statecheck with value Disarm.

So i have a workaround but why does my old trigger Disarm with a a trigger id check does not work anymore ?

alias: alarm_remote
description: Knoppen_afstandsbedieningen_alarm
trigger:
  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status
    enabled: true
  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status
    to: Arm Home
    id: Arm Home
    enabled: false
  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status
    to: Arm Away
    id: Arm Away
    enabled: false
  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status
    to: Disarm
    id: Disarm
    enabled: false
  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status
    to: Panic
    id: Panic
    enabled: false
  - platform: conversation
    command:
      - Zet huispaneel uit
    id: Disarm2
    enabled: false
  - platform: event
    event_type: rfxtrx_event
    event_data:
      id_string: f3d5c0:32
    id: Algemeen
    enabled: false
condition: []
action:
  - service: variable.update_sensor
    data:
      replace_attributes: false
      attributes:
        "{{berichtid}}": 1 start
    target:
      entity_id: sensor.melding
    enabled: true
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Disarm
              - Disarm2
        sequence:
          - service: alarmo.disarm
            data:
              entity_id: alarm_control_panel.alarmo
              code: "{{ww}}"
          - service: notify.persistent_notification
            data:
              title: Alarm remote
              message: "Alarm remote 1: {{trigger.id}}"
            enabled: true
      - conditions:
          - condition: state
            entity_id: sensor.x10_security_f3d5c0_32_sensor_status
            state: Disarm
        sequence:
          - service: variable.update_sensor
            data:
              replace_attributes: false
              attributes:
                "{{berichtid}}": 2 Disarm
            target:
              entity_id: sensor.melding
            enabled: true
          - service: alarmo.disarm
            data:
              entity_id: alarm_control_panel.alarmo
              code: "{{ww}}"
          - service: notify.persistent_notification
            data:
              title: Alarm remote xxxx
              message: "Alarm remote 1: {{trigger_naar}} "
            enabled: true
      - conditions:
          - condition: trigger
            id:
              - Arm Away
          - condition: state
            entity_id: input_select.alarmsysteem
            state:
              - aan
              - auto
              - simulatie
        sequence:
          - service: alarmo.arm
            data:
              mode: away
              force: true
              entity_id: alarm_control_panel.alarmo
          - service: notify.persistent_notification
            data:
              title: Alarm remote
              message: "Alarm remote 2: {{trigger.id}}"
            enabled: false
      - conditions:
          - condition: trigger
            id:
              - Arm Home
          - condition: state
            entity_id: input_select.alarmsysteem
            state:
              - aan
              - auto
              - simulatie
        sequence:
          - service: alarmo.arm
            data:
              mode: home
              skip_delay: true
              force: true
              entity_id: alarm_control_panel.alarmo
          - service: notify.persistent_notification
            data:
              title: Alarm remote
              message: "Alarm remote 3: {{trigger.id}}"
            enabled: false
      - conditions:
          - condition: trigger
            id:
              - Panic
          - condition: state
            entity_id: input_select.alarmsysteem
            state:
              - aan
              - auto
              - simulatie
        sequence:
          - device_id: 252ffa2cf7edd850adea0edc1b1be3a7
            domain: alarm_control_panel
            entity_id: 63e60e4e2f6d6aa52d978386aff37d15
            type: trigger
          - service: notify.persistent_notification
            data:
              title: Alarm remote
              message: "Alarm remote 4: {{trigger.id}}"
            enabled: false
      - conditions:
          - condition: trigger
            id:
              - Algemeen
          - condition: state
            entity_id: input_select.alarmsysteem
            state:
              - uit
        sequence:
          - service: notify.persistent_notification
            data:
              title: Alarm remote
              message: >-
                Alarm remote 5: {{trigger.id}} zie status alarmcentrale: {{
                states('input_select.alarmsysteem') }}
            enabled: false
  - service: script.turn_on
    data:
      variables:
        bericht_titel: "{{ berichttitel}}"
        bericht_prg: "{{berichtid}}"
        bericht_id: "{{ states['sensor.melding'].attributes[berichtid] }}"
        bericht_logtype: "{{berichtlogtype}}"
        bericht_inhoud:
          dagtype: "{{dagtype}}"
          trigger_id: "{{trigger.id}}"
          trigger_entity_id: "{{trigger.entity_id}}"
          trigger_van: "{{trigger.from_state.state}}"
          trigger_naar: "{{trigger.to_state.state}}"
          alarmcentrale: "{{states('input_select.alarmsysteem')}}"
    target:
      entity_id: script.default_bericht
    enabled: true
variables:
  ww: "xxx"
  dagtype: "{{ states('input_select.dagtypen') }}"
  berichtlogtype: debug
  berichtid: "{{ state_attr(this.entity_id, 'friendly_name') }} (automation)"
  berichttitel: "{{ state_attr(this.entity_id, 'friendly_name')}} ({{trigger.id}})"
  trigger_naar: "{{trigger.to_state.state}}"

Because trigger 1 fires first and trigger 4 is redundant (as well as the other state triggers)?

as i said , i enable scenario 1 or 4 …
so, when disable 1 and enable 4 my old situation is there but works no longer!
so i add a new trigger 1 and disabled 4…
and made a new condition that does the value check Disabled

Dont see what i am doing wrong, looks more like a bug

Ah sorry, I misunderstood.

Are you certain of the sensor states? Disarm with a capital D? Check under Developer Tools / States.

yeah, See my conditions. The state check instead of trigger id check with Disarm where i check the value in the condiotion does work… same value!

i did check the states in devtools… is correct

  1. Enable the trigger you are curious about
  2. Disable the other trigger
  3. Use the remote
  4. Download and Post the automation debug trace. If there is no trace, then either the to state is incorrect or no state change event happened.

I think i find something!
When i update the sensor state to XXX (so its not Disarm anymore)
The event fires! and everything works…

So the state does not changes and the event does not fire ?
So from Disarm to Disarm is not possible ?

That’s not a state change.

Indeed… no state change!

Perhaps this worked before, but this looks the correct behavior…

So my workaround, not check Disarm in the trigger but the whole object
and check the disarm value in the action/condition is the right way?
Feels like the same check with the same state service or am i wrong?

trigger

  - platform: state
    entity_id:
      - sensor.x10_security_f3d5c0_32_sensor_status

action(choosie)

      - conditions:
          - condition: state
            entity_id: sensor.x10_security_f3d5c0_32_sensor_status
            state: Disarm
        sequence: