WIP #120 History chart based on attributes

This commit is contained in:
Yegor Vialov
2018-10-29 00:58:52 +02:00
parent c20200b609
commit 91db34badb
9 changed files with 327 additions and 21 deletions

View File

@ -38,7 +38,9 @@ class Entity {
List<Entity> childEntities = [];
List<String> attributesToShow = ["all"];
int historyWidgetType = EntityHistoryWidgetType.simple;
EntityHistoryConfig historyConfig = EntityHistoryConfig(
chartType: EntityHistoryWidgetType.simple
);
String get displayName =>
attributes["friendly_name"] ?? (attributes["name"] ?? "_");
@ -136,7 +138,7 @@ class Entity {
Widget buildHistoryWidget() {
return EntityHistoryWidget(
type: historyWidgetType,
config: historyConfig,
);
}