Automation not triggering on one state change but does on the other

Hi,
Any ideas why the 1st automation doesn’t trigger (to: ‘yes’) but the second (to: ‘no’) does trigger. I can sensor.ironing_room_motion switching from no to yes and back again, so really can’t understand why only one of these trigger.

Relevant snippet of code taken from a package.

sensor:
  - platform: template
    sensors:
      ironing_room_motion:
        value_template: "{% if is_state('sensor.aeotec_zw100_multisensor_6_burglar','8') %}yes{% else %}no{% endif %}"
        friendly_name: "Ironing Room Motion"

automation:
  - alias: Ironing room motion detected
    trigger:
      - platform: state
        entity_id: sensor.ironing_room_motion
        to: 'yes'
    action:
      - service: notify.ios_martins_iphone
        data:
          title: "DEBUG"
          message: "Ironing room motion detected"
  - alias: Ironing room no motion 30 mins
    trigger:
      - platform: state
        entity_id: sensor.ironing_room_motion
        to: 'no'
        for:
          minutes: 30
    action:
      - service: notify.ios_martins_iphone
        data:
          title: "DEBUG"
          message: "Ironing room no motion 30 mins"

Turned out I’d managed to turn off the automation for the first one! Not sure when/how, but re-enabling it, fixed it.

Why don’t you use a template binary sensor for this?

How would that simplify things?