Get entity name from entity id if was not set
This commit is contained in:
@ -43,7 +43,7 @@ class Entity {
|
|||||||
);
|
);
|
||||||
|
|
||||||
String get displayName =>
|
String get displayName =>
|
||||||
attributes["friendly_name"] ?? (attributes["name"] ?? "_");
|
attributes["friendly_name"] ?? (attributes["name"] ?? entityId.split(".")[1].replaceAll("_", " "));
|
||||||
|
|
||||||
String get deviceClass => attributes["device_class"] ?? null;
|
String get deviceClass => attributes["device_class"] ?? null;
|
||||||
bool get isView =>
|
bool get isView =>
|
||||||
|
Reference in New Issue
Block a user