How to expose a fan properly on matter

I’m experimenting with exposing items to matter with OH5 in order to control them with my Amazon Echo’s via Alexa voice control. I’ve successfully exposed:

  • several lights with {matter=“DimmableLight”}
  • some plugs with {matter=“OnOffPlugInUnit”}
  • some shades with {matter=“WindowCovering[invert=false]”}

However, I’m having trouble with properly exposing a fan. The fan I’m trying to expose is a bathroom exhaust fan that is on an Insteon on/off switch and connected to openhab with the insteon binding. I’ve been using that for years w/o issue.

The documentation provides a table of device types where it seems to say fans can be tagged with {matter=”FAN”}, and later the same documentation provides an example for a stand alone fan:

Switch TestFanSingleItem "On/Off" { matter="Fan, fanControl.fanMode" }

I have tried both {matter=“Fan”} and {matter=“Fan, fanControl.fanMode”}. They are both found by the Alexa app, however the device does not respond. I noticed that the Alexa app provides a slider UI to set the speed fro 0-100%, so I’m thinking this is sending the wrong type of command to OH.

Finally I gave up guessing on how to tag as a fan and tagged this switch as {matter=”OnOffPlugInUnit”} and can now turn this device on/off with voice commands / the alexa app. It isn’t a huge deal, but the only issue is that the device is classified in the Alexa app as a plug rather than a fan.

Does anyone know if there is a way to properly tag this on/off switch that controls my bathroom fan as a fan so it is discovered properly?