diff --git a/lib/entity_class/entity.class.dart b/lib/entity_class/entity.class.dart index 4339fc2..9b40c97 100644 --- a/lib/entity_class/entity.class.dart +++ b/lib/entity_class/entity.class.dart @@ -461,8 +461,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 52a0aa7..063470e 100644 --- a/lib/entity_class/stateful_widgets.dart +++ b/lib/entity_class/stateful_widgets.dart @@ -672,6 +672,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 40ad013..c00ccef 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -31,7 +31,7 @@ part 'card_class.dart'; EventBus eventBus = new EventBus(); const String appName = "HA Client"; -const appVersion = "0.3.0.40"; +const appVersion = "0.3.1"; String homeAssistantWebHost; diff --git a/pubspec.yaml b/pubspec.yaml index 0b9a633..d5ae032 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: hass_client description: Home Assistant Android Client -version: 0.3.0+40 +version: 0.3.1+41 environment: sdk: ">=2.0.0-dev.68.0 <3.0.0"