Update brightness reporting and add Zigbee2MQTT 2.x brightness converter support#36
Open
cachamber wants to merge 3 commits into
Open
Update brightness reporting and add Zigbee2MQTT 2.x brightness converter support#36cachamber wants to merge 3 commits into
cachamber wants to merge 3 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #35
Brightness transmit/receive from Z2M
Problem: Converter missing brightness functionality
Fix: Add brightness functionality for HA
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.