Closed ChoOo7 closed 5 years ago
I have added the following debug :
# Go through config and find all addresses of zigate devices
_LOGGER.debug('ZIGATE : Finding zigate addresses')
for domain_config in config.keys():
if domain_config in COMPONENT_TYPES:
for platform_config in config[domain_config]:
_LOGGER.debug('mon debug')
_LOGGER.debug(platform_config)
if platform_config['platform'] == DOMAIN:
if 'address' in platform_config.keys():
zigate.add_known_device(str(platform_config['address'])[:6])
_LOGGER.debug('ZIGATE : All known addresses added')
2018-07-11 12:50:16 DEBUG (MainThread) [custom_components.zigate] mon debug 2018-07-11 12:50:16 DEBUG (MainThread) [custom_components.zigate] OrderedDict([('platform', 'yr')]) 2018-07-11 12:50:16 DEBUG (MainThread) [custom_components.zigate] mon debug 2018-07-11 12:50:16 DEBUG (MainThread) [custom_components.zigate] platform 2018-07-11 12:50:16 ERROR (MainThread) [homeassistant.setup] Error during setup of component zigate Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 143, in _async_setup_component hass, processed_config) File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro res = func(*args, **kw) File "/config/custom_components/zigate/init.py", line 67, in async_setup if platform_config['platform'] == DOMAIN: TypeError: string indices must be integers
A possible fix : if ( not isinstance(platform_config, str) ) and platform_config['platform'] == DOMAIN:
2018-07-11 12:26:10 ERROR (MainThread) [homeassistant.setup] Error during setup of component zigate Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 143, in _async_setup_component hass, processed_config) File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro res = func(*args, **kw) File "/config/custom_components/zigate/init.py", line 65, in async_setup if platform_config['platform'] == DOMAIN: TypeError: string indices must be integers
Home Assistant version 0.73.0b3
Running on docker with command : sudo docker run -d --name="home-assistant" -v /home/pi/home-assistant/config:/config -v /etc/localtime:/etc/localtime:ro --net=host --device=/dev/ttyUSB0:/dev/ttyUSB0 homeassistant/raspberrypi3-homeassistant
Configuration file ; cat config/configuration.yaml
Thanks for your help