Zwave2mqtt - Honeywell Dimmer 39458

I’m trying to get a this ZWave dimmer working with zwave2mqtt without much success. https://products.z-wavealliance.org/products/3751?selectedFrequencyId=2

I have it discovered, publishing, etc but I’ve tried about every template to get it working consistently. Basically, I’m struggling to even get it to work as a basic switch (no dimming) because the values are all over the place. Here’s what i have:

  - platform: mqtt
    name: "Office Test Light"
    state_topic: 'homeassistant/OfficeLight/38/1/0'
    state_value_template: "{% if (value_json.value | int) == 0 %} 0 {% else %} 99 {% endif %}"
    command_topic: 'homeassistant/OfficeLight/38/1/0/set'
    payload_on: 99 
    payload_off: 0

Just trying this as a basic switch, no dimming. Here’s where it gets interesting. If I turn the switch on, it turns on, no issues and HA shows it’s on. If I turn it off, the light turns off but the value changes to like 97 or 94, sometimes 96 (watching in MQTT explorer) so HA thinks the switch is on. I have tried “0”, ‘0’, off, “off”, false, etc doesn’t matter. If I send the payload of 0 again, it changes the value to 0 and HA shows the state as off.

Does anyone have any suggestions? At this point, I’d be happy just to get a simple on/off switch working with HA showing the proper states. Otherwise, I may just have to re-link it with Smarrtthings.

Thanks!

I’m not sure if you ever got this fully working, but I have a couple of these and was able to figure out a semi-working configuration. The only thing I haven’t figured out is why they show up as selections with a power symbol, rather than a sliding toggle in the UI, and the feedback to home assistant does not seem to work properly when activated from another source. I’ve tried adding a state_topic in place of, or in addition to the brightness_state_topic, but that does not seem to function correctly either. Try this:

  - platform: mqtt
    name: "Office Test Light"
    command_topic: 'homeassistant/OfficeLight/38/1/0/set'
    brightness_state_topic: 'homeassistant/OfficeLight/38/1/0'
    brightness_command_topic: 'homeassistant/OfficeLight/38/1/0/set'
    on_command_type: 'brightness'
    payload_off: 0
    brightness_scale: 99

I guess the easiest way to get these integrated is to set up zwave2mqtt for Hass discovery and then they seem to work perfectly.

It looks like you can still pass a single value to them in MQTT to set the brightness elsewhere (i.e. Node-Red), even though home assistant and zwave2mqtt have to be set up with the entire zwave value object or a json time value object.

Sorry I didn’t update this, but I did eventually get this working. I was using Hass discovery but tried to do things manually so I could better control the templates while I was testing. What I did to get it working was enabled “verify changes” under the gateway for that level value on those specific devices. Once I did that, it properly changed levels, turned on/off etc. Using the default hass discovery template for dimmers in zwave2mqtt worked as well.