Safe display name parse
This commit is contained in:
parent
870bc25dd9
commit
cffac8e1f8
@ -79,7 +79,8 @@ class Entity {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String get displayName =>
|
String get displayName =>
|
||||||
attributes["friendly_name"] ?? (attributes["name"] ?? entityId.split(".")[1].replaceAll("_", " "));
|
attributes["friendly_name"] ??
|
||||||
|
(attributes["name"] ?? (entityId != null && entityId.contains('.')) ? entityId.split(".")[1].replaceAll("_", " ") : "");
|
||||||
|
|
||||||
bool get isView =>
|
bool get isView =>
|
||||||
(domain == "group") &&
|
(domain == "group") &&
|
||||||
|
Reference in New Issue
Block a user