Switch with mapping not working with iOS16

The following code was running fine till I upgraded to iOS16

	Switch item=Energy_Chart_Period label="Power(kW)" mappings=[0="Hour", 1="Day"]
	Chart item=Electric period=h refresh=6000 visibility=[Energy_Chart_Period==0]
	Chart item=Electric period=D refresh=6000 visibility=[Energy_Chart_Period==1]

The buttons do not issue any action.

If it’s a default switch, try with ON / OFF instead of 0/1

To clarify: the Switch entry does display two buttons “Hour” and “Day”. Using it should display the chart of “Electric per hour” or “Electric per Day”

Show us your log files, what’s happening when you click on the switch button

I did some more testing. The item change event is triggered mostly (I checked this in the event log) if I press the button 2 or 3 times fast. Only once, or slowly multiple times will not trigger the event.

Just to clarify, poking the button in the UI does not directly affect or change the Item state at all. It’s supposed to issue a command to the Item, so that is your events.log entry of interest here

Hi
there are no log-events at all, because all this is handled by the GUI itself. So I’ve no events witch are fired…

I think it is simple: using GUI on windows → single click, using iOS GUI → double click

Here the event.log entries if the button is really fired:

2022-11-01 14:26:24.644 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Energy_Chart_Period' received command 0
2022-11-01 14:26:24.644 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Energy_Chart_Period' changed from 1 to 0

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.