Skip to content

Update brightness reporting and add Zigbee2MQTT 2.x brightness converter support#36

Open
cachamber wants to merge 3 commits into
StuckAtPrototype:devfrom
cachamber:publish_brightness
Open

Update brightness reporting and add Zigbee2MQTT 2.x brightness converter support#36
cachamber wants to merge 3 commits into
StuckAtPrototype:devfrom
cachamber:publish_brightness

Conversation

@cachamber
Copy link
Copy Markdown

Fix #35

  1. Brightness transmit/receive from Z2M
    Problem: Converter missing brightness functionality
    Fix: Add brightness functionality for HA

  2. Keep brightness values in sync with HomeAssistant
    Problem: Noticed that I had firmware restarts with 1.4.2 firmware where HA setting would get out of sync with the AirCube, or if I changed the default brightness level via the hardware button.
    My use case is default brightness at 0% for bedroom during the night, then HA sets the brightness to 100 during the day. Noticed during the day that the AirCube would be at 0%, and HA would still have the stale 100% value that it sent via automation.
    Fix: Updated behavior to send brightness level on startup - so HA would reflect the default startup value. Also sends the value to HA when the hardware brightness button is pressed.

Validated by compiling and installing locally.

I used the dev branch to pick up the latest Zigbee disconnect code thinking that it was related to my firmware restart issue.

denovich and others added 3 commits April 26, 2026 17:55
Z2M 2.x requires ES module format (.mjs) — the existing CommonJS
converter (aircube.js) fails to load silently (renamed to .invalid).

Two additional Z2M 2.x compatibility fixes in the new converter:
- Cluster ID must be a string ('64513') not a number (0xFC01),
  because Z2M 2.x compares unknown cluster names as strings
- Import paths use no .js extension per Z2M 2.x conventions

Also updates HOME_ASSISTANT.md to document both Z2M versions and
adds Z2M 2.x troubleshooting guidance.
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.

2 participants