zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Mi control switch doesn't work correctly after upgrade V 2.0

Open masciotti opened this issue 1 year ago • 3 comments

What happened?

After 2.0 upgrade the device work in Z2M info 2025-01-04 17:52:15z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Tasto Xiaomi 2', payload '{"action":"double","battery":null,"linkquality":252,"power_outage_count":null,"voltage":null}' info 2025-01-04 17:52:15z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Tasto Xiaomi 2/action', payload 'double'

But in HA only battery appears as entity. Tasto Xiaomi 2 Battery sensor.tasto_xiaomi_2_battery MQTT

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.0

Adapter firmware version

7.4.3 (GA)

Adapter

ember

Setup

Pi

Debug log

No response

masciotti avatar Jan 04 '25 17:01 masciotti

Duplicate of #25505, #25500 and may others. Please read the release notes and the references Breaking Changes

m0wlheld avatar Jan 04 '25 17:01 m0wlheld

I have the same problem and I don't use the deprecated sensors. The release notes are mentionning: "All action sensors are now disabled by default (sensor.*_action entities). It's recommended to use the MQTT device trigger instead.". I was already using the MQQ device triggers, but it doesn't work since Z2M 2.0.0. Please see below the triggering part of an automation:

alias: Lichtschakelaar | Keuken
description: ""
triggers:
  - domain: mqtt
    device_id: edb52b2a36f1143e3ea5901e82129813
    type: action
    subtype: 1_single
    discovery_id: 0x3425b4fffef55a1e action_1_single
    id: links-boven-enkel
    alias: Links boven, enkel drukken
    trigger: device
  - domain: mqtt
    device_id: edb52b2a36f1143e3ea5901e82129813
    type: action
    subtype: 2_single
    discovery_id: 0x3425b4fffef55a1e action_2_single
    id: rechts-boven-enkel
    alias: Rechts boven, enkel drukken
    trigger: device

rogervdh avatar Jan 04 '25 17:01 rogervdh

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Mar 06 '25 00:03 github-actions[bot]