Set Light britness to 0 if light is turned off

This commit is contained in:
Yegor Vialov
2018-10-21 16:18:27 +03:00
parent 0f6babc243
commit 7f9dc5dd3a

View File

@ -783,7 +783,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
String _tmpEffect; String _tmpEffect;
void _resetState(LightEntity entity) { void _resetState(LightEntity entity) {
_tmpBrightness = entity.brightness; _tmpBrightness = entity.brightness ?? 0;
_tmpColorTemp = entity.colorTemp; _tmpColorTemp = entity.colorTemp;
_tmpColor = entity.color; _tmpColor = entity.color;
_tmpEffect = null; _tmpEffect = null;