diff --git a/mobile/src/main/java/org/openhab/habdroid/model/ParsedState.kt b/mobile/src/main/java/org/openhab/habdroid/model/ParsedState.kt index 066229a312..37ac0547c9 100644 --- a/mobile/src/main/java/org/openhab/habdroid/model/ParsedState.kt +++ b/mobile/src/main/java/org/openhab/habdroid/model/ParsedState.kt @@ -140,6 +140,10 @@ data class ParsedState internal constructor( // fall through } } + val stateAsInt = state.toIntOrNull() + if (stateAsInt in 0..100) { + return stateAsInt + } return null }