Koenkk / Koenkk/zigbee2mqtt

MINI-ZB2GS does not expose persistent S1/S2 input state in Detach Relay Mode

Open
#32,824 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

problem
Dominant language
TypeScript
Stars
15.7k
Forks
2k
Avg merge
18h 55m
Merged PRs (30d)
35

Description

What happened?

Hi,

I am using a SONOFF MINI-ZB2GS with Zigbee2MQTT and Home Assistant.
Both external inputs are connected to normal latched wall switches, not push buttons.
I need to use Detach Relay Mode, because the physical wall switch inputs and the relay outputs must be handled independently.

My required behavior is:

  • Wall switch ON → Home Assistant must know that the physical input is ON
  • Wall switch OFF → Home Assistant must know that the physical input is OFF
  • Relay output must remain independent from the physical switch because Detach Relay Mode is enabled

Currently Zigbee2MQTT reports the external inputs only as:
action: toggle_l1
or
action: toggle_l2

This confirms that the physical input changed, but it does not tell Home Assistant whether the latched wall switch is currently ON or OFF.

I expected a persistent input state, for example:

input_l1: ON/OFF
input_l2: ON/OFF

The configured external trigger mode is Following Mode, since normal latched wall switches are used.
Is the actual state of S1/S2 available through a Zigbee cluster attribute that is currently not exposed by Zigbee2MQTT?
If yes, could the device converter expose these physical input states?
If not, is this a limitation of the MINI-ZB2GS firmware/protocol?
The combination of Following Mode + Detach Relay Mode is only useful for my installation if Home Assistant can distinguish between physical switch ON and physical switch OFF.

Thank you.


Hallo,
ich verwende einen SONOFF MINI-ZB2GS mit Zigbee2MQTT und Home Assistant.

An beiden externen Eingängen sind normale rastende Wandschalter (Kontrollschalter angeschlossen, keine Taster.
Ich muss den Detach Relay Mode verwenden, da die physischen Schalteingänge und die Relaisausgänge unabhängig voneinander behandelt werden sollen.

Das benötigte Verhalten ist:

  • Wandschalter EIN → Home Assistant muss erkennen, dass der physische Eingang EIN ist
  • Wandschalter AUS → Home Assistant muss erkennen, dass der physische Eingang AUS ist
  • Der Relaisausgang muss wegen des aktivierten Detach Relay Mode unabhängig vom Wandschalter bleiben

Momentan meldet Zigbee2MQTT die externen Eingänge lediglich als:
action: toggle_l1
oder
action: toggle_l2

Damit ist zwar erkennbar, dass sich der physische Eingang geändert hat, aber Home Assistant erfährt nicht, ob der rastende Wandschalter aktuell EIN oder AUS ist.
Ich hätte einen dauerhaften Eingangszustand erwartet, beispielsweise:
input_l1: ON/OFF
input_l2: ON/OFF

Als External Trigger Mode ist Following Mode eingestellt, da normale rastende Schalter verwendet werden.
Ist der tatsächliche Zustand von S1/S2 eventuell über ein Zigbee-Cluster-Attribut verfügbar, das von Zigbee2MQTT derzeit nicht bereitgestellt wird?
Falls ja, könnte der Device Converter erweitert werden, sodass diese physischen Eingangszustände verfügbar werden?
Falls nein, handelt es sich dabei um eine Einschränkung der Firmware bzw. des Zigbee-Protokolls des MINI-ZB2GS?

Die Kombination aus Following Mode + Detach Relay Mode ist für meine Installation nur sinnvoll nutzbar, wenn Home Assistant zwischen physischem Schalter EIN und physischem Schalter AUS unterscheiden kann.

Vielen Dank für eure Hilfe!
Tiff

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.13.0

Adapter firmware version

20210708

Adapter

ZStack3x0

Setup

Zigbee2MQTT Home Assistant add-on on Home Assistant OS, x64
Zigbee2MQTT 2.13.0
zigbee-herdsman-converters 26.90.0
zigbee-herdsman 10.8.0.

Device database.db entry

No response

Debug log

No response

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SONOFF MINI-ZB2GS device converter and inspecting how S1/S2 actions and available Zigbee cluster attributes are handled. Verify whether Following Mode exposes persistent input state independently of Detach Relay Mode; done means either exposing input_l1/input_l2 as ON/OFF or establishing that the firmware or protocol cannot provide it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.