"On with timed off" for multi-gang switches, any success?

Has anyone successfully used a multi-rocker / multi-gang zigbee switch with “on with timed off” feature?

In zigbee2mqtt’s documentation (like this ), the feature should be used by publishing messages like {"state" : "ON", "on_time": 300}. However, multi-rocker switches require the state key to be state_top, state_left, etc.

I have tried these methods, and none were successful:

  • Publishing {"state_top" : "ON", "on_time": 300} to zigbee2mqtt/FRIENDLY_NAME/set results in an error message: “z2m: No converter available for ‘on_time’ on ‘FRIENDLY_NAME’: (300)”.
  • Publishing {"state" : "ON", "on_time": 300} to zigbee2mqtt/FRIENDLY_NAME/top/set has no effect at all. The switch does not turn on.

Has anyone had any success?

Best to assume it doesn’t work. That feature is listed on every switch & light in Z2M, and the way I read the wording is - it might work, or it might not:

“When setting the state to ON, it might be possible to specify an automatic shutoff after a certain amount of time.”
and
“Support depends on the switch firmware”

Just to rule it out, can you try to specify a shorter period and also sent off_wait_time?

{"state" : "ON", "on_time": 30, "off_wait_time": 60}

With my switch, adding “off_wait_time” doesn’t change anything: when published to zigbee2mqtt/FRIENDLY_NAME/set it just creates an additional error message “No converter available for 'off_wait_time’”, and publishing to zigbee2mqtt/FRIENDLY_NAME/top/set it still does nothing (does not turn on immediately, does not turn on after “on_time” seconds passed, etc.)

At this stage I’m just curious what’s the correct way to invoke the feature on multi-gang switches, or even if it’s implemented for multi-gang switches in zigbee2mqtt to begin with.

Like I said, it might not be supported at all by your switch (and most other devices).

Power_on_behavior used to be treated in the same manner in the past. Most devices had it listed as supported, but people started noticing it didn’t actually work for their devices and started raising issues on GitHub.
The devices for which issues were raised had power_on_behavior removed, but there are still quite a few which have it listed despite it not working.