Dashboard Fan Tile Shows Unsupported Speeds for Ceiling Fan

I have a Leviton Z-Wave Ceiling Fan controller paired with HE. The device’s supported fan speeds are:

["low","medium","high","on","off"]

However, when I create a dashboard tile to control the ceiling fan it provides many more options:

Off, Low, Medium Low, Medium, Medium High, High, Auto, On

Shouldn’t the dashboard tile only offer the valid speeds supported by the fan controller? Is there a way for me to fix this for my dashboard or is this simply a bug.

Thanks in advance for the help

I haven’t written a Fan driver in years, but when I did, I “rounded to” the closest actual speed. I would receive a Medium High and the fan would be sent a “medium” command (or a ‘high"‘ command, I can’t remember that far back :frowning: )

Thanks @csteele . The UI does work. For example if I select Medium-Low then the fan turns on to low speed.
My post is about the correctness of the dashboard UI in offering options that don’t really exist when the device data has the information necessary to create the proper menu of options for the fan tile.

This has bugged me for years. I have reported it as a bug twice now, I believe, and it never got any traction.

The thermostat tile menu options do change correctly based on supportedThermostatModes, and for supportedThermostatFanModes, so it is certainly something that can be done, so I consider this a bug, that apparently that nobody wants to fix for the fan tile.

Opinions vary.

Having had to write code to ‘translate’ a 3-speed fan into a 5-speed interface, I get it as well as anyone. But the Dashboards do not have a tile for each individual circumstance/device variance. There’s a 5-speed tile, and I (because I don’t work for nor influence Hubitat) can’t suggest why not a 3-speed, except by inference… one tile for each combination quickly becomes too difficult to select with any assurance… I suspect it would become trial-and-error tile selection for many.

I’m thinking less about fans when I write this and more about Motion Sensors… Human Presence Sensor, with Temp, with Humidity, with UV, etc. where the combination multiplies harmfully IMO.

I had to run that gauntlet years ago trying to wedge each vendor’s choices into the fewest selection lists, where each list was a specific driver.

I’m NOT saying I have an answer.. I am saying I get it and can insert something to the discussion. :smiley:

My only point is that the Thermostat tile options menu conforms exactly to what is in the "supported" attributes. Most devices don't have those, but the fan tile does.

I've found with the Thermostat tile you can put whatever you want in the supported attributes, and those options appear in the options menu, and it will send that value back to the driver when you press the option button.

Not many drivers use a supported attribute for configurable options on a tile, actually none besides fan and thermostat, that I know of.

If you set supportedThermostaModes in the driver to Alice, Bob and Frank, the tile shows those as options, and it calls the setThemostatMode method and sends it Alice, Bob, or Frank as was chosen.

I agree @chrisbvt . If someone has gone through the trouble of developing an algorithm and writing the code for apply modes from a device to a dashboard card in one instance (thermostats), it should be “relatively” easy to apply it to another (fans).

It should be easy, especially since it is not even tied to capability. The thermostat tile just needs there to be an attribute called thermostatMode, and it will display that value. It just needs supportedThermostatModes to have a map value to build the options menu, and it needs there to be a command called setThermostatMode in the driver to set the option chosen. It will do that without any reference in the driver to the thermostat capability.

Check out the CSS for noobs thread (if using the regular dashboard, not the easy dashboard). There is a way to use cas to remove the speeds you don't need/want.

Here is what the CSS I used (you will need to change the Tile# for your specific tiles

#tile-29 div.options.w-full.text-lg div.shadow-md:nth-child(3),
#tile-29 div.options.w-full.text-lg div.shadow-md:nth-child(5),
#tile-29 div.options.w-full.text-lg div.shadow-md:nth-child(7),
{
display: none;
}

This leaves Off, low, Medium, High and on

As a bonus if you want the fan icon to rotate you can add these lines to your CSS

#tile-29 .low { transform-origin: 50% 50%; /* spin around the center / animation: hubitat-spin 10s linear infinite; / 10 seconds per rotation /}
#tile-29 .medium{ transform-origin: 50% 50%; / spin around the center / animation: hubitat-spin 5s linear infinite; / 5 seconds per rotation /}
#tile-29 .high{ transform-origin: 50% 50%; / spin around the center / animation: hubitat-spin 2s linear infinite; / 2 seconds per rotation */}

Thanks for sharing @scubamikejax904 !!

Just to be clear I didn't come up with either of those css codes they were in the noobs guide to css (I'm not sure if they were both in there or not)

Own it @scubamikejax904 …. Although that does include owning any follow up questions / support… so can understand the clarification… :slight_smile:

@sburke781 I’m always worried about looking like I'm taking credit for someone else’s work, this community is one of the best/friendliest/helpful ones I've dealt with. I don’t mind trying to help if I can, I just know since it’s not my work if anything technical came up it’d be the blind leading the blind and I wouldn’t be very helpful.

Don’t worry, I’m with you… My post was only tongue-in-cheek… I also don’t want people to have too higher expectations than I am willing / able to meet, plus the whole appropriate accreditation of effort… I know I have built many a project off the back of the work others here have contributed.

That said, it’s good to know we have someone to call on for Fan Tiles… :wink: :face_with_tongue: