When deactivating all modes, only reactivate the "stay on" mode, not all of them. #3
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.
8th bit was too much, there are only 7 modes.
Otherwise the bit for the "stay on" mode is ignored when sending and all modes are deactivated. As a result, when receiving in the
transformModeFromHex
,0000000
is turned into1111111
, which reactivates all modes. This fix ensures that when all modes are deactivated, only the "stay on" mode is reactivated (as it was probably intended). The check intransformModeFromHex
for0000000
could even be removed, as the device no longer responds with0
.Tested with a 24m string of lights with 240 LEDs, similar to the one in img2.jpeg
Bluetooth name:
LED-4-02-00000000
By the way: thanks for this great Home Assistant integration!