@@ -34,6 +34,7 @@ def __init__(
3434 is_charging : bool = False ,
3535 state_change_result : int = 0 ,
3636 is_enabled_pullspring : bool = False ,
37+ is_enabled_auto_pullspring : bool = False ,
3738 duration_pullspring : int = 0 ,
3839 ) -> None :
3940 """Initialize a new lock."""
@@ -47,6 +48,7 @@ def __init__(
4748 self ._state_change_result = state_change_result
4849 self ._duration_pullspring = duration_pullspring
4950 self ._is_enabled_pullspring = is_enabled_pullspring
51+ self ._is_enabled_auto_pullspring = is_enabled_auto_pullspring
5052
5153 @property
5254 def lock_name (self ) -> str :
@@ -137,6 +139,15 @@ def is_enabled_pullspring(self) -> bool:
137139 def is_enabled_pullspring (self , value : bool ):
138140 self ._is_enabled_pullspring = value
139141
142+ @property
143+ def is_enabled_auto_pullspring (self ) -> bool :
144+ """Return true if the lock is charging."""
145+ return bool (self ._is_enabled_auto_pullspring )
146+
147+ @is_enabled_auto_pullspring .setter
148+ def is_enabled_auto_pullspring (self , value : bool ):
149+ self ._is_enabled_auto_pullspring = value
150+
140151 @property
141152 def duration_pullspring (self ) -> int :
142153 """Return the duration of the pullspring."""
@@ -158,5 +169,6 @@ def to_dict(self) -> dict[str, str | int | bool | None]:
158169 "is_charging" : self ._is_charging ,
159170 "state_change_result" : self ._state_change_result ,
160171 "is_enabled_pullspring" : self ._is_enabled_pullspring ,
172+ "is_enabled_auto_pullspring" : self ._is_enabled_auto_pullspring ,
161173 "duration_pullspring" : self ._duration_pullspring ,
162174 }
0 commit comments