Blue Series Fan Switch showing as light rather than fan entity in Home Assistant

Also just installed my first one today. Same problem. Fan switch works locally but Home Assistant seems to be showing and responding to it like a dimmer switch and its missing many settings that should be there.

ZHA or Z2M?

1 Like

This is with ZHA

^There’s an option to change it in ZHA, though in my short test it changes to a switch and then you have the option to change it to a fan entity from there.

You can still change all the settings by going to the device page > Manage Zigbee Device > Change to Inovelli_VZM35SN_Cluster, and set them as you desire. Not having them all on the device page is not the intended behavior and a ticket is open to try and get that figured out and fixed.

Just in case it’s helpful to anybody working on that ticket, I played with this a bit last night and patched ZHA to just ignore attributes that the device doesn’t recognize (it currently halts when it tries to lookup a power related attribute, which is why there’s so many missing entities) and it does complete… but the entities are all from VZM31 (blue 2-1) and not the fan switch. The underlying problem seems to be that the ZHA quirk doesn’t get handled correctly, which has code to remove the non-existent entities and install proper ones (for things like “smart fan mode”). I ran out of time before playing with linking in custom quirks, but I’m sure the devs at Inovelli will get it all sorted in short order anyway.

One thing I also noticed is that the quirk does still consider this device type to be a dimmer. I don’t know ZHA well enough to speak intelligently about which device type we’ll actually want, but yeah, also a thing I’m sure their devs can address.

So the quirk itself should be getting handled correctly, that’s part of going into the manage zigbee device, etc and configuring parameters there. I believe the code in question will be related to the verification within HA Core, and likely because the check there is just done against the cluster ID, which is the same across the 2-1 and Fan switches.

Re the device being considered a dimmer, this isn’t a ZHA issue per se, but it’s matching how the firmware is presenting the device. I’m going off memory here and could be misremembering, but I don’t believe Zigbee has a ‘fan’ device type. The only devices that support the ‘fan’ cluster are specifically HVAC devices, which this is not. It is possible to change the device type in the quirk (likely to something that would come through as an on/off switch), but device types by spec are supposed to have certain in/out clusters depending on what it is, so this may not be preferable either.

I recognize there’s a gap here between how those standards are set up vs user expectations though, and I believe that’s a part of why ZHA allows you to change the device type via the yaml configuration as well.

This all makes perfect sense.

Regarding the device types, I did skim the constants in ZHA here: https://github.com/zigpy/zigpy/blob/819f8e7dc97e27627335a398dac22ad9a9b7688a/zigpy/profiles/zha.py#L6 and also didn’t see anything that stood out as obvious for a fan control switch. I can live with the switch presenting itself as a dimmer, personally, though.

It isn’t? It seems reasonable to me that a switch that is for controlling a fan could support the Zigbee fan control cluster—but even if not, the Zigbee spec mentions “The clusters specified in this document are for use typically in ZigBee HVAC applications, but MAY be used in any application domain.” (section 6.1.1). And the description of the fan control cluster is “An interface for controlling a fan in a heating / cooling system” which certainly sounds like it fits.

In any case, using the light dimmer UI works for me, but isn’t ideal… it’d be nicer if I could get discrete off/low/med/high settings, rather than a 0 to 100% slider.

Thanks for the link, I had to go looking…I was thinking of the Zigbee Devices User Guide which gives mandatory/optional clusters according to the device type -
image

I definitely prefer the discrete options as well though, if you’re willing to control it from the dashboard, the “Light Brightness Preset Row” card you can get via HACS can be set up like this -

image

image

For the purposes of HA, could there be a toggle to set the device to a “switch” rather than a “light”? If the device shows up as a switch, we could use this helper to make it into a fan.

This was addressed earlier in the thread:

I do still have a question for @chack regarding this response, though:

You can still change all the settings by going to the device page > Manage Zigbee Device > Change to Inovelli_VZM35SN_Cluster

…where exactly do I do this? I can get to “manage zigbee device”, but where do I “change” to “Inovelli_VZM35SN_Cluster”?

No way to make that a toggle option that I’m aware of, but if you are ok with running a custom quirk, I can test changing the device type there and see if that will present it as a switch instead for you. It would be an all or nothing thing and can’t guarantee everything will work the same as I haven’t tested it, etc. If you’re interested, I’ll try to get some time this weekend.

After you select “Manage zigbee device” you’ll get this popup and just select the “Clusters” line there to change it (should be on Basic by default) -

image

Ah! Thanks so much. Seems like I’m already using the VZM35SN cluster. I would be interested in testing the custom quirk if you feel like putting it together!

So same caveat as before that I haven’t tested this (beyond confirming it changes the entity’s domain) and I don’t know that it will give you the exact same behavior.

In case you haven’t done it before, these are the ZHA config parameters and you’ll have to restart HA to apply the config. You should not need to remove and re-add the device, but you will likely end up like the below image with a greyed-out light entity that you can remove if it bothers you. It’ll also get removed if you remove/re-add the device.

image

Custom Quirk Here
"""VZM35-SN Fan Switch Custom Switch Quirk."""

from zigpy.profiles import zgp, zha
from zigpy.profiles.zha import DeviceType
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
    Basic,
    GreenPowerProxy,
    Groups,
    Identify,
    LevelControl,
    OnOff,
    Ota,
    Scenes,
)
from zigpy.zcl.clusters.homeautomation import Diagnostic

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.inovelli import INOVELLI_AUTOMATION_TRIGGERS, Inovelli_VZM35SN_Cluster

INOVELLI_VZM35SN_CLUSTER_ID = 64561
WWAH_CLUSTER_ID = 64599


class InovelliVZM35SN(CustomDevice):
    """VZM35-SN Fan Switch"""

    signature = {
        MODELS_INFO: [("Inovelli", "VZM35-SN")],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: DeviceType.DIMMABLE_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    LevelControl.cluster_id,
                    Diagnostic.cluster_id,
                    INOVELLI_VZM35SN_CLUSTER_ID,
                    WWAH_CLUSTER_ID,
                ],
                OUTPUT_CLUSTERS: [
                    Ota.cluster_id,
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: DeviceType.DIMMER_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                ],
                OUTPUT_CLUSTERS: [
                    Identify.cluster_id,
                    OnOff.cluster_id,
                    LevelControl.cluster_id,
                ],
            },
            242: {
                PROFILE_ID: zgp.PROFILE_ID,
                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: DeviceType.DIMMER_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    LevelControl.cluster_id,
                    Diagnostic.cluster_id,
                    Inovelli_VZM35SN_Cluster,
                    WWAH_CLUSTER_ID,
                ],
                OUTPUT_CLUSTERS: [
                    Ota.cluster_id,
                ],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: DeviceType.DIMMER_SWITCH,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                ],
                OUTPUT_CLUSTERS: [
                    Identify.cluster_id,
                    OnOff.cluster_id,
                    LevelControl.cluster_id,
                ],
            },
            242: {
                PROFILE_ID: zgp.PROFILE_ID,
                DEVICE_TYPE: zgp.DeviceType.PROXY_BASIC,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    device_automation_triggers = INOVELLI_AUTOMATION_TRIGGERS

1 Like

I think this template may help some that are wanting the device to appear as a fan inside HA. You could enable this in Google Home / Alexa and disable the light entity (I believe).

VZM35-SN Zigbee Blue Series ZHA - Fan Template For Home Assistant - How To’s & Flex Zone - Inovelli Community

So, I’ve tried the custom quirk and the template, and while they work (kind of) it seems like there’s got to be a way to use the native fan entity device type in HA. Is this a Zigbee limitation?

The good news is that the custom quirk won’t be necessary as soon as the PR makes its way through to HA. The other part of the question is explained here, but maybe someone will find a workaround:

2 Likes

The device type being considered a dimmer is something HA probably still needs to look into. I haven’t seen a pull request, but wondering if anyone has made them aware? When changing to a fan type you lose the ability to modify the fan speed. (It turns into and On/Off switch). The only change I have seen was they following:

We will be releasing a firmware update that includes another endpoint that is a fan endpoint. In zha it should have a dimmer endpoint and a fan endpoint that both control the fan. Users can disable the dimmer endpoint if they would like (or the fan endpoint). The reason we keep the dimmer endpoint is so that the device can be bound to dimmer devices and control them remotely.