Resolves #512 Support all state_filter options

This commit is contained in:
Yegor Vialov
2020-03-12 21:16:07 +00:00
parent b00b745f27
commit 244a1984cc
5 changed files with 67 additions and 6 deletions

View File

@ -221,7 +221,7 @@ class Entity {
String getAttribute(String attributeName) {
if (attributes != null) {
return attributes["$attributeName"];
return attributes["$attributeName"].toString();
}
return null;
}

View File

@ -8,13 +8,15 @@ class EntityWrapper {
String entityPicture;
EntityUIAction uiAction;
Entity entity;
List stateFilter;
EntityWrapper({
this.entity,
String icon,
String displayName,
this.uiAction
this.uiAction,
this.stateFilter
}) {
if (entity.statelessType == StatelessEntityType.NONE || entity.statelessType == StatelessEntityType.CALL_SERVICE || entity.statelessType == StatelessEntityType.WEBLINK) {
this.icon = icon ?? entity.icon;