File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -160,18 +160,18 @@ def get_status(self, device_id):
160160 """List only MyQ garage door devices."""
161161 devices = self .get_devices ()
162162
163+ garage_state = False
164+
163165 if devices != False :
164166 for device in devices :
165167 if device ['MyQDeviceTypeName' ] in self .SUPPORTED_DEVICE_TYPE_NAMES and device ['MyQDeviceId' ] == device_id :
166168 dev = {}
167169 for attribute in device ['Attributes' ]:
168- if attribute ['AttributeDisplayName' ] == 'doorstate' :
169- garage_state = attribute ['Value' ]
170-
171- garage_state = self .DOOR_STATE [garage_state ]
172- return garage_state
173- else :
174- return False
170+ if attribute ['AttributeDisplayName' ] == 'doorstate' :
171+ myq_garage_state = attribute ['Value' ]
172+ garage_state = self .DOOR_STATE [myq_garage_state ]
173+
174+ return garage_state
175175
176176 def close_device (self , device_id ):
177177 """Close MyQ Device."""
You can’t perform that action at this time.
0 commit comments