Fix default icon for shortcut tile (#1951)

This commit is contained in:
Daniel Shokouhi 2021-11-22 17:34:17 -08:00 committed by GitHub
parent 50687f82c7
commit 65d6d7d270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -98,7 +98,7 @@ class ShortcutsTile : TileService() {
val iconName: String = if (entity.icon.startsWith("mdi")) {
entity.icon.split(":")[1]
} else { // Default scene icon
when (entity.entityId.split(":")[1]) {
when (entity.entityId.split(".")[0]) {
"input_boolean", "switch" -> "light_switch"
"light" -> "lightbulb"
"script" -> "script_text_outline"