diff --git a/circuitmatter/__init__.py b/circuitmatter/__init__.py index fce4214..a2f4a44 100644 --- a/circuitmatter/__init__.py +++ b/circuitmatter/__init__.py @@ -15,7 +15,7 @@ from .subscription import Subscription from .device_types.utility.root_node import RootNode -__version__ = "0.3.0" +__version__ = "0.3.1" class CircuitMatter: diff --git a/circuitmatter/device_types/lighting/dimmable.py b/circuitmatter/device_types/lighting/dimmable.py index fbacb37..9ae772e 100644 --- a/circuitmatter/device_types/lighting/dimmable.py +++ b/circuitmatter/device_types/lighting/dimmable.py @@ -24,6 +24,10 @@ def _move_to_level_with_on_off(self, session, value): except Exception as e: print(f"Error setting brightness: {e}") return + if self._level_control.min_level == value.Level: + self._on_off.OnOff = False + else: + self._on_off.OnOff = True self._level_control.CurrentLevel = value.Level @property