mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-30 04:37:44 +02:00
Use a better id
This commit is contained in:
parent
1253896e68
commit
051c18e2b4
@ -112,7 +112,7 @@ You must set the ``address`` of the ``modbus_controller`` to the current address
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
esphome::modbus_controller::ModbusController *controller = id(epever);
|
esphome::modbus_controller::ModbusController *controller = id(pzem);
|
||||||
auto set_addr_cmd = esphome::modbus_controller::ModbusCommandItem::create_write_single_command(
|
auto set_addr_cmd = esphome::modbus_controller::ModbusCommandItem::create_write_single_command(
|
||||||
controller, 0x0002, new_address);
|
controller, 0x0002, new_address);
|
||||||
|
|
||||||
@ -122,23 +122,17 @@ You must set the ``address`` of the ``modbus_controller`` to the current address
|
|||||||
|
|
||||||
modbus:
|
modbus:
|
||||||
send_wait_time: 200ms
|
send_wait_time: 200ms
|
||||||
id: mod_bus_epever
|
id: mod_bus_pzem
|
||||||
|
|
||||||
modbus_controller:
|
modbus_controller:
|
||||||
- id: epever
|
- id: pzem
|
||||||
## the current device addr
|
## the current device addr
|
||||||
address: 0x1
|
address: 0x1
|
||||||
modbus_id: mod_bus_epever
|
modbus_id: mod_bus_pzem
|
||||||
command_throttle: 0ms
|
command_throttle: 0ms
|
||||||
setup_priority: -10
|
setup_priority: -10
|
||||||
update_interval: 30s
|
update_interval: 30s
|
||||||
|
|
||||||
uart:
|
|
||||||
rx_pin: GPIO16
|
|
||||||
tx_pin: GPIO17
|
|
||||||
baud_rate: 9600
|
|
||||||
stop_bits: 2
|
|
||||||
|
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
Loading…
Reference in New Issue
Block a user