原来的配置:modbus: - type: tcp
host: 192.168.3.117
port: 8080
name: hub1
switch:
platform: modbus
scan_interval: 1
coils:
- name: Switch01
hub: hub1
slave: 1
coil: 0
- name: Switch02
hub: hub1
slave: 1
coil: 1
- name: Switch03
hub: hub1
slave: 1
coil: 2
- name: Switch04
hub: hub1
slave: 1
coil: 3
- name: Switch05
hub: hub1
slave: 1
coil: 4
- name: Switch06
hub: hub1
slave: 1
coil: 5
- name: Switch07
hub: hub1
slave: 1
coil: 6
- name: Switch08
hub: hub1
slave: 1
coil: 7
- name: Switch09
hub: hub1
slave: 1
coil: 8
- name: Switch10
hub: hub1
slave: 1
coil: 9
- name: Switch11
hub: hub1
slave: 1
coil: 10
- name: Switch12
hub: hub1
slave: 1
coil: 11
- name: Switch13
hub: hub1
slave: 1
coil: 12
- name: Switch14
hub: hub1
slave: 1
coil: 13
- name: Switch15
hub: hub1
slave: 1
coil: 14
- name: Switch16
hub: hub1
slave: 1
coil: 15
现在提示这个错误:
Logger: homeassistant.components.switch
Source: components/modbus/switch.py:25
Integration: 开关 ([color=var(--primary-color)]documentation, [color=var(--primary-color)]issues)
First occurred: 02:01:09 (1 occurrences)
Last logged: 02:01:09 Error while setting up modbus platform for switchTraceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/modbus/switch.py", line 25, in async_setup_platform for entry in discovery_info[CONF_SWITCHES]:TypeError: 'NoneType' object is not subscriptable
本人新手,求高手指教
|