06-15-2024, 09:22 PM
Hello,
If some one would be looking for the same thing, this is the part of yaml that works for me:
modbus:
id: modbus1
uart_id: mod_bus
modbus_controller:
- id: a8s
address: 0x01
modbus_id: modbus1
setup_priority: -10
update_interval: 5s
uart:
id: mod_bus
tx_pin: 33
rx_pin: 32
baud_rate: 9600
stop_bits: 1
parity: NONE
sensor:
- platform: modbus_controller
modbus_controller_id: a8s
name: "Box Temp"
id: modbus_temp
register_type: holding
address: 0
unit_of_measurement: "°C"
value_type: S_WORD
accuracy_decimals: 1
filters:
- lambda: return x / 10.0;
- platform: modbus_controller
modbus_controller_id: a8s
name: "Box Hum"
id: modbus_Hum
register_type: holding
address: 1
unit_of_measurement: "%"
value_type: S_WORD
accuracy_decimals: 1
filters:
- lambda: return x / 10.0;
If some one would be looking for the same thing, this is the part of yaml that works for me:
modbus:
id: modbus1
uart_id: mod_bus
modbus_controller:
- id: a8s
address: 0x01
modbus_id: modbus1
setup_priority: -10
update_interval: 5s
uart:
id: mod_bus
tx_pin: 33
rx_pin: 32
baud_rate: 9600
stop_bits: 1
parity: NONE
sensor:
- platform: modbus_controller
modbus_controller_id: a8s
name: "Box Temp"
id: modbus_temp
register_type: holding
address: 0
unit_of_measurement: "°C"
value_type: S_WORD
accuracy_decimals: 1
filters:
- lambda: return x / 10.0;
- platform: modbus_controller
modbus_controller_id: a8s
name: "Box Hum"
id: modbus_Hum
register_type: holding
address: 1
unit_of_measurement: "%"
value_type: S_WORD
accuracy_decimals: 1
filters:
- lambda: return x / 10.0;