Skip to content

Switch item with mappings=[…] autoupdate=false cannot be toggled in openHAB-Android #4019

Description

@dilyanpalauzov

In openHAB 5.2.0 I define two Items, linked to the very same mqtt channel:

Switch a "A" {channel="mqtt:topic:k:m", autoupdate="false"}
Switch c "C" {channel="mqtt:topic:k:m"}

I put these in a sitemap:

sitemap t {
  Switch item=a
  Switch item=a label="B" mappings=[ON="I", OFF="J"]
  Switch item=c mappings=[ON="I", OFF="J"]
}

Here pressing on an item does not update the mqtt-channel: the linked device is offline. In particular pressing an item is supposed to update one channel, but if a different channel is changed (as result), then the state of the item changes.

In openHAB-Android 3.20.4-beta when I click on A, it switches to ON, and then returns to OFF, because of the autoupdate=false. When I click on C it toggles just once. But when I click on B nothing happens, unless the channel reports a change. My understanding is that for items with autoupdate="false" initially the UI demonstrates a change for the toggled state and then returns to the old state, as this happens with A.

But clicking on B nothing happens, if the state on the MQTT is not updated. If the state of the MQTT channel is updated, then B changes.

The autoupdate="false" dilemma was, that in Android it is not possible to press a switch, which does not change its visual state. But in this case, pressing a mapping does not update the state, while pressing a switch does update (temporary) the state. This is inconsistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions