diff --git a/lib/cards/card.class.dart b/lib/cards/card.class.dart index cba2589..9c03a34 100644 --- a/lib/cards/card.class.dart +++ b/lib/cards/card.class.dart @@ -45,7 +45,7 @@ class HACard { List getEntitiesToShow() { return entities.where((entityWrapper) { - if (entityWrapper.entity.isHidden) { + if (!ConnectionManager().useLovelace && entityWrapper.entity.isHidden) { return false; } if (stateFilter.isNotEmpty) { diff --git a/lib/entities/light/widgets/light_controls.dart b/lib/entities/light/widgets/light_controls.dart index f6e3b63..df01f42 100644 --- a/lib/entities/light/widgets/light_controls.dart +++ b/lib/entities/light/widgets/light_controls.dart @@ -143,10 +143,16 @@ class _LightControlsWidgetState extends State { Widget _buildColorTempControl(LightEntity entity) { if (entity.supportColorTemp) { + double val = entity.minMireds; + if (_tmpColorTemp != null) { + if (_tmpColorTemp >= entity.minMireds && _tmpColorTemp <= entity.maxMireds) { + val = _tmpColorTemp.toDouble(); + } + } return UniversalSlider( title: "Color temperature", leading: Text("Cold", style: TextStyle(color: Colors.lightBlue),), - value: _tmpColorTemp == null ? entity.maxMireds : _tmpColorTemp.toDouble(), + value: val, onChangeEnd: (value) => _setColorTemp(entity, value), max: entity.maxMireds, min: entity.minMireds, @@ -203,10 +209,14 @@ class _LightControlsWidgetState extends State { Widget _buildEffectControl(LightEntity entity) { if ((entity.supportEffect) && (entity.effectList != null)) { + List list = List.from(entity.effectList); + if (!list.contains(_tmpEffect)) { + list.insert(0, _tmpEffect); + } return ModeSelectorWidget( onChange: (effect) => _setEffect(entity, effect), caption: "Effect", - options: entity.effectList, + options: list, value: _tmpEffect ); } else { diff --git a/pubspec.lock b/pubspec.lock index 8ae5728..5abda1e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -91,7 +91,7 @@ packages: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.0+2" + version: "0.4.0+3" event_bus: dependency: "direct main" description: @@ -138,7 +138,7 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "0.8.3" + version: "0.8.4" flutter_markdown: dependency: "direct main" description: @@ -199,7 +199,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.15.8" + version: "0.16.0" json_annotation: dependency: transitive description: @@ -220,7 +220,7 @@ packages: name: markdown url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.1" matcher: dependency: transitive description: @@ -318,7 +318,7 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "1.1.6+4" + version: "1.1.7+1" stack_trace: dependency: transitive description: @@ -374,7 +374,7 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.1.3" + version: "5.1.4" uuid: dependency: transitive description: @@ -409,7 +409,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.1.16" + version: "2.2.0" sdks: - dart: ">=2.4.0 <3.0.0" - flutter: ">=1.5.0 <2.0.0" + dart: ">=2.5.0 <3.0.0" + flutter: ">=1.9.1 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index cfff462..5a4de48 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,8 +24,8 @@ dependencies: firebase_messaging: ^5.1.6 flutter_webview_plugin: ^0.3.8 flutter_secure_storage: ^3.3.1+1 - device_info: ^0.4.0+2 - flutter_local_notifications: ^0.8.3 + device_info: ^0.4.0+3 + flutter_local_notifications: ^0.8.4 share: git: url: https://github.com/d-silveira/flutter-share.git