Resolves #165 Hide controls for unavailable lights

This commit is contained in:
Yegor Vialov
2018-11-04 23:13:25 +02:00
parent 9f7444eae0
commit 6d79487219
2 changed files with 31 additions and 27 deletions

View File

@ -98,7 +98,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
}
Widget _buildBrightnessControl(LightEntity entity) {
if ((entity.supportBrightness) && (_tmpBrightness != null)) {
if ((entity.supportBrightness) && (_tmpBrightness != null) && (entity.state != "unavailable")) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[