Skip to content

Commit

Permalink
Use number format pattern for formatting state for icon URL
Browse files Browse the repository at this point in the history
See openhab#3404

Signed-off-by: Danny Baumann <[email protected]>
  • Loading branch information
maniac103 committed Aug 31, 2023
1 parent a3979dd commit e973eb2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ internal fun String?.toOH2WidgetIconResource(
}

val itemState = item?.state
var iconState = state?.asString.orEmpty()
var iconState = if (state?.asNumber != null) state.asNumber.toString() else state?.asString.orEmpty()
if (itemState != null && useState) {
if (item.isOfTypeOrGroupType(Item.Type.Color)) {
// For items that control a color item fetch the correct icon
Expand Down

0 comments on commit e973eb2

Please sign in to comment.