VZM35-SN Zigbee Blue Series ZHA - Fan Template For Home Assistant

Here is a fan template that seems to work pretty good with HA. There might be a way to improve it so let me know if there are any tweaks. You just need the entity id of your fan to use. Anywhere that you see “light.inovelli_vzm35_sn_light” you need to put in your id.

fan:
  - platform: template
    fans:
      bedroom_fan:
        friendly_name: "Bedroom fan"
        value_template: "{{is_state('light.inovelli_vzm35_sn_light', 'on')}}"
        percentage_template: "{{ (state_attr('light.inovelli_vzm35_sn_light', 'brightness') | float(0) * 0.392)  | round(0)}}"
        turn_on:
          service: light.turn_on
          target:
            entity_id:
              - light.inovelli_vzm35_sn_light
        turn_off:
          service: light.turn_off
          target:
            entity_id:
              - light.inovelli_vzm35_sn_light
        set_percentage:
          service: light.turn_on
          data:
            brightness_pct: "{{ percentage }}"
          target:
            entity_id:
              - light.inovelli_vzm35_sn_light
        speed_count: 3

image

Edit: I just noticed that @MasterDevwi had already done this. Could have saved me a little time if I had remembered:

ZigBee Fan Switch | Project Zephyr (Blue Series) - So Hot Right Now / Projects & Roadmaps - Inovelli Community

3 Likes

One thing I noticed is that when controlling the fan at the switch, sometimes the level isn’t being reported correctly in HA. Showing that it is on vs off always works. I think there are some preset percentages for low, medium, high that when controlling from the switch it doesn’t reach. This is one of the areas that can probably be improved. I saw this somewhere in the HA forums that I think can be put inside of “set_percentage”, but I didn’t have time to figure it out.

brightness: >
              {% set mapper = {0: 0, 22: 56, 42: 107, 75: 191} %}
              {{ mapper[percentage] }}