fanSpeed 0, switch off Conflict

I have an air purifier than has four fan ‘speeds,’ Low, Med and High come through as 1, 2 and 3 respectively. Night mode (a very low fan speed) is a value of 0. When the device is on and in night mode the switch attribute is on and fanSpeed is 0 which is what I expect but the dashboard tile shows off.

I can put in a custom fan speed of 0 and have it show Night but in this case the tile animates and shows Night even if switch is off. And when it is actually in Night mode (switch is on) the tile shows the inactive style (presumably driven by the 0 fanSpeed, not switch). Hope that makes sense.

How can I have the tile show active/icon animate only when switch is actually on? Maybe through styles? I can’t figure it out if so.

You can make one switch that is on/off only and one that is speeds? I had to do that with my Modern Forms fans…thread is linked below.

I’ll take a look. Thanks.

EDIT: Thanks for the pointer but not really the solution I’m looking for.

I’ve partly solved this using a Super Tile and a variable. I now have a tile that shows an active color and animated icon only when switch is actually on. I can’t figure out how to add on/off capability on tap (only see off or on, not a toggle) but for now I at least have an accurate status tile. Control of the air purifier schedule is via a Rule anyway.

Screen Shot 2023-02-11 at 4.42.16 PM

Screen Shot 2023-02-11 at 4.46.47 PM

To address this I created a Rule that toggles the switch state and then set execution of that Rule on tap on the Super Tile.

What capabilities is the Thing you are controlling reporting?

I would have to go back and double check, but I believe that if the device has the switch capability, then the macro for toggle should show up in the Super Tile action editor (unless it has its own native ‘toggle’ command).

It has switch and fanSpeed capabilities but toggle does not show up.

Thanks for sharing. Now that you shared the screenshots, I recall that the Toggle macro might require that the ‘switch’ capability is the Hero Capability in order for the toggle to show up. I can take a look when I’m back in the office as there’s probably not a strong reason to require it being the ‘hero’ capability rather than just supporting that capability at all.

1 Like

After looking at it more closely, I see why we require it to be the ‘hero’ capability. The toggle macro supports a variety of different capabilities (Switch, Lock, Door Control) so we need to know which capability the toggle() is associated with and currently do that based on the hero capability.

While there’s probably some enhancements that could be made here, the approach you took with a rule to create the toggle action would be what I would recommend for now. If anyone has strong feelings about enhancing the Super Tile to support a more generic ‘toggle’ macro, feel free to create a feature request. :slight_smile:

1 Like

Thanks Josh. That makes sense to me. I’m completely fine with the Rule approach.

1 Like

Continuing my wobbly journey in to Super Tiles and this air purifier I am wondering if there’s a way to display a different icon based on the switch status. When setting-up the Super Tile I can of course define icons for each of the fan speeds but as I can have a fan speed of 0 and the switch still be on (again, for sleep/night mode on the device) I would like to set a different icon only when switch is off.

What about using a rule that reacts to both the fanSpeed and the switch status changing and updates a SharpTools Variable with the combined state? Then you could use that variable in your Super Tile for binding the icon and optionally displaying the state.

1 Like

Hmmm, interesting. Let me give that a try.

Thanks Josh.

Thanks again Josh. I got this working per your suggestion.

1 Like