diff --git a/lib/entity_class/entity.class.dart b/lib/entity_class/entity.class.dart index 13535e2..2f253ca 100644 --- a/lib/entity_class/entity.class.dart +++ b/lib/entity_class/entity.class.dart @@ -450,8 +450,8 @@ class CoverEntity extends Entity { double get currentPosition => _getDoubleAttributeValue('current_position'); double get currentTiltPosition => _getDoubleAttributeValue('current_tilt_position'); - bool get canBeOpened => ((state == "closed") || (state == "closing") || (state == "opening")); - bool get canBeClosed => ((state == "open") || (state == "opening")|| (state == "closing")); + bool get canBeOpened => ((state != "opening") && (state != "open")); + bool get canBeClosed => ((state != "closing") && (state != "closed")); bool get canTiltBeOpened => currentPosition < 100; bool get canTiltBeClosed => currentPosition > 0; diff --git a/lib/entity_class/stateful_widgets.dart b/lib/entity_class/stateful_widgets.dart index ec7f7d4..d00df5f 100644 --- a/lib/entity_class/stateful_widgets.dart +++ b/lib/entity_class/stateful_widgets.dart @@ -705,6 +705,7 @@ class _CoverControlWidgetState extends State { Widget build(BuildContext context) { final entityModel = EntityModel.of(context); final CoverEntity entity = entityModel.entity; + TheLogger.log("debug", "${entity.state}"); if (_changedHere) { _changedHere = false; } else { diff --git a/lib/main.dart b/lib/main.dart index 9cef826..7dbde36 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -30,7 +30,7 @@ part 'card_class.dart'; EventBus eventBus = new EventBus(); const String appName = "HA Client"; -const appVersion = "0.3.0.39"; +const appVersion = "0.3.1"; String homeAssistantWebHost; diff --git a/pubspec.yaml b/pubspec.yaml index 65972e9..218d29f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: hass_client description: Home Assistant Android Client -version: 0.3.0+39 +version: 0.3.1+41 environment: sdk: ">=2.0.0-dev.68.0 <3.0.0"