@@ -138,6 +138,7 @@ async def get_locks(self) -> None:
138138 battery_level ,
139139 is_charging ,
140140 state_change_result ,
141+ door_state
141142 ) = self .parse_lock_properties (lock_json )
142143 (
143144 is_enabled_pullspring ,
@@ -157,6 +158,7 @@ async def get_locks(self) -> None:
157158 is_enabled_pullspring ,
158159 is_enabled_auto_pullspring ,
159160 duration_pullspring ,
161+ door_state ,
160162 )
161163
162164 self ._locks_dict [lock_id ] = lock
@@ -200,6 +202,7 @@ async def sync(self) -> None:
200202 lock .battery_level ,
201203 lock .is_charging ,
202204 lock .state_change_result ,
205+ lock .door_state ,
203206 ) = self .parse_lock_properties (lock_json )
204207
205208 if local_call_success :
@@ -344,14 +347,16 @@ def parse_lock_properties(self, json_properties: dict):
344347 battery_level = lock_properties .get ("batteryLevel" , 50 )
345348 is_charging = lock_properties .get ("isCharging" , False )
346349 state_change_result = lock_properties .get ("stateChangeResult" , 0 )
350+ door_state = lock_properties .get ("doorState" , 0 )
347351 else :
348352 # local call does not have lock properties
349353 state = json_properties .get ("state" , 9 )
350354 battery_level = json_properties .get ("batteryLevel" , 50 )
351355 is_charging = bool (json_properties .get ("isCharging" , False ))
352356 state_change_result = json_properties .get ("jammed" , 0 )
357+ door_state = json_properties .get ("doorState" , 0 )
353358
354- return connected , state , battery_level , is_charging , state_change_result
359+ return connected , state , battery_level , is_charging , state_change_result , door_state
355360
356361 def parse_pull_spring_settings (self , settings : dict ):
357362 """Parse the pull spring settings"""
0 commit comments