# Option to hide switches for dimmer items

**URL:** <https://community.openhab.org/t/option-to-hide-switches-for-dimmer-items/160044>\
**Category:** iOS App\
**Created:** [November 3, 2024, 11:30pm UTC](https://community.openhab.org/t/option-to-hide-switches-for-dimmer-items/160044 "2024-11-03T23:30:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexMartin13](https://community.openhab.org/user_avatar/community.openhab.org/alexmartin13/32/45704_2.png) [@AlexMartin13](https://community.openhab.org/u/AlexMartin13)\
**Post date:** [November 3, 2024, 11:30pm UTC](https://community.openhab.org/t/option-to-hide-switches-for-dimmer-items/160044/1 "2024-11-03T23:30:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![maniac103](https://community.openhab.org/user_avatar/community.openhab.org/maniac103/32/73196_2.png) [@maniac103](https://community.openhab.org/u/maniac103)\
**Post date:** [November 4, 2024, 6:33am UTC](https://community.openhab.org/t/option-to-hide-switches-for-dimmer-items/160044/2 "2024-11-04T06:33:24Z")

</div>

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](https://github.com/openhab/openhab-ios/blob/dd5553e6c9a81a5acd30b10d4306b8cf01a4f03f/openHAB/OpenHABSitemapViewController.swift#L668).

---

<div class="post-metadata">

**Author:** ![AlexMartin13](https://community.openhab.org/user_avatar/community.openhab.org/alexmartin13/32/45704_2.png) [@AlexMartin13](https://community.openhab.org/u/AlexMartin13)\
**Post date:** [November 4, 2024, 9:28am UTC](https://community.openhab.org/t/option-to-hide-switches-for-dimmer-items/160044/3 "2024-11-04T09:28:18Z")

</div>

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:

> ### Element Type ‘Default’
> 
> ```auto
> Default item=<itemname> [label="<labelname>"] [icon=<iconref>] [staticIcon=<iconref>]
> 
> ```
> 
> 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](https://www.openhab.org/docs/ui/sitemaps.html#element-type-slider) element while a `Player` Item will be rendered with player button controls (Previous/Pause/Play/Next).
> 
> Such an implicit [Slider](https://www.openhab.org/docs/ui/sitemaps.html#element-type-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.
