Description
When using the ZBMINIR2 with an external switch/PIR on the S2 input, the device
reports action: on and action: off both when:
- The S2 input is triggered (e.g. by a PIR sensor)
- The relay is switched externally via Zigbee (e.g. by Home Assistant)
This makes it impossible to distinguish a real physical S2 event from a
software-triggered relay change.
Problem in practice
When building automations where multiple ZBMINIR2 devices trigger each other
(e.g. path lighting where any PIR should activate all lights), switching one
device via Home Assistant causes all other devices to also report action: on
— even though their S2/PIR input was never triggered.
Expected behavior
S2 input events and relay state changes should be reported as separate action
types, for example:
action: s2_on / action: s2_off for real S2 input events
action: relay_on / action: relay_off for software-triggered changes
Or alternatively, relay state changes triggered externally should not generate
an action event at all.
Device info
- Model: ZBMINIR2 (Sonoff)
- Firmware: 1.0.8 / 20251127
- Zigbee2MQTT version: current
- detach_relay_mode: false
- external_trigger_mode: following(off)
MQTT evidence
PIR triggered (correct):
{"action":"on", "state":"ON", "detach_relay_mode":false, ...}
Relay switched externally by HA (should NOT produce action event):
{"action":"on", "state":"ON", "detach_relay_mode":false, ...}
Both messages are identical — no way to distinguish them.
Description
When using the ZBMINIR2 with an external switch/PIR on the S2 input, the device
reports
action: onandaction: offboth when:This makes it impossible to distinguish a real physical S2 event from a
software-triggered relay change.
Problem in practice
When building automations where multiple ZBMINIR2 devices trigger each other
(e.g. path lighting where any PIR should activate all lights), switching one
device via Home Assistant causes all other devices to also report
action: on— even though their S2/PIR input was never triggered.
Expected behavior
S2 input events and relay state changes should be reported as separate action
types, for example:
action: s2_on/action: s2_offfor real S2 input eventsaction: relay_on/action: relay_offfor software-triggered changesOr alternatively, relay state changes triggered externally should not generate
an
actionevent at all.Device info
MQTT evidence
PIR triggered (correct):
{"action":"on", "state":"ON", "detach_relay_mode":false, ...}
Relay switched externally by HA (should NOT produce action event):
{"action":"on", "state":"ON", "detach_relay_mode":false, ...}
Both messages are identical — no way to distinguish them.