Resolves #270 Current light effect for lights
This commit is contained in:
@ -33,6 +33,7 @@ class LightEntity extends Entity {
|
|||||||
LightEntity.SUPPORT_WHITE_VALUE);
|
LightEntity.SUPPORT_WHITE_VALUE);
|
||||||
|
|
||||||
int get brightness => _getIntAttributeValue("brightness");
|
int get brightness => _getIntAttributeValue("brightness");
|
||||||
|
String get effect => attributes["effect"];
|
||||||
int get colorTemp => _getIntAttributeValue("color_temp");
|
int get colorTemp => _getIntAttributeValue("color_temp");
|
||||||
double get maxMireds => _getDoubleAttributeValue("max_mireds");
|
double get maxMireds => _getDoubleAttributeValue("max_mireds");
|
||||||
double get minMireds => _getDoubleAttributeValue("min_mireds");
|
double get minMireds => _getDoubleAttributeValue("min_mireds");
|
||||||
|
@ -19,7 +19,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
_tmpBrightness = entity.brightness ?? 0;
|
_tmpBrightness = entity.brightness ?? 0;
|
||||||
_tmpColorTemp = entity.colorTemp ?? entity.minMireds?.toInt();
|
_tmpColorTemp = entity.colorTemp ?? entity.minMireds?.toInt();
|
||||||
_tmpColor = entity.color ?? _tmpColor;
|
_tmpColor = entity.color ?? _tmpColor;
|
||||||
_tmpEffect = null;
|
_tmpEffect = entity.effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setBrightness(LightEntity entity, double value) {
|
void _setBrightness(LightEntity entity, double value) {
|
||||||
|
Reference in New Issue
Block a user