#Upgrading matter integration resets state of buttons and triggers automations

5 messages · Page 1 of 1 (latest)

meager tree
#

I'm using Aqara's matter bridge to add Aqara accessories to HA. I have a number of Aqara buttons that trigger automations based on their state change. When I upgrade the matter server I see that all of my button automations were triggered after the upgrade. My theory is that something is resetting state of these buttons to whatever happened last (typically a button click).

Here's an example of onr of my button automations:

alias: button_trigger_garage_door
description: ""
trigger:
  - platform: state
    entity_id:
      - event.aqara_button_garage_door_button
    alias: button_trigger_garage_door
condition:
  - condition: state
    entity_id: event.aqara_button_garage_door_button
    attribute: event_type
    state: multi_press_1
action:
  - type: toggle
    device_id: 0fb9f0859d36337383d636a6ffa6c87a
    entity_id: 7b459f2664453c0da474ca9b6a11f82e
    domain: switch
mode: single
fallen rivet
#

I believe what happens specifically is that while the matter server is restarting, all of the entities that the matter integration provides will become "unavailable" state until the matter server comes back online and re-subscribes to all devices.

#

i think this is probably better than the alternative of showing stale/inaccurate state while it's unable to receive any updates from devices.

#

but that does mean that you get a state update, yeah.

honest knot
#

Add not_from: unavailable to your trigger and I think you'll be good