Resolves #314 card icon priority

This commit is contained in:
estevez-dev
2019-03-13 22:12:01 +02:00
parent fb456878bc
commit 8b28bb2e9e
3 changed files with 13 additions and 7 deletions

View File

@ -4,6 +4,7 @@ class EntityWrapper {
String displayName;
String icon;
String entityPicture;
EntityUIAction uiAction;
Entity entity;
@ -16,6 +17,9 @@ class EntityWrapper {
}) {
if (entity.statelessType == StatelessEntityType.NONE || entity.statelessType == StatelessEntityType.CALL_SERVICE || entity.statelessType == StatelessEntityType.WEBLINK) {
this.icon = icon ?? entity.icon;
if (icon == null) {
entityPicture = entity.entityPicture;
}
this.displayName = displayName ?? entity.displayName;
if (uiAction == null) {
uiAction = EntityUIAction();