:description:Instructions for setting up a modbus_controller modbus text sensor.
The ``modbus_controller`` sensor platform creates a text sensor from a modbus_controller component
and requires :doc:`/components/modbus_controller` to be configured.
Configuration variables:
------------------------
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
-**name** (**Required**, string): The name of the sensor.
-**register_type** (**Required**): type of the modbus register.
- coil: coils are also called discrete outout. Coils are 1-bit registers (on/off values) that are used to control discrete outputs. Read and Write access
- discrete_input: discrete input register (read only coil) are similar to coils but can only be read.
- holding: Holding Registers - Holding registers are the most universal 16-bit register. Read and Write access
- read: Read Input Registers - registers are 16-bit registers used for input, and may only be read
-**address**: (**Required**, int): start address of the first register in a range
-**skip_updates**: (*Optional*, int): By default all sensors of 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
-**response_size**: (**Required**): Number of bytes of the response
-**raw_encode**: (*Optional*, enum) If the response is binary it can't be published directly. Since a text sensor only publishes strings the binary data can be encoded
-**force_new_range**: (*Optional*, boolean): If possible sensors with sequential addresses are grouped together and requested in one range. Setting `foce_new_range: true` enforces the start of a new range at that address.
-**custom_data** (*Optional*, list of bytes): raw bytes for modbus command. This allows using non-standard commands. If ``custom_data`` is used ``address`` and ``register_type`` can't be used.
offset from start address in bytes. If more than one register is read a modbus read registers command this value is used to find the start of this datapoint relative to start address. The component calculates the size of the range based on offset and size of the value type
note: because the response contains data for all registers in the same range you have to use ``data[item->offset]`` to get the first response byte for your sensor.