Get entity name from entity id if was not set

This commit is contained in:
Yegor Vialov
2018-11-04 22:25:22 +02:00
parent 5d95c3702d
commit 66f84952f0

View File

@ -43,7 +43,7 @@ class Entity {
);
String get displayName =>
attributes["friendly_name"] ?? (attributes["name"] ?? "_");
attributes["friendly_name"] ?? (attributes["name"] ?? entityId.split(".")[1].replaceAll("_", " "));
String get deviceClass => attributes["device_class"] ?? null;
bool get isView =>