image not found img not found

LZW36 Fan/Dimmer Switch

I just got this device, and I have gotten it into Home Assistant. It Looks like it shows up as one Device, and 5 Entities - 1 zwave, 3 sensors, and 1 light.

  • Inovelli LZW36 Fan/Light Dimmer
  • Inovelli LZW36 Fan/Light Dimmer Energy
  • Inovelli LZW36 Fan/Light Dimmer Level
  • Inovelli LZW36 Fan/Light Dimmer Power
  • Inovelli LZW36 Fan/Light Dimmer Previous Reading

Anyway, I am not thrilled with the single light entity. It’s not dim-able, and it looks like it controls the entire switch (both fan and light), not individual dimmers. It should probably be a “Switch”, not a “Light”.

I am missing the expected Dimmers or Levels.

Maybe I am missing something? I pulled the latest Inovelli OpenZwave files from here, copied the xml files into config/inovelli, and updated the manufacturer_specific.xml file. It shows up in Home Assistant as a lzw36 device with the right names and capabilities, and I can update the device, so I am confident I added it correctly. It just doesn’t have the interfaces I expect.

Help?

1 Like

This might be an issue with the version of Openzwave that HA uses. Since this switch is a single physical device with multiple endpoints, Openzwave should be splitting it up into 3 “instances.”

  • Instance 1 (endpoint 0, or no endpoint): controls both the light and the fan
  • Instance 2 (endpoint 1): controls the light
  • Instance 3 (endpoint 2): controls the fan

In your ozwcache_*.xml or zwcfg_*.xml file (dependong on which version of OZW you are running), there should be a section that looks like this for your device:

  <CommandClass id="38" name="COMMAND_CLASS_SWITCH_MULTILEVEL" version="4" request_flags="1" innif="true">
                <Instance index="1" />
                <Instance index="2" endpoint="1" />
                <Instance index="3" endpoint="2" />
                <Value type="byte" genre="user" instance="1" index="0" label="Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                <Value type="button" genre="user" instance="1" index="1" label="Bright" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="button" genre="user" instance="1" index="2" label="Dim" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="bool" genre="system" instance="1" index="3" label="Ignore Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
                <Value type="byte" genre="system" instance="1" index="4" label="Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                <Value type="byte" genre="user" instance="2" index="0" label="Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                <Value type="button" genre="user" instance="2" index="1" label="Bright" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="button" genre="user" instance="2" index="2" label="Dim" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="bool" genre="system" instance="2" index="3" label="Ignore Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
                <Value type="byte" genre="system" instance="2" index="4" label="Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                <Value type="byte" genre="user" instance="3" index="0" label="Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                <Value type="button" genre="user" instance="3" index="1" label="Bright" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="button" genre="user" instance="3" index="2" label="Dim" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
                <Value type="bool" genre="system" instance="3" index="3" label="Ignore Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
                <Value type="byte" genre="system" instance="3" index="4" label="Start Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
            </CommandClass>

If you are using OZW 1.6 (such as zwave2mqtt, or the beta version of zwave in HA), this should be automatic. I am not sure if OZW 1.4 (the default version in HA) properly recognizes all the instances. If you are using 1.4, you may need to manually edit your zwcfg_*.xml file.

You just need to uncomment command class 38 from the lzw36 config file and then add your device. Added to device specific instructions: https://www.home-assistant.io/docs/z-wave/device-specific/#inovelli-lightfan-combo-lzw36

1 Like

Yeah, currently using ozwave 1.4 with Home Assistant. I’m looking forward to using the new Z-Wave stuff, when it’s a little more stable/ready.

Regarding this device, the CommandClass 38 is commented out:

<!-- This shows the device names, but removes some other fields (increment/decrement, target level, etc)
  <CommandClass id="38">
    <Instance index="1" label="Fan/Light" />
    <Instance index="2" endpoint="1" label="Light" />
    <Instance index="3" endpoint="2" label="Fan" />
  </CommandClass>
  -->

Hmm it seems like state for entity 2 and 3 (light & fan) do not update when using the physical switches on the switch. Seems to only update from instance 1

Yup same issue here.
Also just got back home and family says it’s in breeze mode, not sure how I did that (or to undo it)

I came up with a temporary solution by calling the zwave refresh entity service anytime my fan/light entity changes this causes a z-wave update manually on the entity and forces a z-wave status update. If Inovelli has a better work around that would be appreciated.

Made the same config change for CommandClass 38 and re-added the switch, but i’m getting 3 devices with 3 light entities:

Device 1:

Device 2:

Device 3:

Is anyone else seeing this?

Yes, all show as a light. First is the light itself, second is the fan and third is both together.

For the fan you can divide the 255 max on the dimmer slider by 3 for a result of 85. So for speed 1-85 is low, 86-170 is medium and 171-255 is high. That’s how I have it sorted so far. A few scripts should make that an easy set of toggles from front end. Probably best to do a fan template for long term assuming this is how it’s going to work…

I found a fan template on the HA Community, seems to be working just fine
Dropped this in configuration.yaml, gave me a “fan.living_room_fan” entity with low, medium and high speeds.Link for orginal thread.

edit: updated to include speed “off”, useful for turning each speed setting into a switch template, using those on old but working HADashboard setup :wink:

fan:
  - platform: template
    fans:
      living_room_fan:
        friendly_name: "Living room fan"
        value_template: "{{ states('light.inovelli_lzw36_fan_light_dimmer_level_2') }}"
        speed_template: >
          {% set output = {0: 'off', 85: 'low', 170: 'medium', 255: 'high'} %}
          {% set idx = state_attr('light.inovelli_lzw36_fan_light_dimmer_level_2', 'brightness') %}
          {{ output[idx] }}
        turn_on:
          service: homeassistant.turn_on
          entity_id: light.inovelli_lzw36_fan_light_dimmer_level_2
        turn_off:
          service: homeassistant.turn_off
          entity_id: light.inovelli_lzw36_fan_light_dimmer_level_2
        set_speed:
          service: light.turn_on
          entity_id: light.inovelli_lzw36_fan_light_dimmer_level_2
          data_template:
            brightness: >
              {% set mapper = {'off' : 0, 'low': 85, 'medium': 170, 'high': 255} %}
              {{ mapper[speed] }}
        speeds:
          - 'off'
          - 'low'
          - 'medium'
          - 'high'
1 Like

The following added to my configuration.yaml helped a lot but isn’t quite perfect (edit, added polling intensity. No refresh on fan button, but light button does refresh on button press).

zwave:
  usb_path: /dev/ttyACM0
  config_path: /config/ozwconfig/config
  device_config:
    light.bedroom_overhead_light_dimmer_level:
      refresh_value: true
      polling_intensity: 1
    light.bedroom_overhead_fan_dimmer_level:
      refresh_value: true
      polling_intensity: 1

When I was looking into it previously, I remember coming across something saying there was some issues with the 700 series chip and OZW, but I’ve been unable to find that forum thread again, so that information may not be accurate.

No luck for me with the refresh_value set to true

I feel like I’m close to being able to like this and keep it. My original set of bulbs that have worked for other canopy modules were not working with this, they would go to a low dim when turned off. I swapped another set of bulbs in and that seems to have fixed it. Even with parameter 1 set to 0 the delay from wall switch can be a tad slow, it’s just the lack of immediate change that’s throwing it off. I could see someone thinking they didn’t press it firmly and doing a second press. Probably only an issue with company visiting, if at all.

Just need to get that entity status update in HA, do you think that 700 series issue is documented in the issues section of OZW on GitHub?

This is what I had to do to get my entities to always update. Its not pretty but seems to work

Explanation

Node Red Flow

[{“id”:“11bb60d1.3ced6f”,“type”:“comment”,“z”:“651c3ebc.4e08”,“name”:“Fix Fan/Light State”,“info”:"",“x”:290,“y”:2220,“wires”:[]},{“id”:“177532d8.a5ad5d”,“type”:“api-call-service”,“z”:“651c3ebc.4e08”,“name”:“Refresh Light”,“server”:“6c2daf11.fae89”,“version”:1,“debugenabled”:false,“service_domain”:“zwave”,“service”:“refresh_entity”,“entityId”:“light.inovelli_lzw36_fan_light_dimmer_level”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:870,“y”:2200,“wires”:[[]]},{“id”:“c6f46e4f.84d48”,“type”:“api-call-service”,“z”:“651c3ebc.4e08”,“name”:“Refresh Fan”,“server”:“6c2daf11.fae89”,“version”:1,“debugenabled”:false,“service_domain”:“zwave”,“service”:“refresh_entity”,“entityId”:“light.inovelli_lzw36_fan_light_dimmer_level_2”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:870,“y”:2300,“wires”:[[]]},{“id”:“65da22e2.16bc9c”,“type”:“delay”,“z”:“651c3ebc.4e08”,“name”:"",“pauseType”:“delay”,“timeout”:“1”,“timeoutUnits”:“seconds”,“rate”:“1”,“nbRateUnits”:“1”,“rateUnits”:“second”,“randomFirst”:“1”,“randomLast”:“5”,“randomUnits”:“seconds”,“drop”:false,“x”:680,“y”:2200,“wires”:[[“177532d8.a5ad5d”]]},{“id”:“e6fa39c.2dd63c8”,“type”:“delay”,“z”:“651c3ebc.4e08”,“name”:"",“pauseType”:“delay”,“timeout”:“1”,“timeoutUnits”:“seconds”,“rate”:“1”,“nbRateUnits”:“1”,“rateUnits”:“second”,“randomFirst”:“1”,“randomLast”:“5”,“randomUnits”:“seconds”,“drop”:false,“x”:680,“y”:2300,“wires”:[[“c6f46e4f.84d48”]]},{“id”:“e7376e9d.a93e1”,“type”:“api-call-service”,“z”:“651c3ebc.4e08”,“name”:“Refresh Light”,“server”:“6c2daf11.fae89”,“version”:1,“debugenabled”:false,“service_domain”:“zwave”,“service”:“refresh_entity”,“entityId”:“light.inovelli_lzw36_fan_light_dimmer_level”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:530,“y”:2200,“wires”:[[“65da22e2.16bc9c”]]},{“id”:“8f4e9446.e70b08”,“type”:“api-call-service”,“z”:“651c3ebc.4e08”,“name”:“Refresh Fan”,“server”:“6c2daf11.fae89”,“version”:1,“debugenabled”:false,“service_domain”:“zwave”,“service”:“refresh_entity”,“entityId”:“light.inovelli_lzw36_fan_light_dimmer_level_2”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:530,“y”:2300,“wires”:[[“e6fa39c.2dd63c8”]]},{“id”:“2f3eb7a8.7d6a08”,“type”:“trigger-state”,“z”:“651c3ebc.4e08”,“name”:“Fan/Light Change”,“server”:“6c2daf11.fae89”,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityid”:“light.inovelli_lzw36_fan_light_dimmer_level_3”,“entityidfiltertype”:“exact”,“debugenabled”:false,“constraints”:[],“constraintsmustmatch”:“all”,“outputs”:2,“customoutputs”:[],“outputinitially”:false,“state_type”:“str”,“x”:290,“y”:2260,“wires”:[[“e7376e9d.a93e1”,“8f4e9446.e70b08”],[“e7376e9d.a93e1”,“8f4e9446.e70b08”]]},{“id”:“6c2daf11.fae89”,“type”:“server”,“z”:"",“name”:“DAN HA”,“legacy”:false,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true}]

Not a node red user-- so I need to ask to be clear, is this an automation that triggers the refresh_entity service when you toggle the entities?

I’m not nearly as knowledgeable on the inner workings of OZW as I could be, but it looks like this a known issue with SwitchMultiLevel V4

Anytime the state or attributes (brightness is what I’m after) changes for my Fan/Light combo I call zwave.refresh_entity for the individual entities for both the fan and light. I then wait 1 sec and call it again for good measure.

The fan/light entity ALWAYS updates when a button is pressed on the switch with the last state of either the fan or light.

I looked around the web and you can either do what I did above, use z-wave polling, or trigger refreshes off the scenes (untested).

Right I forgot entirely that the combo entity always updates. That’s great, I’ll see about copying this right away… :wink:

Here’s what I came up with in my YAML automation, I think this should be about the same as yours. Refresh the individual entities for light or fan if the combo entity has any state change. I set it to off until the Z-Wave network is ready, wouldn’t expect much state change in that time period…

 #Refresh fan/light entities for current status
 - alias: Refresh fan/light entities
   initial_state: 'false'
   trigger:
     - platform: event
       event_type: state_changed
       event_data:
         entity_id: light.inovelli_lzw36_fan_light_dimmer_level_3
   action:
     - service: zwave.refresh_entity
       data:
         entity_id: light.inovelli_lzw36_fan_light_dimmer_level
     - service: zwave.refresh_entity
       data:
         entity_id: light.inovelli_lzw36_fan_light_dimmer_level_2
         
 #Turn on 'Refresh fan light/entities' automation after Z-Wave network started
 - alias: Refresh fan/light entities delay
   initial_state: 'on'
   trigger:
     platform: event
     event_type: zwave.network_ready
   action:
     - service: automation.turn_on
       data:
         entity_id: automation.refresh_fan_light_entities

Another option you could try is to use the zwave.scene_activated event. that way you don’t need to wait for the zwave network to start.

- alias: refresh_switch
  initial_state: 'on'
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.inovelli_lzw36_fan_light_dimmer
      scene_id: 1
  action:
  ...

You could just add an or for the trigger to catch scene_id 1-6 (1 is fan button, 2 is light button, 3/4 are light dim button up/down, 5/6 are fan dim up/down.
I use the scenes to toggle/dim the zigbee smart bulb in the fan. (ordered a zwave one today, we’ll see how that goes :wink: )

1 Like

That’s a good take, I’m not worried about that 1 minute downtime during a reboot (and I’m feeling “done”) but I’ll keep it in mind if I need it.

Question about the scenes on this-- my other devices use a double/triple/etc taps for scene but this has scenes for a single tap as well, how does that work? Turn light or fan on/off AND trigger a scene command? What’s a use case for something like that? (outside of this of course…)