mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-03-31 14:55:31 +08:00
fix: fix miot cloud and mdns error (#637)
* fix: fix miot cloud state error * style: code format
This commit is contained in:
parent
045528fbf2
commit
3b89536bda
@ -106,7 +106,7 @@ class MIoTOauthClient:
|
||||
|
||||
@property
|
||||
def state(self) -> str:
|
||||
return self.state
|
||||
return self._state
|
||||
|
||||
async def deinit_async(self) -> None:
|
||||
if self._session and not self._session.closed:
|
||||
|
@ -117,7 +117,7 @@ class MipsServiceData:
|
||||
self.type = service_info.type
|
||||
self.server = service_info.server or ''
|
||||
# Parse profile
|
||||
self.did = str(int.from_bytes(self.profile_bin[1:9]))
|
||||
self.did = str(int.from_bytes(self.profile_bin[1:9], byteorder='big'))
|
||||
self.group_id = binascii.hexlify(
|
||||
self.profile_bin[9:17][::-1]).decode('utf-8')
|
||||
self.role = int(self.profile_bin[20] >> 4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user