Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.57k stars 1.63k forks source link

Aqara T2 relay (LLKZMK12LM) decouple mode not working properly. Double actions #22170

Closed brainstormi closed 3 months ago

brainstormi commented 3 months ago

What happened?

When pressing the physical switch configured in decouple operation mode (Relay in Wet mode, because I have setup a regular light in the other line), I always receive double events actions at the same time, with first one saying the new state is single_l2 and the last one "", like it was detected a double tap. When doing it simulating pressing the switch through Zigbee UI Exposes , 3 events are launched, the last two shows a similar behavior than the previous case, but the first one reports properly "on"/"off" statuses which allows to create automations.

In control-relay mode it works properly manually acting the physical switch and switch status inside UI it's automatically updated properly.

What did you expect to happen?

Receive a single event with the proper status of the switch.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.36.1-1

Adapter firmware version

20230507

Adapter

Sonoff ZBDongle-P

Setup

Addon, Home Assistant 2024.4.2 running virtualized in Proxmox 8.1 x86-64

Debug log

DECOUPLED MODE PRESSING PHYSICAL SWITCH

event_type: state_changed
data:
  entity_id: sensor.relay_luz_sotano_action
  old_state:
    entity_id: sensor.relay_luz_sotano_action
    state: single_l2
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T17:09:06.060099+00:00"
    last_reported: "2024-04-10T17:09:06.060099+00:00"
    last_updated: "2024-04-10T17:09:06.060099+00:00"
    context:
      id: 01HV4FR3WCMZV56ZY0SRC6DGEZ
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.relay_luz_sotano_action
    state: ""
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T17:09:06.061515+00:00"
    last_reported: "2024-04-10T17:09:06.061515+00:00"
    last_updated: "2024-04-10T17:09:06.061515+00:00"
    context:
      id: 01HV4FR3WDHHQJP2RK0B1RZ7C8
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2024-04-10T17:09:06.061515+00:00"
context:
  id: 01HV4FR3WDHHQJP2RK0B1RZ7C8
  parent_id: null
  user_id: null

event_type: state_changed
data:
  entity_id: sensor.relay_luz_sotano_action
  old_state:
    entity_id: sensor.relay_luz_sotano_action
    state: ""
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T17:09:03.611407+00:00"
    last_reported: "2024-04-10T17:09:03.611407+00:00"
    last_updated: "2024-04-10T17:09:03.611407+00:00"
    context:
      id: 01HV4FR1FVJVV84Z9HRNAW190E
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.relay_luz_sotano_action
    state: single_l2
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T17:09:06.060099+00:00"
    last_reported: "2024-04-10T17:09:06.060099+00:00"
    last_updated: "2024-04-10T17:09:06.060099+00:00"
    context:
      id: 01HV4FR3WCMZV56ZY0SRC6DGEZ
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2024-04-10T17:09:06.060099+00:00"
context:
  id: 01HV4FR3WCMZV56ZY0SRC6DGEZ
  parent_id: null
  user_id: null

DECOUPLED MODE CHANGING SWITH STATUS THROUGH "UI EXPOSES" INTERFACE

event_type: state_changed
data:
  entity_id: sensor.relay_luz_sotano_action
  old_state:
    entity_id: sensor.relay_luz_sotano_action
    state: on_l2
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T18:26:34.809471+00:00"
    last_reported: "2024-04-10T18:26:34.809471+00:00"
    last_updated: "2024-04-10T18:26:34.809471+00:00"
    context:
      id: 01HV4M5ZNSQJR4GKPSKHQJ86XA
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.relay_luz_sotano_action
    state: ""
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T18:26:34.810736+00:00"
    last_reported: "2024-04-10T18:26:34.810736+00:00"
    last_updated: "2024-04-10T18:26:34.810736+00:00"
    context:
      id: 01HV4M5ZNT8CZM5ESP9W76QBZQ
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2024-04-10T18:26:34.810736+00:00"
context:
  id: 01HV4M5ZNT8CZM5ESP9W76QBZQ
  parent_id: null
  user_id: null

event_type: state_changed
data:
  entity_id: sensor.relay_luz_sotano_action
  old_state:
    entity_id: sensor.relay_luz_sotano_action
    state: None
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T18:26:24.784726+00:00"
    last_reported: "2024-04-10T18:26:24.784726+00:00"
    last_updated: "2024-04-10T18:26:24.784726+00:00"
    context:
      id: 01HV4M5NWGHYH5FG0F2MSXA4EM
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.relay_luz_sotano_action
    state: on_l2
    attributes:
      icon: mdi:gesture-double-tap
      friendly_name: Relay Luz Sotano Action
    last_changed: "2024-04-10T18:26:34.809471+00:00"
    last_reported: "2024-04-10T18:26:34.809471+00:00"
    last_updated: "2024-04-10T18:26:34.809471+00:00"
    context:
      id: 01HV4M5ZNSQJR4GKPSKHQJ86XA
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2024-04-10T18:26:34.809471+00:00"
context:
  id: 01HV4M5ZNSQJR4GKPSKHQJ86XA
  parent_id: null
  user_id: null

event_type: state_changed
data:
  entity_id: switch.relay_luz_sotano_l2
  old_state:
    entity_id: switch.relay_luz_sotano_l2
    state: "off"
    attributes:
      friendly_name: Relay Luz Sotano L2
    last_changed: "2024-04-10T18:26:23.616904+00:00"
    last_reported: "2024-04-10T18:26:23.616904+00:00"
    last_updated: "2024-04-10T18:26:23.616904+00:00"
    context:
      id: 01HV4M5MR0BRBQR2MVHX59SA7M
      parent_id: null
      user_id: null
  new_state:
    entity_id: switch.relay_luz_sotano_l2
    state: "on"
    attributes:
      friendly_name: Relay Luz Sotano L2
    last_changed: "2024-04-10T18:26:34.501095+00:00"
    last_reported: "2024-04-10T18:26:34.501095+00:00"
    last_updated: "2024-04-10T18:26:34.501095+00:00"
    context:
      id: 01HV4M5ZC5TRCZGDT6SRMQY9T9
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2024-04-10T18:26:34.501095+00:00"
context:
  id: 01HV4M5ZC5TRCZGDT6SRMQY9T9
  parent_id: null
  user_id: null
brainstormi commented 3 months ago

Seems this should be the standard behavior for decloped mode in Aqara relays/switches. No action needed