Skip to content

Commit 2fa58bc

Browse files
neneonlineclaude
andcommitted
Z2M: fix action expose (e.presets.action, not e.action)
The action expose was written as `e.action(...)`, but zigbee-herdsman-converters exposes `action` only under `presets` — there is no top-level `e.action`. Z2M rejected the whole converter at load with "e.action is not a function" and renamed the file, dropping every custom device back to an auto-generated definition. (This is the multistate proposal's own bug: its committed converter was never regenerated, so the call was never exercised.) Verified by loading the generated converter against zigbee-herdsman-converters 26.85.0: 147 definitions build cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9a9005a commit 2fa58bc

3 files changed

Lines changed: 289 additions & 289 deletions

File tree

helper_scripts/templates/switch_custom.js.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ const definitions = [
535535
},
536536
}],
537537
toZigbee: [],
538-
exposes: [e.action({{ action_values | tojson }})],
538+
exposes: [e.presets.action({{ action_values | tojson }})],
539539
},
540540
{% endif %}
541541
{% for switchName in device.switchNames %}

0 commit comments

Comments
 (0)