我在配置文件里添加了如下这段,使用的是有人云USR-232 modbus转tcp网关,但是在HA重启后依然没有面板展示,奇怪。
其中设备IP 192.168.0.7是根据有人官方在软件里写入网关的,虽然我在路由器里没找到这个地址被正确分配
modbus:
name: hub1
type: tcp
host: 192.168.0.7
port: 80
sensor:
- platform: modbus
scan_interval: 1
registers:
- name: "PM2.5"
hub: hub1
slave: 1
unit_of_measurement: ug/m
register: 0
precision: 1
scale: 1
- name: "PM10"
hub: hub1
slave: 1
unit_of_measurement: ug/m
register: 1
precision: 1
scale: 1
- name: "PM1.0"
hub: hub1
slave: 1
unit_of_measurement: ug/m
register: 2
precision: 1
scale: 1
|