Fix on/off when setting level
This commit is contained in:
parent
5bea854fbb
commit
2ba0c814bc
2 changed files with 5 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ from . import session
|
|||
from .subscription import Subscription
|
||||
from .device_types.utility.root_node import RootNode
|
||||
|
||||
__version__ = "0.3.0"
|
||||
__version__ = "0.3.1"
|
||||
|
||||
|
||||
class CircuitMatter:
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ class DimmableLight(OnOffLight):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue