Version
Build/Run method
zwavejs2mqtt version: 1.0.0-rc.0
Describe the bug
Attempting to set the brightness of a standard (non-RGB) dimmer no longer will go to 100%.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dimmer should dim to the value selected. Swapping out zwavejs2mqtt and keeping everything else the same (HA version, dimmer in question, MQTT settings, zwave-js version) yields a dim of 87%
Additional context
node_13.zip
Note that by math we figured out HA is sending 87/99 but the dimmer is acting on 87/255.
Ok So this is due to
https://github.com/zwave-js/zwavejs2mqtt/blob/master/lib/Gateway.js#L713
It has always been there, I know someone reported it as working for dimmers as they send values from 0-255 and dimmers get values 0-99. Now if you say it's not used I will remove it
@jcam Could you try with #290? It should fix 2 of your issues
Isn鈥檛 that calculation already done in the math of the command_on topic in the switch discovery? You鈥檙e doing that same math there.
"command_on_template": "{{ ((brightness / 255 * 99) | round(0)) if brightness is defined else 255 }}",
Isn鈥檛 that calculation already done in the math of the command_on topic in the switch discovery? You鈥檙e doing that same math there.
The question is, why it was working before :laughing:
@blhoward2 Please give that branch a try
@blhoward2 Please give that branch a try
@robertsLando I'm not on master because the basic set one is behind, so I haven't encountered the issue. @Jesse should test that PR.
@blhoward2 ok now it is, the PR about CC basic has been merged
I've tested with #290 , it fixes this issue, thanks! Testing the others now...
@blhoward2 ok now it is, the PR about CC basic has been merged
This also works fine for me, though I wasn't on master so I can't confirm that I was experiencing the problem to begin with...
Is there an easy way to pull this fix with docker compose? Or would it be easier to wait until is merged and pull it with the dev tag?
You can build it pretty easily with docker. Follow the directions at the bottom here to clone the zwave2jsmqtt repo so you have the dockerfile. https://github.com/zwave-js/zwavejs2mqtt/tree/master/docker
Then run the following from the folder above the repo:
DOCKER_BUILDKIT=1 docker build --build-arg SRC=git-clone-src --build-arg Z2M_BRANCH=fix-dimmers --build-arg ZWJ_BRANCH=master --no-cache -f zwavejs2mqtt/docker/Dockerfile.contrib -t zwavejs2mqtt .
Thanks @blhoward2, I'll give it a try.
Edit: that worked, thanks for pointing me on the right direction.
Resolved by #290