mirror of
https://github.com/home-assistant/android
synced 2024-07-22 10:54:12 +00:00
Fix dialog options for high accuracy zone constraint entity id (#3508)
Fix dialog for high accuracy zone constraint entity id - Zone entity ids can contain underscores, only split on underscores once to keep those that belong to the entity id (string is serverid_entityid). The data was being stored correctly.
This commit is contained in:
parent
87042137a4
commit
97634e3903
|
@ -394,7 +394,7 @@ class SensorDetailViewModel @Inject constructor(
|
|||
.filter { entries == null || entries.contains(it) }
|
||||
.map {
|
||||
val server = servers.first { s -> s.id == it.split("_")[0].toInt() }
|
||||
val zone = it.split("_")[1]
|
||||
val zone = it.split("_", limit = 2)[1]
|
||||
if (servers.size > 1) "${server.friendlyName}: $zone" else zone
|
||||
}
|
||||
val entriesNotInZones = entries
|
||||
|
|
Loading…
Reference in a new issue