Fix light controls issues
This commit is contained in:
parent
a4477e9f83
commit
2836973dca
@ -45,7 +45,7 @@ class HACard {
|
||||
|
||||
List<EntityWrapper> getEntitiesToShow() {
|
||||
return entities.where((entityWrapper) {
|
||||
if (entityWrapper.entity.isHidden) {
|
||||
if (!ConnectionManager().useLovelace && entityWrapper.entity.isHidden) {
|
||||
return false;
|
||||
}
|
||||
if (stateFilter.isNotEmpty) {
|
||||
|
@ -143,10 +143,16 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
||||
|
||||
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<LightControlsWidget> {
|
||||
|
||||
Widget _buildEffectControl(LightEntity entity) {
|
||||
if ((entity.supportEffect) && (entity.effectList != null)) {
|
||||
List<String> 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 {
|
||||
|
18
pubspec.lock
18
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"
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user