Add support for entityLabel in HTML value card, replace entityLabel on entityName, if label doesn't exist (#2239)

This commit is contained in:
Chantsova Ekaterina 2019-12-09 12:52:06 +02:00 committed by Igor Kulikov
parent 424c137d3a
commit f4656f3ea0
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -522,7 +522,7 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t
} else if (variableName === 'deviceName') {
label = label.split(variable).join(datasource.entityName);
} else if (variableName === 'entityLabel') {
label = label.split(variable).join(datasource.entityLabel);
label = label.split(variable).join(datasource.entityLabel || datasource.entityName);
} else if (variableName === 'aliasName') {
label = label.split(variable).join(datasource.aliasName);
} else if (variableName === 'entityDescription') {