Moving over to the new v2 iOS app, I initially appreciated the addition of switches next to dimmable items for convenient toggling. However, this small convenience is outstripped by the fact that having both control types alongside each other means there is very little room for the item names, so that most become truncated after a few letters.
It would be great to have an option to disable this feature and allow dimmers only.
Do you by any chance have switchSupport set on your slider widgets in the sitemap? That’s the differentiator between ‘slider only’ and 'slider with switch’s, and the iOS app AFAICT uses it exactly that way.
Good thinking but no I haven’t defined switchSupport on any sitemap - in fact I didn’t know about that flag until now, which is helpful because further reading has led me to the reason and solution:
The problem is caused my use of default elements instead of specific ones e.g. slider, switch etc. which I’ve been using until now to streamline the process of maintaining sitemaps. What’s happening is that default elements automatically inherit the switchsupport flag. This is documented here:
Presents an Item using the default UI representation specified by the type of the given Item. E.g., a Dimmer Item will be represented as a Slider element while a Player Item will be rendered with player button controls (Previous/Pause/Play/Next).
Such an implicit Slider element will have the releaseOnly parameter set. Its behaviour is therefore to send the new value only when the slider is released. It will also have the switchSupport parameter set.
I’m not sure why the decision was made to force these settings for default elements but it is what it is. However the current behaviour of the v2 app is still out of sync with the following documentation:
switchSupport is a parameter without an assignment.
Android app: If specified, a short press on the item row (except the slider itself) switches the item “on” or “off”.
This parameter has no effect in other UIs.
The v2 app has clearly been updated to honour the switchsupport flag so this needs updating. However, I’d prefer if these settings weren’t forced and I could continue to be more lazy with my sitemap definitions! For now I’ll go through and specify sliders for all dimmers.