Ask questions[bug] Dimmer won't turn off in Home Assisstant UI


Build/Run method

  • [x] Docker
  • [ ] PKG
  • [ ] Manually built (git clone - npm install - npm run build )

Zwave2Mqtt version: I don't know... latest tag from Docker as of 29 July 2020 at ~10pm PDT. Openzwave Version: 1.6.1210

(I couldn't find a version for Zwave2Mqtt... might be nice to have one in the app somewhere like Openzwave's version is. Well, it is 2am and I've been at Smart Home frustrations for the last 8 hours, so maybe it was in plain sight and I missed it!)

Describe the bug

If the light is on at say 48 brightness, when I turn off the light in Home Assistant, I sometimes get this (which is expected):

(This is from logs dumping my MQTT messages for debugging. zwave is my prefix.)

2020-07-30T08:27:38.593049351Z [Debug] zwave/office_lights/38/1/0/set = 0
2020-07-30T08:27:39.435080555Z [Debug] zwave/office_lights/38/1/0 = {"time":1596097659434,"value":0}

It works fine when this happens.

But more often than not, this is what happens:

2020-07-30T08:27:52.001829759Z [Debug] zwave/office_lights/38/1/0/set = 0
2020-07-30T08:27:52.065765754Z [Debug] zwave/office_lights/38/1/0 = {"time":1596097672064,"value":48}

(Notice the timestamps: it usually updates the state before it's even started to turn off, which becuase the dimmers I have (HomeSeer WD-100+) transition to off.)

That causes Home Assistant to show the light as on, even tho the lights are off, and I have to toggle them off and then back on again to actually turn them on.

This is what it looks like in the UI:

Dimmer Issue

Note that the lights are on in the office at the start of the video, and they are off at the end, even tho the toggle shows they are on. Also note that the toggle stays off for a second or two. I'm pretty sure this is a feature of Home Assistant. That it tries to show that it was turned off, but then waits a second to show that it got the state update that it's actually still on (which that part in this case is incorrect behavior).

(I just realized cuz the gif loops, it can be hard to know when it starts... it starts when the mouse comes up from beneath the frame and ends when the mouse goes off the right side.)

To Reproduce Steps to reproduce the behavior:

  1. Add a dimmer that transitions to target brightness (e.g. HomeSeer WD-100+).
  2. Add it to Home Assistant via MQTT discovery.
  3. Turn the light on in Home Assistant. Turn it off, then on. Next time you turn it off, you should trigger this issue.

Expected behavior Home Assistant should show that the light is off.

Actual behavior Home Assistant shows that the light is on, even tho the light is actually off.


Answer questions CWSpear

I can see from other comments, you don't use Home Assistant. It seems like this may be an issue when Zwave2Mqtt specifically, tho, in that it is sending the update of its level too soon instead of waiting until it reached it's destination or something alone those lines...

If I turn it on, I don't get the update of the brightness value until after it's reached the target value a second or so later:

2020-07-30T16:47:58.987264351Z [Debug] zwave/office_lights/38/1/0/set = 255
2020-07-30T16:48:00.530956434Z [Debug] zwave/office_lights/38/1/0 = {"time":1596127680530,"value":48}

I event sometimes get multiple updates, but the last one is always the end value:

[Debug] zwave/office_lights/38/1/0/set = 255
[Debug] zwave/office_lights/38/1/0 = {"time":1596129476451,"value":13}
[Debug] zwave/office_lights/38/1/0 = {"time":1596129477519,"value":48}

Contrast that with when I turn it off, it reports it's state immediately after getting the call to change it to zero, even tho the light hasn't had time to actually change, and I never get an update for the final value (0).

(I assume just turning it out has it call it with 255, but it does set it to 48, which was the previous brightness I had. Not sure what that's about.)

Github User Rank List