Zwavejs 0-10v dimmer which controls fan shows up as light

I have integrated the qubino 0-10v dimmer ZMNHVD1 in Home Assistant using ZwaveJS.
It currently shows up as a light where can set the brightness: light.flush_dimmer_0_10v
I guess I can solve this in the lovelace user interface by showing it as a fan, but ideally I would like it to be recognised as a fan entity rather than a light entity. Is that possible?

I’m running into the same issue with this 0-10v zwave module. I tried to use the following wrapper:

- platform: template
  fans:
      zolder_fan:
        friendly_name: "zolder fan"
        value_template: "{{ states('light.flush_dimmer_0_10v') }}"
        speed_template: >
          {% set output = {0: 'off', 10: 'low', 50: 'medium', 100: 'high'} %}
          {% set idx = state_attr('light.flush_dimmer_0_10v', 'brightness') %}
          {{ output[idx] }}
        turn_on:
          service: homeassistant.turn_on
          entity_id: light.flush_dimmer_0_10v
        turn_off:
          service: homeassistant.turn_off
          entity_id: light.flush_dimmer_0_10v
        set_speed:
          service: light.turn_on
          entity_id: light.flush_dimmer_0_10v
          data_template:
            brightness: >
              {% set mapper = {'off' : 0, 'low': 10, 'medium': 50, 'high': 100} %}
              {{ mapper[speed] }}
        speeds:
          - 'off'
          - 'low'
          - 'medium'
          - 'high'

Unfortunately it doesn’t change the fan speed, anyone has an idea to use thich for the fan control?

With the standard light dimmer it is working.

Fan speeds are deprecated, I wouldn’t use those. The integration docs have an example which uses percentages. I don’t think that’s your problem though, it’s still supported just not recommended nor even documented anymore.

One potential problem is your usage of brightness. Brightness has a scale of 0-255. The Z-Wave dimmer levels range from 0-99. Therefore a brightness value of 100 is translated to a level of 40 on the device. Normally, a 3-speed fan would use ranges likes 1-33, 34-67, 68-99, or similar. Does your fan operate in the brightness percentage range of 0-40, or 0-99? If it’s the latter, your template is effectively only a 2-speed setup. The service call to set brightness should be adjusted to account for the differences in ranges (e.g. instead of 100 for high, use 255). Same for the speed template, a brightness of 100 is probably not high but medium. A value in the range X to 255 is probably high.

In the speed template I would also check for ranges of values, not exact values. Being a dimmer, it’s possible it could get set to a different value than what you’re checking for.

Another possible issue, try data not data_template (I can’t remember if the latter has been fully removed) in the service call.

Welcome to the home assistant forums @avd88!
Overall the community here is incredibly helpful.
This is one of the rare examples of issues I didn’t solve with the help of the talented people on these forums. For the most part it is my own fault as I didn’t consider the problem important enough to invest sufficient time.
I just changed the icon to a fan and live with the fact that it’s called brightness.
I have created my own CO2 sensors using ESPHOME and control my fan speed accordingly using an automation in node red. There I also bumped into the 0-255 range issue and rather than 100 for max speed I have to make sure the output for max speed is 255.

Try this

fan:
  - platform: template
    fans:
      tv_room_fan:
          friendly_name: "TV Room Fan"
          unique_id: 7c19b9ac
          value_template: "{{ states('light.tv_room_fan') }}"
          percentage_template: '{{ states.light.tv_room_fan | int / 2.55 | round(0) }}'
          turn_on:
            service: light.turn_on
            entity_id: light.tv_room_fan
            data:
              brightness: 22
          turn_off:
            service: light.turn_off
            entity_id: light.tv_room_fan
          set_percentage:
            service: light.turn_on
            entity_id: light.tv_room_fan
            data_template:
              brightness: '{{ percentage | int * 2.55 | round(0) }}'
2 Likes

Hi,
this work me with ZMNHVD1 device. Very much thanks.

Can you edit this code and add presets ? Night, Day, Max.

I dont know how to? I tried different variations.

Sorry I am not sure what you mean presets.
I would use a automation in node red to make it snap to where you want it upon a change.