Why My FP2 Automation Silently Died: The Matter vs. HomeKit Pairing Trap

Follow-up to my FP2 setup topic — this time not a success story, but a troubleshooting one. Maybe it saves someone an evening of head-scratching.

The symptom: My presence-based sofa light automation (the one I shared here earlier) just stopped working. No error, no log entry, automation shows as “on” — it simply never fired again. For days.

The diagnosis turned up three things, and only one was the real culprit:

  1. Red herring #1: The lux condition (below: 60) can never pass in daylight — so daytime testing looks like “it’s broken” even when it isn’t.
  2. Red herring #2: The automation was stuck in its wait_for_trigger — a symptom, not the cause.
  3. The actual cause: One of the FP2’s two presence sensor entities no longer existed in Home Assistant. Every reference to it returned nothing.

:warning: Correction (Sep 6): As @JohnD pointed out below, the FP2 never received native Matter support — so the “Matter vs. HomeKit” table that originally stood here was wrong. What actually happened: my FP2 was paired via HomeKit all along, and my two presence entities were most likely total presence + one configured zone. The re-pairing wiped the zone configuration, which is why only one entity came back — with new IDs. Full details in post #3.

The lesson that cost me the most time stands unchanged: a re-pairing silently changes your entity set. HA ends up with a reduced entity set and new entity IDs, and every automation pointing at the old IDs breaks silently. No warning, no error. The automation just waits forever for an entity that will never report again.

The fix: I rewrote the automation for the single remaining presence sensor — and while I was at it, switched from mode: single to mode: restart, so a stuck instance can never block new triggers again:

alias: Presence light living room
description: >-
  Turns on the sofa light on presence + darkness. Uses FP2 presence
  sensor 1. Turns off after the sensor has been clear for 5 minutes.
triggers:
  - entity_id: binary_sensor.living_room_fp2_presence_sensor_1
    to: "on"
    id: presence_on
    trigger: state
conditions:
  - condition: numeric_state
    entity_id: sensor.living_room_fp2_light_sensor_light_level
    below: 60
  - condition: state
    entity_id: binary_sensor.living_room_fp2_presence_sensor_1
    state: "on"
actions:
  - action: light.turn_on
    target:
      entity_id: light.living_room_sofa_light
  - wait_for_trigger:
      - trigger: state
        entity_id: binary_sensor.living_room_fp2_presence_sensor_1
        to: "off"
        for: "00:05:00"
  - choose:
      - conditions:
          - condition: state
            entity_id: binary_sensor.living_room_fp2_presence_sensor_1
            state: "off"
        sequence:
          - action: light.turn_off
            target:
              entity_id: light.living_room_sofa_light
mode: restart
max_exceeded: silent

Three takeaways:

  • If an automation “just stops”, check whether its entities still exist at all (Developer Tools → States) before debugging the logic.
  • After any re-pairing, check which integration owns the device now (Settings → Devices & Services). Matter and HomeKit look similar in the device list but expose different entities.
  • mode: restart is the more forgiving default for presence automations — every new trigger kills a potentially stuck instance.

Note: pairing back via Matter would restore both presence sensors — but the entity IDs would change again, so the automation would need a second rewrite. For now, one zone is all this room needs.

Has anyone else been bitten by the Matter ↔ HomeKit switch? Curious if this is common.

2 Likes

Hey. I’m afraid I don’t quite understand what you mean.

I’ve integrated my FP2 into Home Assistant via HomeKit, and usually, for each zone that you set up in the Aqara Home app, a presence sensor entity is created, as well as an entity that groups all the zones together.

Actually, I’d always thought that the FP2 doesn’t support Matter unless you set it up via an Aqara hub using Matter signals, right?

Alternatively, you can integrate the FP2 via the Aqara Cloud. However, the signal would then travel over the internet, which would cause some delay.

By the way, I mentioned the restart mode in my reply to your other post.

2 Likes

Thanks @JohnD — you’re right, and this is exactly the kind of reply I was hoping for. I dug into it: the FP2 indeed never received the once-announced native Matter support, and via HomeKit each configured zone does sync as its own occupancy sensor.

So the more accurate reconstruction of my incident: my two presence entities were most likely total presence + my one zone (via HomeKit all along), and the re-pairing wiped the zone config — which is why only one entity came back, with new IDs.

The core lesson survives unchanged — re-pairing silently changes your entity set and breaks automations without any error — but the “Matter vs. HomeKit” framing in my table above was wrong. My trust level doesn’t let me edit the original post yet, so please read this correction alongside it.

And yes — full credit, your reply on my setup topic is where I got the mode: restart idea. :pray:

1 Like