On the default location & equipment page I do like the option to display equipment items as accordion and promote the main point of the equipment.
However when expanding the according list, the main point of the equipment is only visible in the top line of the according and no longer part of the list itself. Therefore I am missing the option to click on the promoted item and open the analyzer view.
Is this something that I can configure, that I can promote the main point of an equipment AND have the main point part of the accordion list, so that I can easily open the analyzer?
I would like to bring up this topic here because I have encountered the same problem.
I am currently using openHAB 5.2.0, and I really like using the option to display equipment items as an accordion in the Location tab too, as it makes things easier to view.
Even in version 5.2.0, the main item remains non-functional. For instance, if I define the power switch as the main item for a receiver equipment, tapping the main item merely opens and closes the equipment accordion, regardless of where on the line I tap.
I had the AI create a list item widget that makes the switch item operable again.
uid: custom_accordion_switch_main_item
tags:
- list
- item
props:
parameters:
- context: item
label: Switch Item
name: item
required: true
type: TEXT
- label: Titel
name: title
required: false
type: TEXT
- label: Icon (z.B. oh:light)
name: icon
required: false
type: TEXT
component: oh-list-item
config:
title: =props.title || 'Schalter'
icon: =props.icon || 'oh:switch'
iconUseState: true
slots:
after:
- component: oh-toggle
config:
item: =props.item
# Wichtig: Verhindert, dass der Klick auf den Toggle das Accordion öffnet/schließt
class:
- stop-propagation
- no-fastclick
style:
margin-left: 10px
When I assign this list item widget to the switch item I’ve defined as the main item, tapping the switch icon on the right turns the receiver on or off, while tapping to the left of the switch expands or collapses the equipment accordion.
My question to the community is: Is this the only way to solve the issue where the main item of an accordion cannot be operated? One would have to create corresponding list item widgets for other item types, which makes the process somewhat cumbersome.
Is there perhaps a way in openHAB 5 to configure the accordion function so that the main items are operable—something I might have overlooked?