mirror of
https://github.com/home-assistant/android
synced 2024-10-15 12:32:54 +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) }
|
.filter { entries == null || entries.contains(it) }
|
||||||
.map {
|
.map {
|
||||||
val server = servers.first { s -> s.id == it.split("_")[0].toInt() }
|
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
|
if (servers.size > 1) "${server.friendlyName}: $zone" else zone
|
||||||
}
|
}
|
||||||
val entriesNotInZones = entries
|
val entriesNotInZones = entries
|
||||||
|
|
Loading…
Reference in a new issue