openhab/openhab-ios

Setpoint with %s in format crashes app when value is changed

TAKeanice opened this issue · 0 comments

New bug checklist

Describe the bug
As in #33 the app crashes for me when changing the value of a setpoint. However, my investigation showed that the code for formatting the value is responsible: If the format specifier is "%s", the value (a double) is not converted to a String before passing it to the string formatting.

To Reproduce
Create a sitemap where the format fort the value of a setpoint contains "%s", open that sitemap in the iOS app and try to change the value

Expected behavior
The value changes as requested (or stays the same if it is at minimum and lowered or at maximum and raised)

Screenshots

App (please complete the following information):

  • Version 2.4.60 (currently on the develop branch, but the issue is in there since much longer)

Smartphone (please complete the following information):

  • Device: iPhone SE 2020, iPhone 12 mini, ... (does not matter)

openHAB (please complete the following information):

  • Version 4 (but does not matter)