Skip to content

Shelly: Expose switch inputs and input mode configuration for Gen4 1/1PM/1PM Mini/2PM - #12059

Merged
Koenkk merged 1 commit into
Koenkk:masterfrom
SebiGo:feat/shelly-switch-inputs
Apr 30, 2026
Merged

Shelly: Expose switch inputs and input mode configuration for Gen4 1/1PM/1PM Mini/2PM#12059
Koenkk merged 1 commit into
Koenkk:masterfrom
SebiGo:feat/shelly-switch-inputs

Conversation

@SebiGo

@SebiGo SebiGo commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

The external converter for the Shelly 1 Mini Gen4 has been tested by @Chicchi7393 in #12011 .

I assume the 1PM and 1PM Mini expose the same endpoint and behave identically, but this is untested as I haven't received the 2.0.0-beta1 firmware on my devices yet.

I also included an RPC-based converter for configuring non-standard switch input modes (follow, flip, detached, cycle, activation) as well as ZCL-based switch_type configuration (toggle/momentary via genOnOffSwitchCfg). Both apply to the 1 Mini, 1PM Mini, 1PM Gen4, and 2PM Gen4.

@Koenkk
Koenkk merged commit c781a3d into Koenkk:master Apr 30, 2026
3 checks passed
@Koenkk

Koenkk commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Thanks!

@KroFR

KroFR commented May 1, 2026

Copy link
Copy Markdown

The external converter for the Shelly 1 Mini Gen4 has been tested by @Chicchi7393 in #12011 .

I assume the 1PM and 1PM Mini expose the same endpoint and behave identically, but this is untested as I haven't received the 2.0.0-beta1 firmware on my devices yet.

I also included an RPC-based converter for configuring non-standard switch input modes (follow, flip, detached, cycle, activation) as well as ZCL-based switch_type configuration (toggle/momentary via genOnOffSwitchCfg). Both apply to the 1 Mini, 1PM Mini, 1PM Gen4, and 2PM Gen4.

Hello @SebiGo,

I have Shelly 1 Gen4, Shelly 1 PM & Shelly 1PM Mini at home running version 2.0.0beta1 and Z2M 2.10.0
Detached switch mode is enabled, and I see (or don't see) different behaviors.

Shelly 1PM Gen4:
Nothing new is exposed.
Device states in Z2M shows:

{
    "ac_frequency": null,
    "current": null,
    "dhcp_enabled": null,
    "energy": null,
    "ip_address": null,
    "linkquality": 200,
    "power": null,
    "produced_energy": null,
    "state": "OFF",
    "voltage": null,
    "wifi_config": null,
    "wifi_status": null,
    "action": "off"
}

Shelly 1PM Mini Gen4:
I see new configuration options but no Input sensor.
The switch type looks off. Should this be a button or a switch?
image

Switch Mode is not ok. Value is Null and Title should be: Toggle, Momentary, Edge, Detached, Activation
image

Device states in Z2M shows:

{
    "ac_frequency": 50.01,
    "current": 0,
    "dhcp_enabled": true,
    "energy": 0.63,
    "ip_address": "x.x.x.x",
    "linkquality": 156,
    "power": 0,
    "produced_energy": 0,
    "state": "OFF",
    "voltage": 240.36,
    "wifi_config": {
        "enabled": true,
        "ssid": "xxx"
    },
    "wifi_status": "got ip",
    "action": "off",
    "switch_mode_sw1": null,
    "switch_type_sw1": "toggle",
    "update": {
        "installed_version": 33554465,
        "latest_release_notes": null,
        "latest_source": null,
        "latest_version": 33554465,
        "state": "idle"
    }
}

Shelly 1 Gen4:
Nothing new is exposed.
Device states in Z2M shows:

{
    "dhcp_enabled": true,
    "ip_address": "x.x.x.x",
    "linkquality": 152,
    "state": "OFF",
    "wifi_config": {
        "enabled": true,
        "ssid": "xxx"
    },
    "wifi_status": "got ip",
    "action": "off"
}

I tried to reconfigure each device but no changes.
I happy to help to troubleshoot if needed.

@SebiGo

SebiGo commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Hello @KroFR

Thank you for your feedback. As stated, I have not been offered the 2.0.0.-beta1 on my 1PM & 1PMmini yet - hence I have to rely on your input :)

Two things I'd like to investigate:

Missing input exposes on 1/1PM Gen4: I only had the 1 Mini Gen4 to test against, so the endpoint map for the non-Mini variants is likely off. Could you post a screenshot of the Z2M Clusters tab for both Shelly 1 Gen4 and Shelly 1PM Gen4? I'm specifically looking for any endpoint beyond 1 and 239 that has genOnOffSwitchCfg as input cluster — that's where the switch input lives.

switch_mode_sw1 is null on 1PM Mini: that's odd because switch_type_sw1 reads correctly. Can you set Z2M log_level to debug, trigger a refresh of switch_mode_sw1, and share the raw RPC response from the log? Alternatively, what does curl http:///rpc/Switch.GetConfig?id=0 return when the device is in WiFi mode? I want to see if the firmware's mode field is named or formatted differently than I assumed.

Will open a follow-up PR once we have that info.

@KroFR

KroFR commented May 1, 2026

Copy link
Copy Markdown

Here you fo @SebiGo

Shelly 1PM Gen4:
image

Shelly 1 Gen4: Looks like firmware 2.0.0beta1 does not expose Input mode on this one
image

For the logs, i will submit as soon as possible. I can't right now

@KroFR

KroFR commented May 1, 2026

Copy link
Copy Markdown

I did a full interview of the device because there is no refresh button for switch_mode_sw1

[5/1/2026, 11:50:53 PM] z2m: Successfully interviewed 'Chambre - Nell - Lumière' [5/1/2026, 11:50:53 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/interview', payload '{"data":{"id":"0xe4b063fffe672d18"},"status":"ok","transaction":"h5hha-1"}' [5/1/2026, 11:50:53 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":{"description":"1PM Mini Gen 4","exposes":[{"access":7,"category":"config","description":"Switch input type","endpoint":"sw1","label":"Switch type","name":"switch_type","property":"switch_type_sw1","type":"enum","values":["toggle","momentary"]},{"features":[{"access":7,"description":"On/off state of the switch","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":5,"description":"Instantaneous measured power","label":"Power","name":"power","property":"power","type":"numeric","unit":"W"},{"access":5,"description":"Measured electrical potential value","label":"Voltage","name":"voltage","property":"voltage","type":"numeric","unit":"V"},{"access":5,"description":"Measured electrical AC frequency","label":"AC frequency","name":"ac_frequency","property":"ac_frequency","type":"numeric","unit":"Hz"},{"access":5,"description":"Instantaneous measured electrical current","label":"Current","name":"current","property":"current","type":"numeric","unit":"A"},{"access":5,"description":"Sum of consumed energy","label":"Energy","name":"energy","property":"energy","type":"numeric","unit":"kWh"},{"access":5,"description":"Sum of produced energy","label":"Produced energy","name":"produced_energy","property":"produced_energy","type":"numeric","unit":"kWh"},{"access":3,"category":"config","description":"Switch input mode","endpoint":"sw1","label":"Switch mode","name":"switch_mode","property":"switch_mode_sw1","type":"enum","values":["follow","flip","detached","cycle","activation"]},{"access":5,"category":"diagnostic","description":"Current connection status","label":"Wi-Fi status","name":"wifi_status","property":"wifi_status","type":"text"},{"access":5,"category":"diagnostic","description":"IP address currently assigned to the device","label":"IP address","name":"ip_address","property":"ip_address","type":"text"},{"access":5,"category":"diagnostic","description":"Indicates whether DHCP is used to automatically assign network settings","label":"DHCP enabled","name":"dhcp_enabled","property":"dhcp_enabled","type":"binary","value_off":false,"value_on":true},{"access":7,"category":"config","features":[{"access":3,"description":"Enable/disable Wi-Fi connectivity","label":"Wi-Fi enabled","name":"enabled","property":"enabled","type":"binary","value_off":false,"value_on":true},{"access":3,"description":"Name (SSID) of the Wi-Fi network to connect to","label":"Network","name":"ssid","property":"ssid","type":"text"},{"access":2,"description":"Password for the selected Wi-Fi network","label":"Password","name":"password","property":"password","type":"text"},{"access":3,"description":"Manually assigned IP address (used when DHCP is disabled)","label":"IPv4 address","name":"static_ip","property":"static_ip","type":"text"},{"access":3,"description":"Subnet mask for the static IP configuration","label":"Network mask","name":"net_mask","property":"net_mask","type":"text"},{"access":3,"description":"Default gateway address for static IP configuration","label":"Gateway","name":"gateway","property":"gateway","type":"text"},{"access":3,"description":"Name server address for static IP configuration","label":"DNS","name":"name_server","property":"name_server","type":"text"}],"label":"Wi-Fi Configuration","name":"wifi_config","property":"wifi_config","type":"composite"},{"access":1,"category":"diagnostic","description":"Triggered action (e.g. a button click)","label":"Action","name":"action","property":"action","type":"enum","values":["input_1_on","input_1_off","input_1_toggle","input_1_hold"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"S4SW-001P8EU","options":[{"access":2,"description":"Calibrates the power value (percentual offset), takes into effect on next report of device.","label":"Power calibration","name":"power_calibration","property":"power_calibration","type":"numeric","value_step":0.1},{"access":2,"description":"Number of digits after decimal point for power, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Power precision","name":"power_precision","property":"power_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the voltage value (percentual offset), takes into effect on next report of device.","label":"Voltage calibration","name":"voltage_calibration","property":"voltage_calibration","type":"numeric","value_step":0.1},{"access":2,"description":"Number of digits after decimal point for voltage, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Voltage precision","name":"voltage_precision","property":"voltage_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the ac_frequency value (absolute offset), takes into effect on next report of device.","label":"Ac frequency calibration","name":"ac_frequency_calibration","property":"ac_frequency_calibration","type":"numeric","value_step":0.1},{"access":2,"description":"Number of digits after decimal point for ac_frequency, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Ac frequency precision","name":"ac_frequency_precision","property":"ac_frequency_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the current value (percentual offset), takes into effect on next report of device.","label":"Current calibration","name":"current_calibration","property":"current_calibration","type":"numeric","value_step":0.1},{"access":2,"description":"Number of digits after decimal point for current, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Current precision","name":"current_precision","property":"current_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"Calibrates the energy value (percentual offset), takes into effect on next report of device.","label":"Energy calibration","name":"energy_calibration","property":"energy_calibration","type":"numeric","value_step":0.1},{"access":2,"description":"Number of digits after decimal point for energy, takes into effect on next report of device. This option can only decrease the precision, not increase it.","label":"Energy precision","name":"energy_precision","property":"energy_precision","type":"numeric","value_max":3,"value_min":0},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"source":"native","supports_ota":true,"vendor":"Shelly","version":"0.0.0"},"friendly_name":"Chambre - Nell - Lumière","ieee_address":"0xe4b063fffe672d18","status":"successful","supported":true},"type":"device_interview"}'

curl http:///rpc/Switch.GetConfig?id=0 result:
{"id":0, "name":null,"in_mode":"detached","in_locked":false,"initial_state":"restore_last", "auto_on":false, "auto_on_delay":60.00, "auto_off":false, "auto_off_delay":60.00,"power_limit":2240,"voltage_limit":280,"autorecover_voltage_errors":false,"current_limit":8.000,"reverse":false,"counts":{"enable":true,"power_thr":100}}

@N3rdix

N3rdix commented May 2, 2026

Copy link
Copy Markdown
Contributor

Same issue on my side, switch mode is not readable/writable, no refresh button.

@Mosher23

Mosher23 commented May 2, 2026

Copy link
Copy Markdown

Same here!

Worth to mention that the new input entity is not appear as MQTT entity in HA.

@lexbrugman

Copy link
Copy Markdown

Looking at the changes an input is not expected, it’s exposed as an event action

@KroFR

KroFR commented May 2, 2026

Copy link
Copy Markdown

curl http:///rpc/Switch.GetConfig?id=0 result: {"id":0, "name":null,"in_mode":"detached","in_locked":false,"initial_state":"restore_last", "auto_on":false, "auto_on_delay":60.00, "auto_off":false, "auto_off_delay":60.00,"power_limit":2240,"voltage_limit":280,"autorecover_voltage_errors":false,"current_limit":8.000,"reverse":false,"counts":{"enable":true,"power_thr":100}}

Added curl http:///rpc/Switch.GetConfig?id=0 result to previous logs for 1PM Mini.

@lexbrugman

Copy link
Copy Markdown

Looking at the changes an input is not expected, it’s exposed as an event action

Which for me works (shows under exposes in z2m):
shelly-input-action

@lexbrugman

lexbrugman commented May 2, 2026

Copy link
Copy Markdown

Shelly 1 Gen4: Looks like firmware 2.0.0beta1 does not expose Input mode on this one image

That's odd, for me there is an extra endpoint on a Shelly 1 Gen4:
shelly-1-gen4-normal

And here the same Shelly 1 Gen4 with a sensor (plus) add-on and one digital input added:
shelly-1-gen4-plus-addon-digital-input
(which sounds like they are now also exposing sensor add-on data through zigbee 🎉)

@Mosher23

Mosher23 commented May 2, 2026

Copy link
Copy Markdown

Looking at the changes an input is not expected, it’s exposed as an event action

Which for me works (shows under exposes in z2m):

shelly-input-action

I see new "Action" entity in Z2M too, but its not changing its state on switch actuation.
Also "Action" doesn't show up in MQTT in HA so no Automations can be coupled to it.

@lexbrugman

lexbrugman commented May 2, 2026

Copy link
Copy Markdown

I see new "Action" entity in Z2M too, but its not changing its state on switch actuation. Also "Action" doesn't show up in MQTT in HA so no Automations can be coupled to it.

I need to be in that screen while changing the input, and the input needs to be detached. It’s not a state it’s an event (transient), so it won’t be stored as state.

Haven’t done myself since I have no need for it, but for action events to show in home assistant I think some setup is needed (not sure how up to date that is)

@SebiGo

SebiGo commented May 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks everyone for the testing and feedback while I've been out in the mountains. Thanks @lexbrugman for your explanations.

@KroFR — Shelly 1PM Mini Gen4
The action is exposed correctly here — your interview output confirms it: Action with values input_1_on/off/toggle/hold. The "action": "off" in the device state is just the default before any event has fired. Action is an event, not a state, so it has no current value, no refresh button, and isn't writable — it only emits when the physical input is actually triggered (and the input has to be in detached mode). That part is working as designed.

The switch_mode_sw1: null is more interesting though — your curl shows the firmware correctly returns "in_mode":"detached", so the RPC side is fine. Looks like the converter isn't reading it on initial interview. I'll look into it.

@KroFR — Shelly 1 Gen4
Are you sure that device is really on 2.0.0-beta1? @lexbrugman's screenshot of a 1 Gen4 on that firmware shows the extra endpoint with the input cluster, so the converter mapping clearly works on his side. Could you double-check via curl http://<device-ip>/rpc/Shelly.GetDeviceInfo? Might also be worth re-pairing the device after the firmware update — sometimes the endpoint changes don't get picked up otherwise.

@N3rdix
If you mean the Action expose: that's by design — event, not a state, so no refresh/write. If you actually mean switch_mode_sw1, see above.

@Mosher23 — getting the action into HA
That's expected: action events don't show up as MQTT entities, only as device triggers. In an Automation: Add trigger → Device, pick the Shelly, and you'll get the available actions. YAML:

- domain: mqtt
  device_id: <your-device-id>
  type: action
  subtype: input_1_off
  trigger: device

Valid subtypes: input_1_on, input_1_off, input_1_toggle, input_1_hold. There's also a community guide on Z2M 2.0 action events in HA: https://community.home-assistant.io/t/using-the-new-action-events-in-zigbee2mqtt-2-0/821709

@Cemaver

Cemaver commented May 4, 2026

Copy link
Copy Markdown

@SebiGo:

@KroFR — Shelly 1 Gen4 Are you sure that device is really on 2.0.0-beta1? @lexbrugman's screenshot of a 1 Gen4 on that firmware shows the extra endpoint with the input cluster, so the converter mapping clearly works on his side. Could you double-check via curl http://<device-ip>/rpc/Shelly.GetDeviceInfo? Might also be worth re-pairing the device after the firmware update — sometimes the endpoint changes don't get picked up otherwise.

My Shelly 1 Gen 4 returns:
{"name":null,"id":"shelly1g4-48f6eec807cc","mac":"48F6EEC807CC","slot":1,"model":"S4SW-001X16EU","gen":4,"fw_id":"20260423-102600/2.0.0-beta1-g8c7700a","ver":"2.0.0-beta1","app":"S1G4ZB","auth_en":false,"auth_domain":null,"provision":"complete","enhanced_security":false}

Ive re-paired the device after the down- and upgrade.
Also no "Action".

@SebiGo

SebiGo commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

@KroFR & @Cemaver the issue with Shelly1 Gen4 should be fixed with #12096.

I would appreciate if you could test this before I remove the draft status. Would you mind testing this custom converter and provide feedback here?
shelly1gen4firmware2.js

Unfortunately, I still haven't been offered 2.0.0-beta1 on my Shelly 1 (Mini/PM) Gen4 devices.

@KroFR

KroFR commented May 4, 2026

Copy link
Copy Markdown

@KroFR — Shelly 1PM Mini Gen4 The action is exposed correctly here — your interview output confirms it: Action with values input_1_on/off/toggle/hold. The "action": "off" in the device state is just the default before any event has fired. Action is an event, not a state, so it has no current value, no refresh button, and isn't writable — it only emits when the physical input is actually triggered (and the input has to be in detached mode). That part is working as designed.

Ok, that could explain why it doesn’t show up on my test device (1PM Gen4).
I expected the Input sensor to be exposed regardless of whether it’s triggered or not, similar to how it works in Wi‑Fi mode.

image

@KroFR — Shelly 1 Gen4 Are you sure that device is really on 2.0.0-beta1? @lexbrugman's screenshot of a 1 Gen4 on that firmware shows the extra endpoint with the input cluster, so the converter mapping clearly works on his side. Could you double-check via curl http://<device-ip>/rpc/Shelly.GetDeviceInfo? Might also be worth re-pairing the device after the firmware update — sometimes the endpoint changes don't get picked up otherwise.

Yes, it's upgraded to version 2.0.0beta1

curl http:///rpc/Shelly.GetDeviceInfo
{"name":null,"id":"shelly1g4-a085e3c48144","mac":"A085E3C48144","slot":1,"model":"S4SW-001X16EU","gen":4,"fw_id":"20260423-102600/2.0.0-beta1-g8c7700a","ver":"2.0.0-beta1","app":"S1G4ZB","auth_en":false,"auth_domain":null,"provision":"complete","enhanced_security":false}

@Cemaver

Cemaver commented May 4, 2026

Copy link
Copy Markdown

@SebiGo:
Looks way better for me:
Unbenannt

{
"linkquality": 255,
"state": "OFF",
"switch_mode_sw1": null,
"switch_type_sw1": "toggle",
"action": "off"
}

But "switch mode" does not work.
It does not show the detached mode im running at, also it does not change anything if i click another type.

Edit: if i trigger the SW the Action becomes N/A
In the HassIO Automations the Shelly has now some new triggers:
Unbenannt
Only input_1_off action seems to work (very long reaction time).

@KroFR

KroFR commented May 4, 2026

Copy link
Copy Markdown

I may need some help to enable the converter.

I loaded the external converter and restarted Z2M
image

But the device does not seem to load it. Did I miss something ?
image

@Cemaver

Cemaver commented May 4, 2026

Copy link
Copy Markdown

@KroFR

\\HASSIO\config\zigbee2mqtt\external_converter\

place shelly1gen4firmware.js here and restart Z2M

@KroFR

KroFR commented May 4, 2026

Copy link
Copy Markdown

Thanks @Cemaver

@SebiGo I now see the this on the Shelly 1 Gen4:
image

State

{
    "dhcp_enabled": true,
    "ip_address": "xxx",
    "linkquality": 128,
    "state": "OFF",
    "wifi_config": {
        "enabled": true,
        "ssid": "xxx"
    },
    "wifi_status": "got ip",
    "switch_mode_sw1": null,
    "switch_type_sw1": "toggle",
    "action": "off"
}

curl http:///rpc/Switch.GetConfig?id=0
{"id":0, "name":null,"in_mode":"detached","in_locked":false,"initial_state":"restore_last", "auto_on":false, "auto_on_delay":60.00, "auto_off":true, "auto_off_delay":0.50,"counts":{"enable":true}}

If I trigger Switch Mode refresh:

[5/4/2026, 12:53:57 PM] frontend:api: Sending {"topic":"0xa085e3fffec48144/get","payload":{"switch_mode_sw1":""}}
[5/4/2026, 12:53:57 PM] z2m: Publish 'get' 'switch_mode' to 'Jardin - Parking - Portail' failed: 'Error: Status 'UNSUPPORTED_CLUSTER' shellyRPCCluster'

@SebiGo

SebiGo commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @KroFR and @Cemaver, I will proceed with the PR #12096
I'm afraid there is an issue with the 'switch_mode' , and "switch_type" in 2.0.0-beta1. I couldn't get to work it on my 2PM gen4 either. My assumption is a missing or broken implementation. As a workaround for now, use the web ui. I assume that these values usually get set once.
Maybe with a stable firmware release this will be possible with or without a new PR.

@KroFR

KroFR commented May 4, 2026

Copy link
Copy Markdown

Thanks @SebiGo. Let's follow up after next release.

@Mosher23

Mosher23 commented May 5, 2026

Copy link
Copy Markdown

I have tried attached above external converter and it doesn't change anything for 1pm mini.
Screenshot 2026-05-05 at 10 39 15
Screenshot 2026-05-05 at 10 39 54
Screenshot 2026-05-05 at 10 40 09

@KroFR

KroFR commented May 5, 2026

Copy link
Copy Markdown

I have tried attached above external converter and it doesn't change anything for 1pm mini. >

External converter shelly1gen4firmware2.js is for Shelly 1 Gen4 only.

For Shelly 1PM mini, you need to upgrade Z2M to version 2.10.0 AND to upgrade 1PM mini firmware to version 2.0.0beta1.
Unless you want to test, I do not recommend doing it yet.
image

@Mosher23

Mosher23 commented May 5, 2026

Copy link
Copy Markdown

I am on Z2M 2.10 and Shelly is on 2.0.0 Beta 1

@KroFR

KroFR commented May 5, 2026

Copy link
Copy Markdown

I am on Z2M 2.10 and Shelly is on 2.0.0 Beta 1

You can click on Reconfigure and check if you can see the changes.
image

Otherwise, you may need to delete and to allow the device to join again.

@KroFR

KroFR commented May 5, 2026

Copy link
Copy Markdown

I am on Z2M 2.10 and Shelly is on 2.0.0 Beta 1

Actually, I can see the changes on your screenshot. Switch Type & Switch Mode are there already.
That's it for now with beta1

@Mosher23

Mosher23 commented May 8, 2026

Copy link
Copy Markdown

#12096 As mentioned here for me update doesn't improve anything.

@Chicchi7393

Copy link
Copy Markdown

Hi!
I just updated z2m to the latest version, and to finally migrate my shelly to zigbee, but i just saw that, while in detached mode, the action field gets updated with quite a delay, around half a second...
Am i the only one encountering this or is it already known? Thank you!

@Mosher23

Copy link
Copy Markdown

I have 4x Gen4 1PM minis and 1x Gen4 1PM. All on the 2.0.0beta1.
None of them reflect current Switch type and Switch mode setting. I also cannot set them in Z2M.
Action field shows permanent N/A.

I tried reconfiguring them multiple times, nothing helps.

Does anyone have an idea on whats happening with my setup?

@TheAndi

TheAndi commented Jun 16, 2026

Copy link
Copy Markdown

@Mosher23 I had to do both: Re-Interview and Re-configure to make actions appear.
grafik
grafik

But I ran into a different problem:

I have a Shelly 1 Mini Gen4 (S4SW-001X8EU) on firmware 2.0.0-beta1 with Zigbee2MQTT 2.12.0.

With switch type set to "switch" (=toggle) in the shelly UI, normal input actions are published correctly:

payload '{"action":"input_1_toggle", ... "switch_type_sw1":"momentary", ...}'
topic 'zigbee2mqtt/Schalter Flur/action', payload 'input_1_toggle'

payload '{"action":"input_1_on", ... "switch_type_sw1":"momentary", ...}'
topic 'zigbee2mqtt/Schalter Flur/action', payload 'input_1_on'

payload '{"action":"input_1_off", ... "switch_type_sw1":"momentary", ...}'
topic 'zigbee2mqtt/Schalter Flur/action', payload 'input_1_off'

However, when I switch the shelly to "Button" (=momentary) the device sends genScenes.commandRecall with scene IDs 1, 2, 3, or 4, Zigbee2MQTT throws:

Exception while calling fromZigbee converter: Key '1' not found in: [5, 11]
Exception while calling fromZigbee converter: Key '2' not found in: [5, 11]
Exception while calling fromZigbee converter: Key '3' not found in: [5, 11]
Exception while calling fromZigbee converter: Key '4' not found in: [5, 11]

Current converter only maps scene IDs 5 and 11.

Furthermore, switch_type does not read correctly nor can be set:

z2m: Publish 'set' 'switch_type' to 'Schalter Flur' failed: 'Error: Status 'NOT_AUTHORIZED' switchType (0) is not writable'

@Koenkk as mentioned here shelly publishes sequence events via scene IDs. Is it possible to implement the scene IDs 1–4 to correctly show single/double/triple/long press as action? Like:

1 -> input_1_single
2 -> input_1_double
3 -> input_1_triple
4 -> input_1_hold

And should this be discussed here or in a separate issue?

Thanks a lot in advance!

@SebiGo

SebiGo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@TheAndi and @Mosher23 : See #12465

@TheAndi

TheAndi commented Jun 21, 2026

Copy link
Copy Markdown

@SebiGo Thanks a lot! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants