mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-17 23:50:42 +08:00
feat: update log level
This commit is contained in:
parent
cc1b56870e
commit
4d8d5391a1
@ -531,17 +531,18 @@ class MIoTHttpClient:
|
|||||||
name = device.get('name', None)
|
name = device.get('name', None)
|
||||||
urn = device.get('spec_type', None)
|
urn = device.get('spec_type', None)
|
||||||
model = device.get('model', None)
|
model = device.get('model', None)
|
||||||
if did is None or name is None or urn is None or model is None:
|
if did is None or name is None:
|
||||||
_LOGGER.error(
|
_LOGGER.info(
|
||||||
'get_device_list, cloud, invalid device, %s', device)
|
'invalid device, cloud, %s', device)
|
||||||
|
continue
|
||||||
|
if urn is None or model is None:
|
||||||
|
_LOGGER.info(
|
||||||
|
'missing the urn|model field, cloud, %s', device)
|
||||||
continue
|
continue
|
||||||
if did.startswith('miwifi.'):
|
if did.startswith('miwifi.'):
|
||||||
# All devices with did starting with "miwifi." are routers
|
# The miwifi.* routers defined SPEC functions, but none of them
|
||||||
# that interface between the Xiaomi home cloud and the Xiaomi
|
# were implemented.
|
||||||
# router cloud. These routers have all defined functions but
|
_LOGGER.info('ignore miwifi.* device, cloud, %s', did)
|
||||||
# have not been implemented, so they are all filtered out; some
|
|
||||||
# routers that are not "miwifi.*" also have this problem.
|
|
||||||
_LOGGER.info('ignore miwifi.* device, %s', did)
|
|
||||||
continue
|
continue
|
||||||
device_infos[did] = {
|
device_infos[did] = {
|
||||||
'did': did,
|
'did': did,
|
||||||
@ -642,7 +643,7 @@ class MIoTHttpClient:
|
|||||||
for did in dids:
|
for did in dids:
|
||||||
if did not in results:
|
if did not in results:
|
||||||
devices.pop(did, None)
|
devices.pop(did, None)
|
||||||
_LOGGER.error('get device info failed, %s', did)
|
_LOGGER.info('get device info failed, %s', did)
|
||||||
continue
|
continue
|
||||||
devices[did].update(results[did])
|
devices[did].update(results[did])
|
||||||
# Whether sub devices
|
# Whether sub devices
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user