Hi all, I’m developing some modules where each of them needs an unique modbus ID. Due to easy module replacement (or initial configuration) would be perfect to have an option to set ID with f.i. dip switches. In that case, I’d like to check switches state during on_boot phase, calculate ID and populate this value to a global variable, and finally use it as a modbus controller’s address, like below. Unfortunately, it doesn’t compile with This option is not templatable!. Any chance to achieve this? Many thanks!
INFO Reading configuration .\x-CAN.yaml...
Failed config
modbus_controller: [source .\x-CAN.yaml:63]
- modbus_id: modbus_server
This option is not templatable!.
address: !lambda |-
return id(modbus_id).state;
server_registers: