-**skip_updates** (*Optional*, int): By default, all sensors of a modbus_controller are updated together. For data points that don't change very frequently, updates can be skipped. A value of 5 would only update this sensor range in every 5th update cycle. Note: The modbus_controller groups components by address ranges to reduce number of transactions. All components with the same starting address will be updated in one request. ``skip_updates`` applies for *all* components in the same range.
-**register_count** (*Optional*, int): The number of consecutive registers this read request should span or skip in a single command. Default is 1. See :ref:`modbus_register_count` for more details.
-**use_write_multiple** (*Optional*, boolean): By default the modbus command *Function Code 6 (Preset Single Registers)*
is used for setting the holding register if only one register is set. If your device only supports *Function Code 16 (Preset Multiple Registers)* set this option to ``true``.
- All other options from :ref:`Select <config-select>`.
..code-block:: yaml
# example
lambda: |-
ESP_LOGD("Reg1000", "Received value %lld", x);
ESP_LOGD("Reg1000", "Parsed from bytes 0x%x;0x%x", data[item->offset], data[item->offset + 1]);
if (x > 3) {
return std::string("Three");
}
Parameters passed into ``write_lambda``
---------------------------------------
-**x** (``const std::string&``): The option value to set for this Select.
-**value** (``int64_t``): The mapping value of ``x`` using ``optionsmap``.
-**payload** (``std::vector<uint16_t>& payload``): Empty vector for the payload. The lamdba can add
16 bit raw modbus register words which are send to the modbus device.
-**item** (``ModbusSelect*const``): The sensor object itself.
Possible return values for the lambda:
-``return <int64_t>;`` the value which should be written to the configured modbus registers. If there were data written to ``payload`` this value is ignored.
-``return {};`` Skip updating the register.
..code-block:: yaml
# example
write_lambda: |-
ESP_LOGD("Reg1000", "Set option to %s (%lld)", x.c_str(), value);