mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-12 20:10:50 +01:00
Lint
This commit is contained in:
parent
d82ebd5d56
commit
bc748b834a
@ -92,16 +92,16 @@ Configuration options:
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The ID of the template cover.
|
||||
- **state** (*Optional*, :ref:`templatable <config-templatable>`):
|
||||
The state to publish. One of ``OPEN``, ``CLOSED``. If using a lambda, use ```COVER_OPEN``` or ```COVER_CLOSED```.
|
||||
The state to publish. One of ``OPEN``, ``CLOSED``. If using a lambda, use ``COVER_OPEN`` or ``COVER_CLOSED``.
|
||||
- **position** (*Optional*, :ref:`templatable <config-templatable>`, float):
|
||||
The position to publish, from 0.0 (CLOSED) to 1.0 (OPEN)
|
||||
- **current_operation** (*Optional*, :ref:`templatable <config-templatable>`, string):
|
||||
The current operation mode to publish. One of ``IDLE``, ``OPENING`` and ``CLOSING``. If using a lambda, use ```COVER_OPERATION_IDLE```, ```COVER_OPERATION_OPENING```, and ```COVER_OPERATION_CLOSING```.
|
||||
The current operation mode to publish. One of ``IDLE``, ``OPENING`` and ``CLOSING``. If using a lambda, use ``COVER_OPERATION_IDLE``, ``COVER_OPERATION_OPENING``, and ``COVER_OPERATION_CLOSING``.
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be written in lambdas:
|
||||
|
||||
L
|
||||
.. code-block:: cpp
|
||||
|
||||
id(template_cov).position = COVER_OPEN;
|
||||
|
@ -103,13 +103,6 @@ for f in sorted(Path('.').glob('**/*.rst')):
|
||||
"{}:{}".format(directive_name, num_indent, f, j+1))
|
||||
break
|
||||
|
||||
# Check line length
|
||||
for i, line in enumerate(lines):
|
||||
max_line_length = 160
|
||||
if len(line) > max_line_length:
|
||||
errors.append("Lines must not be longer than {} characters. Line {}:{} is {} "
|
||||
"characters long. Please insert newlines."
|
||||
"".format(max_line_length, f, i+1, len(line)))
|
||||
|
||||
for i, line in enumerate(lines):
|
||||
if esphome_io_regex.search(line):
|
||||
|
Loading…
Reference in New Issue
Block a user