State const

This commit is contained in:
Yegor Vialov
2018-11-14 15:14:46 +02:00
parent 3190b45db3
commit 87f89b63e1
15 changed files with 116 additions and 42 deletions

View File

@ -84,7 +84,7 @@ class ClimateEntity extends Entity {
String get fanMode => attributes['fan_mode'];
String get swingMode => attributes['swing_mode'];
bool get awayMode => attributes['away_mode'] == "on";
bool get isOff => state == "off";
bool get isOff => state == EntityState.off;
bool get auxHeat => attributes['aux_heat'] == "on";
ClimateEntity(Map rawData) : super(rawData);