n71154plus / Hitachi_smart_app

MIT License
46 stars 16 forks source link

Unexpected error fetching Hitachi Smart Application data: 'DataContainer' #6

Open chehaochang opened 3 years ago

chehaochang commented 3 years ago

你好,目前安裝並登入後,出現錯誤

Logger: custom_components.Hitachi_smart_app
Source: custom_components/Hitachi_smart_app/smarthome/__init__.py:109
Integration: Hitachi Smart App (documentation, issues)
First occurred: 17:03:54 (2 occurrences)
Last logged: 17:04:15

Unexpected error fetching Hitachi Smart Application data: 'DataContainer'
Traceback (most recent call last):
  File "/config/custom_components/Hitachi_smart_app/smarthome/__init__.py", line 30, in wrapper_call
    return await func(*args, **kwargs)
  File "/config/custom_components/Hitachi_smart_app/smarthome/__init__.py", line 109, in get_devices
    ContDID[device["Peripherals"][0]["DataContainer"][0]["ContDetails"][0]["ContDType"]]=device["Peripherals"][0]["DataContainer"][0]["ContDetails"][0]["ContDID"]
KeyError: 'DataContainer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/Hitachi_smart_app/smarthome/__init__.py", line 36, in wrapper_call
    return await func(*args, **kwargs)
  File "/config/custom_components/Hitachi_smart_app/smarthome/__init__.py", line 109, in get_devices
    ContDID[device["Peripherals"][0]["DataContainer"][0]["ContDetails"][0]["ContDType"]]=device["Peripherals"][0]["DataContainer"][0]["ContDetails"][0]["ContDID"]
KeyError: 'DataContainer'