Add documentation for images using URL (#3409)

This commit is contained in:
Jesse Hills 2023-11-24 08:10:39 +13:00 committed by GitHub
parent 0df31afcfd
commit a53fc6b37e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 12 deletions

View File

@ -678,6 +678,13 @@ Use this component to store graphical images on the device, you can then draw th
id: alert id: alert
resize: 80x80 resize: 80x80
.. code-block:: yaml
image:
- file: https://esphome.io/_images/logo.png
id: esphome_logo
resize: 200x162
Configuration variables: Configuration variables:
- **file** (**Required**, string): - **file** (**Required**, string):
@ -685,6 +692,7 @@ Configuration variables:
- **Local files**: The path (relative to where the .yaml file is) of the image file. - **Local files**: The path (relative to where the .yaml file is) of the image file.
- **Material Design Icons**: Specify the `Material Design Icon <https://pictogrammers.com/library/mdi/>`_ - **Material Design Icons**: Specify the `Material Design Icon <https://pictogrammers.com/library/mdi/>`_
id in the format ``mdi:icon-name``, and that icon will automatically be downloaded and added to the configuration. id in the format ``mdi:icon-name``, and that icon will automatically be downloaded and added to the configuration.
- **Remote files**: The URL of the image file.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the image later - **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the image later
in your display code. in your display code.

View File

@ -395,6 +395,7 @@ def lint_directive_formatting(fname, content):
include=["*.rst"], include=["*.rst"],
exclude=[ exclude=[
"components/web_server.rst", "components/web_server.rst",
"components/display/index.rst",
], ],
) )
def lint_esphome_io_link(fname, match): def lint_esphome_io_link(fname, match):