Resolves #270 Current light effect for lights

This commit is contained in:
Yegor Vyalov
2019-01-24 12:26:38 +02:00
parent 1c8f770f10
commit 22a5847285
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ class LightEntity extends Entity {
LightEntity.SUPPORT_WHITE_VALUE);
int get brightness => _getIntAttributeValue("brightness");
String get effect => attributes["effect"];
int get colorTemp => _getIntAttributeValue("color_temp");
double get maxMireds => _getDoubleAttributeValue("max_mireds");
double get minMireds => _getDoubleAttributeValue("min_mireds");

View File

@ -19,7 +19,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
_tmpBrightness = entity.brightness ?? 0;
_tmpColorTemp = entity.colorTemp ?? entity.minMireds?.toInt();
_tmpColor = entity.color ?? _tmpColor;
_tmpEffect = null;
_tmpEffect = entity.effect;
}
void _setBrightness(LightEntity entity, double value) {