Fix state filter when state is number
This commit is contained in:
@ -66,7 +66,7 @@ class HACard {
|
|||||||
var tmpVal = allowedState['attribute'] != null ? entityWrapper.entity.getAttribute(allowedState['attribute']) : entityWrapper.entity.state;
|
var tmpVal = allowedState['attribute'] != null ? entityWrapper.entity.getAttribute(allowedState['attribute']) : entityWrapper.entity.state;
|
||||||
var valToCompareWith = allowedState['value'];
|
var valToCompareWith = allowedState['value'];
|
||||||
var valToCompare;
|
var valToCompare;
|
||||||
if (valToCompareWith is! String) {
|
if (valToCompareWith is! String && tmpVal is String) {
|
||||||
valToCompare = double.tryParse(tmpVal);
|
valToCompare = double.tryParse(tmpVal);
|
||||||
} else {
|
} else {
|
||||||
valToCompare = tmpVal;
|
valToCompare = tmpVal;
|
||||||
|
Reference in New Issue
Block a user