<commit_before>"""
Support for Modbus sensors.

Configuration:
To use the Modbus sensors you will need to add something like the following to
your config/configuration.yaml

sensor:
    platform: modbus
    slave: 1
    registers:
        16:
            name: My integer sensor
            unit: C
        24:
            bits:
                0:
                    name: My boolean sensor
                2:
                    name: My other boolean sensor
    coils:
        0:
            name: My coil switch

VARIABLES:

    - "slave" = slave number (ignored and can be omitted if not serial Modbus)
    - "unit" = unit to attach to value (optional, ignored for boolean sensors)
    - "registers" contains a list of relevant registers to read from
      it can contain a "bits" section, listing relevant bits
    - "coils" contains a list of relevant coils to read from

    - each named register will create an integer sensor
    - each named bit will create a boolean sensor
"""

import logging<commit_msg>update header<commit_after>"""
homeassistant.components.modbus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for Modbus sensors.

Configuration:
To use the Modbus sensors you will need to add something like the following to
your config/configuration.yaml

sensor:
    platform: modbus
    slave: 1
    registers:
        16:
            name: My integer sensor
            unit: C
        24:
            bits:
                0:
                    name: My boolean sensor
                2:
                    name: My other boolean sensor
    coils:
        0:
            name: My coil switch

Variables:

slave
*Required
Slave number (ignored and can be omitted if not serial Modbus).

unit
*Required
Unit to attach to value (optional, ignored for boolean sensors).

registers
*Required
Contains a list of relevant registers to read from. It can contain a
"bits" section, listing relevant bits.

coils
*Optional
Contains a list of relevant coils to read from.

Note:
- Each named register will create an integer sensor.
- Each named bit will create a boolean sensor.
"""

import logging
{'fraction_non_alphanumeric': 0.06612749762131304, 'fraction_numerical': 0.007611798287345386, 'mean_word_length': 2.1911987860394535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5818985', 'n_tokens_mistral': 540, 'n_tokens_neox': 521, 'n_words': 258}