Merge pull request #4156 from esphome/bump-2024.8.0b1

2024.8.0b1
This commit is contained in:
Jesse Hills 2024-08-15 07:50:58 +12:00 committed by GitHub
commit 538fdb6747
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
106 changed files with 4263 additions and 166 deletions

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 2024.7.3
PROJECT_NUMBER = 2024.8.0b1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@ -1,5 +1,5 @@
ESPHOME_PATH = ../esphome
ESPHOME_REF = 2024.7.3
ESPHOME_REF = 2024.8.0b1
PAGEFIND_VERSION=1.1.0
PAGEFIND=pagefind
NET_PAGEFIND=../pagefindbin/pagefind

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -1 +1 @@
2024.7.3
2024.8.0b1

269
changelog/2024.8.0.rst Normal file
View File

@ -0,0 +1,269 @@
ESPHome 2024.8.0 - 21st August 2024
===================================
.. seo::
:description: Changelog for ESPHome 2024.8.0.
:image: /_static/changelog-2024.8.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 3
LVGL Graphics, components/lvgl/index, lvgl.png
Online Image, components/online_image, image-sync-outline.svg, dark-invert
APDS9306, components/sensor/apds9306, apds9306.png
Home Assistant Number, components/number/homeassistant, home-assistant.svg, dark-invert
Home Assistant Switch, components/switch/homeassistant, home-assistant.svg, dark-invert
BME68x via BSEC2, components/sensor/bme68x_bsec2, bme680.jpg
M5Stack Unit 8 Angle, components/sensor/m5stack_8angle, m5stack_8angle.png
LYWSD02MMC, components/sensor/xiaomi_ble.html#lywsd02mmc, xiaomi_mijia_logo.jpg
Light and Versitile Embedded Graphics Library
---------------------------------------------
Or LVGL for short, has been worked on by :ghuser:`clydebarrow` (and multiple other users doing testing and documentation etc)
for quite some time now and is finally ready for releasing this month. It is a very powerful graphics library that
is able to be configured almost completely in YAML (There are some places that will require lambdas/c++).
The :doc:`documentation </components/lvgl/index>` is very extensive and hopefully we see
some awesome dashboards being made with it.
Online Image
------------
The new :doc:`online_image </components/online_image>` component allows your ESPHome device to download
images from the internet while it is running and show them on your display. This can also be combined with the new LVGL
component to show dynamic images for your dashboard.
Home Assistant Switch & Number
------------------------------
New platforms have been aded for ``switch`` and ``number`` to allow importing of state and controlling
of switches and numbers that exist in Home Assistant (or another device via Home Assistant).
This greatly simplifies controlling remote entities and will hopefully be extended to other platforms.
Thank you for your support
--------------------------
We would like to thank all Home Assistant Cloud subscribers for their support. It allows `Nabu Casa <https://nabucasa.com/>`__ to
employ two developers to maintain and further develop the ESPHome project.
Full list of changes
--------------------
New Features
^^^^^^^^^^^^
- [update] Implement ``update.perform`` action and ``update.is_available`` condition :esphomepr:`7165` by :ghuser:`jesserockz` (new-feature)
New Components
^^^^^^^^^^^^^^
- Feature/m5angle8: Add support for m5angle8 input device :esphomepr:`6799` by :ghuser:`rnauber` (new-integration)
- APDS9306 Ambient Light Sensor :esphomepr:`6709` by :ghuser:`aodrenah` (new-integration)
- [lvgl] base implementation :esphomepr:`7116` by :ghuser:`clydebarrow` (new-integration)
- Add runtime online image support :esphomepr:`4710` by :ghuser:`guillempages` (new-integration)
- [bme68x_bsec2_i2c] BME68X Temperature+Pressure+Humidity+Gas Sensor via BSEC2 :esphomepr:`4585` by :ghuser:`neffs` (new-integration)
- Add support for LYWSD02MMC Xiaomi device :esphomepr:`7080` by :ghuser:`juanluss31` (new-integration)
New Platforms
^^^^^^^^^^^^^
- [homeassistant] Native switch entity import and control :esphomepr:`7018` by :ghuser:`Links2004` (new-platform)
- [homeassistant] Native number entity import and control :esphomepr:`6455` by :ghuser:`landonr` (new-platform)
- Correct offset calibration :esphomepr:`7228` by :ghuser:`descipher` (new-platform)
Breaking Changes
^^^^^^^^^^^^^^^^
- Remove deprecated argument parser :esphomepr:`7151` by :ghuser:`jesserockz` (breaking-change)
All changes
^^^^^^^^^^^
- [wifi] Fix EAP for IDF 5.1+, add test :esphomepr:`7061` by :ghuser:`kbx81`
- jsn_sr04t component: AJ_SR04M compatibility mode in checksum calculation :esphomepr:`7044` by :ghuser:`soeffi`
- [CI] compile entire web_server during tests :esphomepr:`7084` by :ghuser:`tomaszduda23`
- [CI] Add more ``improv_serial`` tests :esphomepr:`7081` by :ghuser:`kbx81`
- Bump docker/build-push-action from 6.3.0 to 6.4.0 in /.github/actions/build-image :esphomepr:`7089` by :ghuser:`dependabot[bot]`
- [CI] add web_server v1 test :esphomepr:`7090` by :ghuser:`tomaszduda23`
- [wifi] Hostname may not be set as expected on Arduino platform :esphomepr:`7050` by :ghuser:`NewoPL`
- Add host uart support for MacOS :esphomepr:`7095` by :ghuser:`clydebarrow`
- Bump docker/build-push-action from 6.4.0 to 6.4.1 in /.github/actions/build-image :esphomepr:`7102` by :ghuser:`dependabot[bot]`
- [code-quality] Add some ruff configuration :esphomepr:`7103` by :ghuser:`jesserockz`
- [web_server] move v1 code to separate file :esphomepr:`7091` by :ghuser:`tomaszduda23`
- [validation] Add ``host`` to ``require_framework_version`` :esphomepr:`7107` by :ghuser:`jesserockz`
- [code-quality] Tidy up some duplicate CONFIG_SCHEMA assignments :esphomepr:`7106` by :ghuser:`jesserockz`
- Move MQTT ip discovery to deticated config option. :esphomepr:`6673` by :ghuser:`Links2004`
- Feature/m5angle8: Add support for m5angle8 input device :esphomepr:`6799` by :ghuser:`rnauber` (new-integration)
- use cache to build tests for compoenents :esphomepr:`7059` by :ghuser:`tomaszduda23`
- [modbus_controller] Add on_command_sent trigger :esphomepr:`7078` by :ghuser:`leejoow`
- [ili9xxx] Rework delay handling :esphomepr:`7115` by :ghuser:`clydebarrow`
- Inherit `esp32_ble_beacon` from `esp32_ble` :esphomepr:`6908` by :ghuser:`jpbede`
- APDS9306 Ambient Light Sensor :esphomepr:`6709` by :ghuser:`aodrenah` (new-integration)
- Bump docker/build-push-action from 6.4.1 to 6.5.0 in /.github/actions/build-image :esphomepr:`7119` by :ghuser:`dependabot[bot]`
- Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 :esphomepr:`7120` by :ghuser:`dependabot[bot]`
- Bump docker/login-action from 3.2.0 to 3.3.0 :esphomepr:`7121` by :ghuser:`dependabot[bot]`
- Bump docker/setup-buildx-action from 3.4.0 to 3.5.0 :esphomepr:`7122` by :ghuser:`dependabot[bot]`
- [fan] fix initial FanCall to properly set speed :esphomepr:`7113` by :ghuser:`kr0ner`
- Added ruff to pre-commit hooks :esphomepr:`7124` by :ghuser:`clydebarrow`
- Update webserver local assets to 20240724-013115 :esphomepr:`7126` by :ghuser:`esphomebot`
- [http_request] Allow configure buffer size on ESP-IDF :esphomepr:`7125` by :ghuser:`dentra`
- Give more info on import errors. :esphomepr:`7128` by :ghuser:`clydebarrow`
- [lvgl] base implementation :esphomepr:`7116` by :ghuser:`clydebarrow` (new-integration)
- Bump aioesphomeapi to 24.6.2 and cryptography to 43.0.0 :esphomepr:`7131` by :ghuser:`bdraco`
- [dependabot] Group docker action bumps into single PR :esphomepr:`7133` by :ghuser:`jesserockz`
- Add ``--version`` handler to cli :esphomepr:`7150` by :ghuser:`jesserockz`
- [code-quality] Organise ethernet related imports :esphomepr:`7152` by :ghuser:`jesserockz`
- [code-quality] Organise wifi related imports :esphomepr:`7153` by :ghuser:`jesserockz`
- [code-quality] Organise core imports :esphomepr:`7149` by :ghuser:`jesserockz`
- Remove deprecated argument parser :esphomepr:`7151` by :ghuser:`jesserockz` (breaking-change)
- Move ``CONF_ON_ERROR`` to const.py :esphomepr:`7156` by :ghuser:`jesserockz`
- [code-quality] Organise esp32 imports :esphomepr:`7154` by :ghuser:`jesserockz`
- Add microAmp and milliAmp to defined units :esphomepr:`7157` by :ghuser:`FreeBear-nc`
- Bump docker/setup-buildx-action from 3.5.0 to 3.6.1 in the docker-actions group :esphomepr:`7159` by :ghuser:`dependabot[bot]`
- LVGL stage 2 :esphomepr:`7129` by :ghuser:`clydebarrow`
- [pid] Add get_min_integral() and get_max_integral() :esphomepr:`7162` by :ghuser:`FreeBear-nc`
- [code-quality] Organise bluetooth related imports :esphomepr:`7155` by :ghuser:`jesserockz`
- http_request watchdog as a component :esphomepr:`7161` by :ghuser:`oarcher` (new-integration)
- [touchscreen] Allow binary sensor to have multiple pages in config :esphomepr:`7112` by :ghuser:`jesserockz`
- [matrix_keypad] Add `pin->setup()` to rows and cols :esphomepr:`7163` by :ghuser:`AAllport`
- [update] Implement ``update.perform`` action and ``update.is_available`` condition :esphomepr:`7165` by :ghuser:`jesserockz` (new-feature)
- [lvgl] PR stage 3 :esphomepr:`7160` by :ghuser:`clydebarrow`
- [api] ``homeassistant.action`` replaces ``homeassistant.service`` :esphomepr:`7171` by :ghuser:`jesserockz`
- ade7953_spi wrong size specified in read_array call :esphomepr:`7172` by :ghuser:`SimoPk`
- Bump improv library to 1.2.4 :esphomepr:`7174` by :ghuser:`jesserockz`
- Implement 'round to nearest multiple' filter :esphomepr:`7142` by :ghuser:`MrEbbinghaus`
- git ignore managed_components :esphomepr:`7180` by :ghuser:`oarcher`
- [core] Eliminate nuisance messages from `build_codeowners` :esphomepr:`7185` by :ghuser:`clydebarrow`
- [code-quality] More portable shebangs :esphomepr:`7189` by :ghuser:`jesserockz`
- Add support for doing update entity refresh/check via API. :esphomepr:`7190` by :ghuser:`jesserockz`
- [lvgl] Stage 4 :esphomepr:`7166` by :ghuser:`clydebarrow`
- [esp32_improv] Update Improv library to reference new repo/version :esphomepr:`7195` by :ghuser:`kahrendt`
- hydreon_rgxx: Fix parsing of data line :esphomepr:`7192` by :ghuser:`domob1812`
- Remove outdated version block :esphomepr:`7177` by :ghuser:`tomaszduda23`
- [lvgl] Stage 5 :esphomepr:`7191` by :ghuser:`clydebarrow`
- socket: socket::set_sockaddr() for IPv4 addresses in IPv6 builds :esphomepr:`7196` by :ghuser:`dwmw2`
- Adds MQTT component to Alarm Control panel component :esphomepr:`7188` by :ghuser:`heythisisnate`
- [lvgl] Final stage :esphomepr:`7184` by :ghuser:`clydebarrow` (new-integration)
- Move ``CONF_BACKGROUND_COLOR`` and ``CONF_FOREGROUND_COLOR`` to const.py :esphomepr:`7202` by :ghuser:`jesserockz`
- [helpers] Set default flags of ExternalRAMAllocator to ALLOW_FAILURE :esphomepr:`7201` by :ghuser:`jesserockz`
- Add runtime online image support :esphomepr:`4710` by :ghuser:`guillempages` (new-integration)
- Update i2s_audio_speaker.cppi2s_audio/speaker: Fix fallthrough compiler warning :esphomepr:`7167` by :ghuser:`Mimoja`
- Move CONF_ITEMS/CONF_FONT/CONF_TEXT to const.py :esphomepr:`7204` by :ghuser:`jesserockz`
- [lvgl] Fix compile error when using encoder with buttons only. :esphomepr:`7203` by :ghuser:`clydebarrow`
- Revert "Add null GPIO pin " :esphomepr:`6621` by :ghuser:`jesserockz`
- [remote_transmitter] Change default carrier_frequency to valid value :esphomepr:`7176` by :ghuser:`iannisimo`
- [code-quality] Organise script imports :esphomepr:`7198` by :ghuser:`jesserockz`
- [max31856] Use cv.frequency as validator :esphomepr:`7212` by :ghuser:`jesserockz`
- [code-quality] Organise base entities imports :esphomepr:`7208` by :ghuser:`tomaszduda23`
- [spi] Remove ``SPIDelegateDummy`` :esphomepr:`7215` by :ghuser:`jesserockz`
- [code-quality] Apply ruff linting suggestions :esphomepr:`7206` by :ghuser:`tomaszduda23`
- [code-quality] Organise logger imports :esphomepr:`7205` by :ghuser:`tomaszduda23`
- [code-quality] Apply ruff linting suggestions to core :esphomepr:`7207` by :ghuser:`tomaszduda23`
- [code-quality] fix clang-tidy sprinkler :esphomepr:`7222` by :ghuser:`tomaszduda23`
- [code-quality] __attribute__((packed)) :esphomepr:`7221` by :ghuser:`tomaszduda23`
- hx711: Check for DOUT going high after a reading :esphomepr:`7214` by :ghuser:`dwmw2`
- [mqtt] Add extended device info :esphomepr:`7194` by :ghuser:`dentra`
- [code-quality] NOLINT readability-identifier-naming :esphomepr:`7220` by :ghuser:`tomaszduda23`
- [code-quality] Organise time imports :esphomepr:`7219` by :ghuser:`tomaszduda23`
- [lvgl] Fix set state on updates :esphomepr:`7227` by :ghuser:`clydebarrow`
- add missing override :esphomepr:`7231` by :ghuser:`tomaszduda23`
- Add text_align_to_string :esphomepr:`7243` by :ghuser:`MrMDavidson`
- [sml] Fixed crashing sml parser :esphomepr:`7235` by :ghuser:`eNBeWe`
- Allow project name and version as improv_serial identity :esphomepr:`7248` by :ghuser:`AzonInc`
- [lvgl] Implement default group for encoders :esphomepr:`7242` by :ghuser:`clydebarrow`
- [bme68x_bsec2_i2c] BME68X Temperature+Pressure+Humidity+Gas Sensor via BSEC2 :esphomepr:`4585` by :ghuser:`neffs` (new-integration)
- [code-quality] clang-tidy media_player :esphomepr:`7238` by :ghuser:`tomaszduda23`
- Bump docker/build-push-action from 6.5.0 to 6.6.1 in /.github/actions/build-image :esphomepr:`7232` by :ghuser:`dependabot[bot]`
- fix build error :esphomepr:`7229` by :ghuser:`tomaszduda23`
- adjust to new python pre-commit hooks :esphomepr:`7178` by :ghuser:`tomaszduda23`
- add windows script/setup.bat :esphomepr:`7140` by :ghuser:`nielsnl68`
- [code-quality] add NOLINT haier_base :esphomepr:`7236` by :ghuser:`tomaszduda23`
- [code-quality] clang-tidy bedjet :esphomepr:`7251` by :ghuser:`tomaszduda23`
- fix name conflict with zephyr macro :esphomepr:`7252` by :ghuser:`tomaszduda23`
- [code-quality] Apply ruff linting suggestions :esphomepr:`7239` by :ghuser:`tomaszduda23`
- Add support for LYWSD02MMC Xiaomi device :esphomepr:`7080` by :ghuser:`juanluss31` (new-integration)
- [code-quality] fix clang-tidy web server :esphomepr:`7230` by :ghuser:`tomaszduda23`
- [test][web_server] Rejig test for v3 :esphomepr:`7110` by :ghuser:`RFDarter`
- [api] Error log when NONE Update command is sent :esphomepr:`7247` by :ghuser:`oarcher`
- [api] Add new flag to request state/attribute once from HA only :esphomepr:`7258` by :ghuser:`jesserockz`
- [homeassistant] Add ``HOME_ASSISTANT_IMPORT_CONTROL_SCHEMA`` :esphomepr:`7259` by :ghuser:`jesserockz`
- [const] Add some units for future use and adjust case :esphomepr:`7260` by :ghuser:`nkinnan`
- [online_image] add option to show placeholder while downloading :esphomepr:`7083` by :ghuser:`guillempages`
- [lvgl] Add initial_focus for encoders :esphomepr:`7256` by :ghuser:`clydebarrow`
- [code-quality] fix order in esphome/const.py :esphomepr:`7267` by :ghuser:`tomaszduda23`
- [code-quality] fix clang-tidy network :esphomepr:`7266` by :ghuser:`tomaszduda23`
- [code-quality] fix clang-tidy core optional :esphomepr:`7265` by :ghuser:`tomaszduda23`
- [code-quality] Fix variable naming in base_light_effects :esphomepr:`7237` by :ghuser:`tomaszduda23`
- [code-quality] fix clang-tidy mqtt :esphomepr:`7253` by :ghuser:`tomaszduda23`
- [code-quality] fix clang-tidy wifi related :esphomepr:`7254` by :ghuser:`tomaszduda23`
- Bump docker/build-push-action from 6.6.1 to 6.7.0 in /.github/actions/build-image :esphomepr:`7269` by :ghuser:`dependabot[bot]`
- [CI] Dont run full CI on ``build-image`` action changes :esphomepr:`7270` by :ghuser:`jesserockz`
- Implement ByteBuffer :esphomepr:`6878` by :ghuser:`clydebarrow`
- Add min and max brightness parameters for Light dim_relative Action :esphomepr:`6971` by :ghuser:`PaoloTK`
- [homeassistant] Native switch entity import and control :esphomepr:`7018` by :ghuser:`Links2004` (new-platform)
- [homeassistant] Native number entity import and control :esphomepr:`6455` by :ghuser:`landonr` (new-integration)
- [lvgl] Rework events to avoid feedback loops :esphomepr:`7262` by :ghuser:`clydebarrow`
- Add `color_filter_opa` style property :esphomepr:`7276` by :ghuser:`clydebarrow`
- [code-quality] fix clang-tidy wake_on_lan :esphomepr:`7275` by :ghuser:`tomaszduda23`
- [code-quality] fix readability-braces-around-statements :esphomepr:`7273` by :ghuser:`tomaszduda23`
- [mqtt] fix missing initializer in MQTTClientComponent::disable_discovery :esphomepr:`7271` by :ghuser:`oarcher`
- [code-quality] fix readability-named-parameter :esphomepr:`7272` by :ghuser:`tomaszduda23`
- support illuminance for airthings wave plus device :esphomepr:`5203` by :ghuser:`MadMonkey87`
- [micro_wake_word] Bump ESPMicroSpeechFeatures version to 1.1.0 :esphomepr:`7249` by :ghuser:`kahrendt`
- Implement the finish() method and action. implement the is_stopped condition :esphomepr:`7255` by :ghuser:`nielsnl68`
- Correct offset calibration :esphomepr:`7228` by :ghuser:`descipher` (new-integration)
Past Changelogs
---------------
- :doc:`2024.7.0`
- :doc:`2024.6.0`
- :doc:`2024.5.0`
- :doc:`2024.4.0`
- :doc:`2024.3.0`
- :doc:`2024.2.0`
- :doc:`2023.12.0`
- :doc:`2023.11.0`
- :doc:`2023.10.0`
- :doc:`2023.9.0`
- :doc:`2023.8.0`
- :doc:`2023.7.0`
- :doc:`2023.6.0`
- :doc:`2023.5.0`
- :doc:`2023.4.0`
- :doc:`2023.3.0`
- :doc:`2023.2.0`
- :doc:`2022.12.0`
- :doc:`2022.11.0`
- :doc:`2022.10.0`
- :doc:`2022.9.0`
- :doc:`2022.8.0`
- :doc:`2022.6.0`
- :doc:`2022.5.0`
- :doc:`2022.4.0`
- :doc:`2022.3.0`
- :doc:`2022.2.0`
- :doc:`2022.1.0`
- :doc:`2021.12.0`
- :doc:`2021.11.0`
- :doc:`2021.10.0`
- :doc:`2021.9.0`
- :doc:`2021.8.0`
- :doc:`v1.20.0`
- :doc:`v1.19.0`
- :doc:`v1.18.0`
- :doc:`v1.17.0`
- :doc:`v1.16.0`
- :doc:`v1.15.0`
- :doc:`v1.14.0`
- :doc:`v1.13.0`
- :doc:`v1.12.0`
- :doc:`v1.11.0`
- :doc:`v1.10.0`
- :doc:`v1.9.0`
- :doc:`v1.8.0`
- :doc:`v1.7.0`

View File

@ -2,7 +2,7 @@ Changelog
=========
.. redirect::
:url: /changelog/2024.7.0.html
:url: /changelog/2024.8.0.html
.. toctree::
:glob:

View File

@ -23,7 +23,7 @@ It's release day! 🎉 Today I'm happy to release ESPHome 1.12.0. What's new? A
stuff got added! Let me walk you through it:
Before 1.12, it was only possible to transfer data from ESPHome to Home Assistant (with the
``homeassistant.service`` call). With 1.12 you get :ref:`User-defined services <api-services>`,
``homeassistant.service`` call). With 1.12 you get :ref:`User-defined services <api-device-actions>`,
just define a service in your ESPHome file and call it like any other service from HA. All the
rest (like variables, data validation, etc) are handled automatically!

View File

@ -50,6 +50,7 @@ Configuration variables:
- **on_chime** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when a zone has been marked as chime in the configuration, and it changes from closed to open.
See :ref:`alarm_control_panel_on_chime_trigger`.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
- If Webserver enabled, ``web_server_sorting_weight`` can be set. See :ref:`Webserver Entity Sorting <config-webserver-sorting>`.

View File

@ -60,7 +60,7 @@ Configuration variables:
document.getElementById("api-key").value = bytesArrToBase64(array);
</script>
- **services** (*Optional*, list): A list of user-defined services. See :ref:`api-services`.
- **actions** (*Optional*, list): A list of user-defined actions. See :ref:`api-device-actions`.
- **reboot_timeout** (*Optional*, :ref:`config-time`): The amount of time to wait before rebooting when no
client connects to the API. This is needed because sometimes the low level ESP functions report that
the ESP is connected to the network, when in fact it is not - only a full reboot fixes it.
@ -79,7 +79,7 @@ Actions
-------
Before using any of the actions below, you'll need to tell Home Assistant to allow your device to
make service calls.
perform actions.
Open the ESPHome integration page on your Home Assistant instance:
@ -91,7 +91,7 @@ Then:
#. Find your device in the device list
#. Click the "configure" button next to it
#. Check the "Allow the device to make Home Assistant service calls" box
#. Check the "Allow the device to perform Home Assistant actions" box
#. Then click "submit".
.. _api-homeassistant_event_action:
@ -102,7 +102,7 @@ Then:
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to perform actions.
When using the native API with Home Assistant, you can create events in the Home Assistant event bus
straight from ESPHome :ref:`Automations <automation>`.
@ -127,31 +127,30 @@ Configuration variables:
- **variables** (*Optional*, mapping): Optional variables that can be used in the ``data_template``.
Values are :ref:`lambdas <config-lambda>` and will be evaluated before sending the request.
.. _api-homeassistant_service_action:
.. _api-homeassistant_action-action:
``homeassistant.service`` Action
``homeassistant.action`` Action
********************************
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to perform actions.
When using the native API with Home Assistant, you can create Home Assistant service
calls straight from ESPHome :ref:`Automations <automation>`.
When using the native API with Home Assistant, you can perform Home Assistant actions straight from ESPHome :ref:`Automations <automation>`.
.. code-block:: yaml
# In some trigger
on_...:
# Simple
- homeassistant.service:
service: notify.html5
- homeassistant.action:
action: notify.html5
data:
message: Button was pressed
# With templates and variables
- homeassistant.service:
service: notify.html5
- homeassistant.action:
action: notify.html5
data:
title: New Humidity
data_template:
@ -163,10 +162,10 @@ calls straight from ESPHome :ref:`Automations <automation>`.
Configuration variables:
````````````````````````
- **service** (**Required**, string): The Home Assistant `Service <https://www.home-assistant.io/docs/scripts/service-calls/>`__
to call.
- **data** (*Optional*, mapping): Optional *static* data to pass along with the service call.
- **data_template** (*Optional*, mapping): Optional template data to pass along with the service call.
- **action** (**Required**, string): The Home Assistant `Action <https://www.home-assistant.io/docs/scripts/service-calls/>`__
to perform.
- **data** (*Optional*, mapping): Optional *static* data to perform the action with.
- **data_template** (*Optional*, mapping): Optional template data to perform the action with.
This is evaluated on the Home Assistant side with Home Assistant's templating engine.
- **variables** (*Optional*, mapping): Optional variables that can be used in the ``data_template``.
Values are :ref:`lambdas <config-lambda>` and will be evaluated before sending the request.
@ -182,7 +181,7 @@ the parameters in plain format.
set_light_rgb:
alias: 'ESPHome RGB light set'
sequence:
- service: light.turn_on
- action: light.turn_on
data_template:
entity_id: '{{ light_name }}'
rgb_color:
@ -196,8 +195,8 @@ Then, in ESPHome:
# In some trigger
on_...:
- homeassistant.service:
service: script.set_light_rgb
- homeassistant.action:
action: script.set_light_rgb
data:
light_name: 'my_light'
red: '255'
@ -212,7 +211,7 @@ Then, in ESPHome:
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to make action calls.
When using the native API with Home Assistant, you can push tag_scanned to Home Assistant
straight from ESPHome :ref:`Automations <automation>`.
@ -289,27 +288,27 @@ if logs are shown remotely.
then:
- logger.log: API is connected!
.. _api-services:
.. _api-device-actions:
User-defined Services
---------------------
User-defined Actions
--------------------
It is also possible to get data from Home Assistant to ESPHome with user-defined services.
When you declare services in your ESPHome YAML file, they will automatically show up in
It is also possible to get data from Home Assistant to ESPHome with user-defined actions.
When you declare actions in your ESPHome YAML file, they will automatically show up in
Home Assistant and you can call them directly.
.. code-block:: yaml
# Example configuration entry
api:
services:
- service: start_laundry
actions:
- action: start_laundry
then:
- switch.turn_on: relay
- delay: 3h
- switch.turn_off: relay
For example with the configuration seen above, after uploading you will see a service
For example with the configuration seen above, after uploading you will see an action
called ``esphome.livingroom_start_laundry`` (livingroom is the node name) which you can
then call.
@ -319,8 +318,8 @@ Additionally, you can also transmit data from Home Assistant to ESPHome with thi
# Example configuration entry
api:
services:
- service: start_effect
actions:
- action: start_effect
variables:
my_brightness: int
my_effect: string
@ -331,18 +330,18 @@ Additionally, you can also transmit data from Home Assistant to ESPHome with thi
effect: !lambda 'return my_effect;'
Using the ``variables`` key you can tell ESPHome which variables to expect from Home Assistant.
For example the service seen above would be executed with something like this:
For example the action seen above would be executed with something like this:
.. code-block:: yaml
# Example Home Assistant Service Call
service: esphome.livingroom_start_effect
# Example Home Assistant Action
action: esphome.livingroom_start_effect
data_template:
my_brightness: "{{ states.brightness.state }}"
my_effect: "Rainbow"
Then each variable you define in the ``variables`` section is accessible in the automation
triggered by the user-defined service through the name you gave it in the variables section
triggered by the user-defined action through the name you gave it in the variables section
(note: this is a local variable, so do not wrap it in ``id(...)`` to access it).
There are currently 4 types of variables:

View File

@ -0,0 +1,39 @@
LVGL Binary Sensor
==================
.. seo::
:description: Instructions for setting up an LVGL widget binary sensor.
:image: ../images/lvgl_c_bns.png
The ``lvgl`` binary sensor platform creates a binary sensor from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widget is :ref:`lvgl-widget-button`. A single binary sensor supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome binary sensor component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the binary sensor.
- All other variables from :ref:`Binary Sensor <config-binary_sensor>`.
Example:
.. code-block:: yaml
binary_sensor:
- platform: lvgl
widget: btn_id
name: LVGL push button
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Button widget <lvgl-widget-button>`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

View File

@ -459,8 +459,8 @@ Secure connection with a dynamically generated passkey:
.. code-block:: yaml
api:
services:
- service: passkey_reply
actions:
- action: passkey_reply
variables:
passkey: int
then:
@ -468,7 +468,7 @@ Secure connection with a dynamically generated passkey:
- ble_client.passkey_reply:
id: my_ble_client
passkey: !lambda return passkey;
- service: numeric_comparison_reply
- action: numeric_comparison_reply
variables:
accept: bool
then:

View File

@ -345,19 +345,19 @@ Sample code
logger.log: 'Playback finished event'
api:
services:
- service: dfplayer_next
actions:
- action: dfplayer_next
then:
- dfplayer.play_next:
- service: dfplayer_previous
- action: dfplayer_previous
then:
- dfplayer.play_previous:
- service: dfplayer_play
- action: dfplayer_play
variables:
file: int
then:
- dfplayer.play: !lambda 'return file;'
- service: dfplayer_play_loop
- action: dfplayer_play_loop
variables:
file: int
loop_: bool
@ -365,7 +365,7 @@ Sample code
- dfplayer.play:
file: !lambda 'return file;'
loop: !lambda 'return loop_;'
- service: dfplayer_play_folder
- action: dfplayer_play_folder
variables:
folder: int
file: int
@ -374,7 +374,7 @@ Sample code
folder: !lambda 'return folder;'
file: !lambda 'return file;'
- service: dfplayer_play_loop_folder
- action: dfplayer_play_loop_folder
variables:
folder: int
then:
@ -382,54 +382,54 @@ Sample code
folder: !lambda 'return folder;'
loop: true
- service: dfplayer_set_device_tf
- action: dfplayer_set_device_tf
then:
- dfplayer.set_device: TF_CARD
- service: dfplayer_set_device_usb
- action: dfplayer_set_device_usb
then:
- dfplayer.set_device: USB
- service: dfplayer_set_volume
- action: dfplayer_set_volume
variables:
volume: int
then:
- dfplayer.set_volume: !lambda 'return volume;'
- service: dfplayer_set_eq
- action: dfplayer_set_eq
variables:
preset: int
then:
- dfplayer.set_eq: !lambda 'return static_cast<dfplayer::EqPreset>(preset);'
- service: dfplayer_sleep
- action: dfplayer_sleep
then:
- dfplayer.sleep
- service: dfplayer_reset
- action: dfplayer_reset
then:
- dfplayer.reset
- service: dfplayer_start
- action: dfplayer_start
then:
- dfplayer.start
- service: dfplayer_pause
- action: dfplayer_pause
then:
- dfplayer.pause
- service: dfplayer_stop
- action: dfplayer_stop
then:
- dfplayer.stop
- service: dfplayer_random
- action: dfplayer_random
then:
- dfplayer.random
- service: dfplayer_volume_up
- action: dfplayer_volume_up
then:
- dfplayer.volume_up
- service: dfplayer_volume_down
- action: dfplayer_volume_down
then:
- dfplayer.volume_down

View File

@ -8,14 +8,25 @@ Display Component
The ``display`` component houses ESPHome's powerful rendering and display
engine. Fundamentally, there are these types of displays:
- Text based displays like :doc:`7-Segment displays <max7219>` or
- Character displays like :doc:`7-Segment displays <max7219>` or
:doc:`LCD displays <lcd_display>`.
- Graphical serial displays like :doc:`nextion` that have their own processors for rendering.
- Serial displays like :doc:`nextion` that have their own processors for graphics rendering.
- Graphical binary displays which can toggle ON/OFF any pixel, like :doc:`E-Paper <waveshare_epaper>`,
:doc:`OLED <ssd1306>` or :doc:`TFT <ili9xxx>` displays.
For the last type, ESPHome has a powerful rendering engine that can do
many things like draw some basic shapes, print text with any font you want, or even show images.
For graphical displays, which offer the greatest flexibility, there are two options:
- ESPHome's :ref:`own rendering engine <display-engine>`
- :doc:`LVGL </components/lvgl/index>` - Light and Versatile Graphics Library
.. _display-engine:
Display Rendering Engine
------------------------
ESPHome's own powerful rendering engine can handle many common tasks such as drawing basic shapes,
printing text with fonts of your choice, or even rendering images.
To achieve all this flexibility displays tie in directly into ESPHome's :ref:`lambda system <config-lambda>`.
So when you want to write some text or sensor values to the screen you will be writing in C++ code
@ -24,11 +35,6 @@ using an API that is designed to
- be simple and to be used without programming experience
- but also be flexible enough to work with more complex tasks like displaying an analog clock.
.. _display-engine:
Display Rendering Engine
------------------------
In this section we will be discussing how to use ESPHome's display rendering engine from ESPHome
and some basic commands. Please note that this only applies to displays that can control each pixel
individually.
@ -605,11 +611,13 @@ See Also
--------
- :apiref:`display/display_buffer.h`
- :doc:`LVGL </components/lvgl/index>`
- :ref:`Fonts <display-fonts>`
- :ref:`Graph Component <display-graphs>`
- :ref:`QR Code Component <display-qrcode>`
- :ref:`Image Component <display-image>`
- :ref:`Animation Component <display-animation>`
- :ref:`Online Image <online_image>`
- :ghedit:`Edit`
.. toctree::

View File

@ -115,8 +115,8 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
.. code-block:: yaml
api:
services:
- service: update_nextion
actions:
- action: update_nextion
then:
- lambda: 'id(nextion1)->upload_tft();'
@ -151,8 +151,8 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
# Enable Home Assistant API
api:
services:
- service: set_nextion_sensor
actions:
- action: set_nextion_sensor
variables:
nextion_type: int
name: string
@ -160,7 +160,7 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
then:
- lambda: |-
id(nextion1).set_nextion_sensor_state(nextion_type,name,state);
- service: set_nextion_text
- action: set_nextion_text
variables:
name: string
state: string

View File

@ -473,8 +473,8 @@ All actions
Test setup
----------
With the following code you can quickly setup a node and use Home Assistant's service in the developer tools.
E.g. for calling ``fingerprint_grow.enroll`` select the service ``esphome.test_node_enroll`` and in service data enter
With the following code you can quickly setup a node and use Home Assistant's action in the developer tools.
E.g. for calling ``fingerprint_grow.enroll`` select the action ``esphome.test_node_enroll`` and in action data enter
.. code-block:: json
@ -525,8 +525,8 @@ Sample code
finger_id: !lambda 'return finger_id;'
api:
services:
- service: enroll
actions:
- action: enroll
variables:
finger_id: int
num_scans: int
@ -534,16 +534,16 @@ Sample code
- fingerprint_grow.enroll:
finger_id: !lambda 'return finger_id;'
num_scans: !lambda 'return num_scans;'
- service: cancel_enroll
- action: cancel_enroll
then:
- fingerprint_grow.cancel_enroll:
- service: delete
- action: delete
variables:
finger_id: int
then:
- fingerprint_grow.delete:
finger_id: !lambda 'return finger_id;'
- service: delete_all
- action: delete_all
then:
- fingerprint_grow.delete_all:

View File

@ -9,7 +9,7 @@ Font Renderer Component
ESPHome's graphical rendering engine also has a powerful font drawer which integrates seamlessly into the system. You have the option to use **any** OpenType/TrueType (``.ttf``, ``.otf``, ``.woff``) font file at **any** size, as well as fixed-size `PCF <https://en.wikipedia.org/wiki/Portable_Compiled_Format>`_ and `BDF <https://en.wikipedia.org/wiki/Glyph_Bitmap_Distribution_Format>`_ bitmap fonts.
These fonts can be used in ESPHome's :ref:`own rendering engine <display-engine>`.
These fonts can be used in ESPHome's :ref:`own rendering engine <display-engine>` or in the :doc:`LVGL Graphics </components/lvgl/index>` component.
To use fonts you can either
- Just grab a ``.ttf``, ``.otf``, ``.woff``, ``.pcf``, or ``.bdf`` file from somewhere on the internet and place it, for example, inside a ``fonts`` folder next to your configuration file.
@ -83,6 +83,7 @@ Next, create a ``font:`` section in your configuration:
display:
# ...
Configuration variables:
------------------------
@ -155,6 +156,7 @@ See Also
- :apiref:`display/display_buffer.h`
- :ref:`display-engine`
- :doc:`/components/lvgl/index`
- `MDI cheatsheet <https://pictogrammers.com/library/mdi/>`_
- `MDI font repository <https://github.com/Pictogrammers/pictogrammers.github.io/tree/main/%40mdi/font/>`_
- :ghedit:`Edit`

View File

@ -36,6 +36,11 @@ Configuration variables:
experiencing device reboots due to watchdog timeouts;** doing so may prevent the device from rebooting due to a
legitimate problem. **Only available on ESP32 and RP2040**.
**For the ESP32 when using ESP-IDF:**
- **buffer_size_rx** (*Optional*, integer): Change HTTP receive buffer size. Defaults to ``512``.
- **buffer_size_tx** (*Optional*, integer): Change HTTP transmit buffer size. Defaults to ``512``.
**For the ESP8266:**
- **esp8266_disable_ssl_support** (*Optional*, boolean): Determines whether to include HTTPS/SSL support in the

View File

@ -9,6 +9,8 @@ Images
Use this component to store graphical images on the device, you can then draw the images on compatible displays.
For showing images downloaded at runtime, take a look at the :ref:`Online Image <online_image>` component.
.. code-block:: yaml
image:
@ -121,4 +123,3 @@ be supplied to modify the color used to represent the on and off bits respective
You can also use this to invert images in two color displays, use ``COLOR_OFF`` then ``COLOR_ON``
as the additional parameters.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -10,6 +10,8 @@ for configuring Wi-Fi on an ESPHome device by using a serial connection to the d
The ``improv_serial`` component requires the serial ``logger`` to be configured.
The ``improv_serial`` component will use the project name and version instead of ESPHomes version whenever it's available.
.. code-block:: yaml

View File

@ -26,6 +26,7 @@ Components
touchscreen/index
lock/index
display_menu/index
lvgl/index
media_player/index
microphone/index
speaker/index

View File

@ -6,12 +6,12 @@ Key collector component
.. seo::
:description: Key collector component
The ``key_collector`` component collects key presses from
components like :ref:`matrix_keypad` or ``wiegand``. It allows you to process
key sequences and treat them as one, for example to allow inputting of
a PIN code or a passkey. The component outputs the result of the keypress
sequence as a variable usable in automations.
The ``key_collector`` component collects key presses from components
like :ref:`matrix_keypad`, :doc:`Wiegand keypad </components/wiegand>`
or LVGL :ref:`Button Matrix <lvgl-widget-buttonmatrix>`, :ref:`Keyboard <lvgl-widget-keyboard>`
widgets. It allows you to process key sequences and treat them as one, for
example to allow inputting of a PIN code or a passkey. The component outputs
the result of the keypress sequence as a variable usable in automations.
Component
---------
@ -92,7 +92,7 @@ See Also
--------
- :doc:`/components/matrix_keypad`
.. - :doc:`/components/wiegand`
- :doc:`/components/wiegand`
- :ref:`LVGL Button Matrix widget <lvgl-widget-buttonmatrix>`
- :ref:`LVGL Keyboard widget <lvgl-widget-keyboard>`
- :ghedit:`Edit`

View File

@ -319,6 +319,15 @@ Configuration variables:
- **relative_brightness** (**Required**, :ref:`templatable <config-templatable>`, percentage):
The relative brightness to dim the light by.
- **transition_length** (*Optional*, :ref:`config-time`, :ref:`templatable <config-templatable>`): The length of the transition.
- **brightness_limits** (*Optional*): Limits in the brightness range.
- **min_brightness** (*Optional*, percentage): The minimum brightness to dim the light to. Defaults to ``0%``.
- **max_brightness** (*Optional*, percentage): The maximum brightness to dim the light to. Defaults to ``100%``.
- **limit_mode** (*Optional*): What to do when the current brightness is outside of the limit range. Defaults to ``CLAMP``.
Valid limit modes are:
- ``CLAMP``: Clamp the brightness to the limit range.
- ``DO_NOTHING``: No dimming if the brightness is outside the limit range.
.. note::
@ -339,6 +348,8 @@ Configuration variables:
id: light_1
relative_brightness: 5%
transition_length: 0.1s
brightness_limits:
max_brightness: 90%
- delay: 0.1s
.. _light-addressable_set_action:

44
components/light/lvgl.rst Normal file
View File

@ -0,0 +1,44 @@
LVGL Light
==========
.. seo::
:description: Instructions for setting up an LVGL widget light.
:image: ../images/lvgl_c_lig.png
The ``lvgl`` light platform creates a light from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widget is :ref:`lvgl-widget-led`. A single light supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome light component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a ``led`` widget configured in LVGL, which will reflect the state of the light.
- All other options from :ref:`light <config-light>`.
Example:
.. code-block:: yaml
light:
- platform: lvgl
widget: led_id
name: LVGL light
.. note::
To have linear brightness control, ``gamma_correct`` of the light is set by default to ``0``.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`LED widget <lvgl-widget-led>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

692
components/lvgl/index.rst Normal file
View File

@ -0,0 +1,692 @@
LVGL Graphics
=============
.. seo::
:description: LVGL - ESPHome Displays showing contents created with Light and Versatile Graphics Library
:image: /images/lvgl.png
`LVGL <https://lvgl.io/>`__ (Light and Versatile Graphics Library) is a free and open-source
embedded graphics library to create beautiful UIs for any MCU, MPU and display type. ESPHome supports `LVGL version 8 <https://docs.lvgl.io/8.4/>`__.
.. figure:: /components/lvgl/images/lvgl_main_screenshot.png
To use LVGL with a :ref:`display <display-hw>` in ESPHome, you'll need an ESP32 or supported ESP32 variant. PSRAM is not a strict requirement but it is generally recommended, especially for color displays with resolutions larger than approximately 240x240 pixels.
The graphic display should be configured with ``auto_clear_enabled: false`` and ``update_interval: never``, and should not have any ``lambda`` set.
For interactivity, a :doc:`Touchscreen </components/touchscreen/index>` (capacitive highly preferred), a :doc:`/components/sensor/rotary_encoder` or a custom keypad made up from discrete :doc:`Binary Sensors </components/binary_sensor/index>` can be used.
Basics
------
In LVGL, graphical elements like buttons, labels, sliders, etc. are called widgets or objects. See :doc:`/components/lvgl/widgets` for a complete list of widgets supported within ESPHome. Not all LVGL widgets are implemented, just those commonly used to support home automation needs/tasks.
Every widget has a parent object where it is created. For example, if a label is created on a button, the button is the parent of the label. Complex widgets internally consist of several smaller/simpler widgets; these are known as parts, each of which can have separate properties from the main widget.
Pages in ESPHome are implemented as LVGL screens, which are special objects which have no parent. There is always one active page on a display.
Widgets can be assigned with an :ref:`config-id` so that they can be referenced in :ref:`automations <automation>`.
Some widgets integrate also as native ESPHome components:
.. list-table::
:header-rows: 1
:widths: 1 1
* - LVGL Widget
- ESPHome component
* - ``button``
- :doc:`Switch </components/switch/lvgl>`, :doc:`Binary Sensor </components/binary_sensor/lvgl>`
* - ``switch``, ``checkbox``
- :doc:`Switch </components/switch/lvgl>`
* - ``slider``, ``arc``, ``spinbox``
- :doc:`Number </components/number/lvgl>`, :doc:`Sensor </components/sensor/lvgl>`
* - ``dropdown``, ``roller``
- :doc:`Select </components/select/lvgl>`
* - ``label``, ``textarea``
- :doc:`Text </components/text/lvgl>`, :doc:`Text Sensor </components/text_sensor/lvgl>`
* - ``led``
- :doc:`Light </components/light/lvgl>`
These are useful with `Home Assistant automations <https://www.home-assistant.io/docs/automation/>`__ interacting directly with the widgets.
Main Configuration
------------------
Although LVGL is a complex matrix of objects-parts-states-styles, ESPHome simplifies this into a hierarchy.
At the highest level of the LVGL object hierarchy is the display (represented by the hardware driver). A display can have one or more pages associated with it. Each page contains a hierarchy of objects for graphical widgets representing a layout to be presented on the display.
The following configuration variables apply to the main ``lvgl`` component, in order to establish the principal operating conditions. Some :ref:`styling options <lvgl-theme>` can be set at this level too, but only for inheritance purposes.
**Configuration variables:**
- **displays** (*Optional*, list, :ref:`config-id`): A list of display IDs where LVGL should perform rendering based on its configuration. This may be omitted if there is a single display configured, which will be used automatically.
- **touchscreens** (*Optional*, list): A list of touchscreens interacting with the LVGL widgets on the display.
- **touchscreen_id** (**Required**, :ref:`config-id`): ID of a touchscreen configuration related to a display.
- **long_press_time** (*Optional*, :ref:`Time <config-time>`): For the touchscreen, delay after which the ``on_long_pressed`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``400ms``.
- **long_press_repeat_time** (*Optional*, :ref:`Time <config-time>`): For the touchscreen, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``100ms``.
- **encoders** (*Optional*, list): A list of rotary encoders interacting with the LVGL widgets on the display.
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
- **initial_focus** (*Optional*, :ref:`config-id`): An optional ID for a widget to be given focus on startup (especially useful if there is only one focusable widget.)
- **enter_button** (**Required**, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``ENTER`` key.
- **sensor** (*Optional*, :ref:`config-id`): The ID of a :doc:`/components/sensor/rotary_encoder`; or a list with buttons for left/right interaction with the widgets:
- **left_button** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``LEFT`` key.
- **right_button** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``RIGHT`` key.
- **long_press_time** (*Optional*, :ref:`Time <config-time>`): For the rotary encoder, delay after which the ``on_long_pressed`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``400ms``. Can be disabled with ``never``.
- **long_press_repeat_time** (*Optional*, :ref:`Time <config-time>`): For the rotary encoder, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``100ms``. Can be disabled with ``never``.
- **keypads** (*Optional*, list): A list of keypads interacting with the LVGL widgets on the display.
- **group** (*Optional*, string): A name for a group of widgets which will interact with the the input device. See the :doc:`common properties </components/lvgl/widgets>` of the widgets for more information on groups.
- **up** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``UP`` key.
- **down** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``DOWN`` key.
- **right** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``RIGHT`` key.
- **left** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``LEFT`` key.
- **esc** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``ESC`` key.
- **del** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``DEL`` key.
- **backspace** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``BACKSPACE`` key.
- **enter** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``ENTER`` key.
- **next** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``NEXT`` key.
- **prev** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``PREV`` key.
- **home** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``HOME`` key.
- **end** (*Optional*, :ref:`config-id`): The ID of a :doc:`Binary Sensor </components/binary_sensor/index>`, to be used as ``END`` key.
- **long_press_time** (*Optional*, :ref:`Time <config-time>`): For the keypad, delay after which the ``on_long_pressed`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``400ms``. Can be disabled with ``never``.
- **long_press_repeat_time** (*Optional*, :ref:`Time <config-time>`): For the keypad, repeated interval after ``long_press_time``, when ``on_long_pressed_repeat`` :ref:`interaction trigger <lvgl-automation-triggers>` will be called. Defaults to ``100ms``. Can be disabled with ``never``.
.. tip::
When using binary sensors (from physical keys) to interact with LVGL, if there are only three keys available, they are best used when configured as a rotary encoder, where ``LEFT`` and ``RIGHT`` act like the rotary wheel, and ``ENTER`` generates an ``on_press`` :ref:`trigger <lvgl-automation-triggers>`. With four or more keys, a keypad configuration is generally more appropriate. For example, a keypad consisting of five keys might use ``PREV``, ``NEXT``, ``UP``, ``DOWN`` and ``ENTER``; ``PREV``/``NEXT`` are used to select a widget within the group, ``UP``/``DOWN`` changes the selected value and ``ENTER`` generates an ``on_press`` :ref:`trigger <lvgl-automation-triggers>`.
The ``long_press_time`` and ``long_press_repeat_time`` can be fine-tuned also by setting them to ``never`` and using the ``autorepeat`` filter on each binary sensor separately.
- **color_depth** (*Optional*, string): The color deph at which the contents are generated. Currently only ``16`` is supported (RGB565, 2 bytes/pixel), which is the default value.
- **buffer_size** (*Optional*, percentage): The percentage of screen size to allocate buffer memory. Default is ``100%`` (or ``1.0``). For devices without PSRAM, the recommended value is ``25%``.
- **log_level** (*Optional*, string): Set the logger level specifically for the messages of the LVGL library: ``TRACE``, ``INFO``, ``WARN``, ``ERROR``, ``USER``, ``NONE``. Defaults to ``WARN``.
- **byte_order** (*Optional*, int16): The byte order of the data LVGL outputs; either ``big_endian`` or ``little_endian``. Defaults to ``big_endian``.
- **disp_bg_color** (*Optional*, :ref:`color <lvgl-color>`): Solid color used to fill the background. Can be changed at runtime with the ``lvgl.update`` action.
- **disp_bg_image** (*Optional*, :ref:`image <display-image>`): The ID of an existing image configuration, to be used as background wallpaper. To change the image at runtime use the ``lvgl.update`` action. Also see :ref:`lvgl-widget-image` for a note regarding supported image formats.
- **default_font** (*Optional*, ID): The ID of the :ref:`font <lvgl-fonts>` used by default to render the text or symbols. Defaults to LVGL's internal ``montserrat_14`` if not specified.
- **style_definitions** (*Optional*, list): A batch of style definitions to use in LVGL widget's ``styles`` configuration. See :ref:`below <lvgl-theme>` for more details.
- **theme** (*Optional*, list): A list of styles to be applied to all widgets. See :ref:`below <lvgl-theme>` for more details.
- **widgets** (*Optional*, list): A list of :doc:`/components/lvgl/widgets` to be drawn on the root display. May not be used if ``pages`` (below) is configured.
- **pages** (*Optional*, list): A list of page IDs. Each page acts as a parent for widgets placed on it. May not be used with ``widgets`` (above). Options for each page:
- **skip** (*Optional*, boolean): Option to skip this page when navigating between them with :ref:`lvgl-page-next-previous-action`.
- **layout** (*Optional*): See :ref:`lvgl-layouts` for details. Defaults to ``NONE``.
- **widgets** (*Optional*, list): A list of :doc:`/components/lvgl/widgets` to be drawn on the page.
- All other options from :ref:`lvgl-styling` to be applied to this page.
- **page_wrap** (*Optional*, boolean): Wrap from the last to the first page when navigating between them with :ref:`lvgl-page-next-previous-action`. Defaults to ``true``.
- **top_layer** (*Optional*, list): A special kind of *Always on Top* page, which acts as a parent for widgets placed on it. It's shown above all the pages, which may be useful for widgets which always need to be visible.
- **layout** (*Optional*): See :ref:`lvgl-layouts` for details. Defaults to ``NONE``.
- **widgets** (*Optional*, list): A list of :doc:`/components/lvgl/widgets` to be drawn on the page.
- All other options from :ref:`lvgl-styling` to be applied to this page.
- **layout** (*Optional*): See :ref:`lvgl-layouts` for details. Defaults to ``NONE``.
- All other options from :ref:`lvgl-styling` to be applied to all widgets directly.
**Example:**
.. code-block:: yaml
# Example configuration entry
lvgl:
displays:
- my_display
touchscreens:
- my_touch
pages:
- id: main_page
widgets:
- label:
align: CENTER
text: 'Hello World!'
.. _lvgl-color:
Colors
******
Colors can be specified anywhere in the LVGL configuration either by referencing a preconfigured :ref:`ESPHome color <config-color>` ID or by representing the color in the common hexadecimal notation. For example, ``0xFF0000`` would be red.
.. _lvgl-opacity:
Opacity
*******
Various parts of the widgets (like background, borders etc.) support opacity. It can be overridden with a string: ``TRANSP`` for fully transparent, ``COVER`` for fully opaque, or percentage between ``0%`` and ``100%``. Actual default values depend on widget specifics.
.. _lvgl-fonts:
Fonts
*****
Two font choices are available:
**ESPHome fonts**
You can use :ref:`fonts configured normally<display-fonts>`, the glyphs will be rendered while building the binary. This has the advantage that you can define custom sets of glyphs of any size, with icons or diacritic characters of your choice, for any language, from any TrueType/OpenType font, allowing a more optimal flash space usage because you don't need to include all glyphs for all sizes you wish to use.
.. tip::
For best results, set ``bpp: 4`` to get the glyphs rendered with proper anti-aliasing.
**Library fonts**
The LVGL library offers by default prerendered sets with ASCII characters (``0x20-0x7F``), the degree symbol (``0xB0``), the bullet symbol (``0x2022``) from `Montserrat Medium <https://fonts.google.com/specimen/Montserrat>`__, and 60 symbols from `FontAwesome <https://fontawesome.com/>`__ (see below). You can use the IDs below when specifying the ``text_font`` parameter:
- ``montserrat_8``: 8px font
- ``montserrat_10``: 10px font
- ``montserrat_12``: 12px font
- ``montserrat_14``: 14px font (**default**, included if ``default_font`` option is missing)
- ``montserrat_16``: 16px font
- ``montserrat_18``: 18px font
- ``montserrat_20``: 20px font
- ``montserrat_22``: 22px font
- ``montserrat_24``: 24px font
- ``montserrat_26``: 26px font
- ``montserrat_28``: 28px font
- ``montserrat_30``: 30px font
- ``montserrat_32``: 32px font
- ``montserrat_34``: 34px font
- ``montserrat_36``: 36px font
- ``montserrat_38``: 38px font
- ``montserrat_40``: 40px font
- ``montserrat_42``: 42px font
- ``montserrat_44``: 44px font
- ``montserrat_46``: 46px font
- ``montserrat_48``: 48px font
The binary will only include any of the above if used in the configuration.
You can display the embedded symbols among the text by their codepoint address preceded by ``\u``. For example: ``\uF00C``:
.. figure:: /components/lvgl/images/lvgl_symbols.png
:align: center
.. note::
The ``text_font`` parameter affects the size of symbols, since all the built-in font arrays based on Montserrat include these symbols at the respective sizes. If you set ``text_font`` on a widget to a custom ESPHome font, these symbols will likely not display, unless you include them manually from a FontAwesome OpenType file.
For escape sequences to work, you have to put them in strings enclosed in double quotes.
In addition to the above, the following special fonts are available from LVGL as built-in:
- ``unscii_8``: 8 px pixel perfect font with only ASCII characters.
- ``unscii_16``: 16 px pixel perfect font with only ASCII characters.
- ``simsun_16_cjk``: 16 px font with normal range + 1000 most common `CJK Radicals <https://en.wikipedia.org/wiki/CJK_Radicals_Supplement>`__.
- ``dejavu_16_persian_hebrew``: 16 px font with normal range + Hebrew, Arabic, Persian letters and all their forms.
.. _lvgl-styling:
Style properties
****************
LVGL follows CSS's `border-box model <https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing>`__. A widget's *box* is built from the following parts:
.. figure:: /components/lvgl/images/lvgl_boxmodel.png
:align: center
- *bounding box*: the box defined with ``width`` and ``height`` of the widgets (pixels or parent content area percentage; not drawn, just for calculations).
- *border*: the border line, drawn on the inner side of the bounding box (pixels).
- *outline*: the outline, drawn on the outer side of the bounding box (pixels).
- *padding*: space to keep between the border of the widget and its content or children (*I don't want my children too close to my sides, so keep this space*).
- *content*: the content area which is the size of the bounding box reduced by the border width and padding (it's what's referenced as the ``SIZE_CONTENT`` option of certain widgets).
You can adjust the appearance of widgets by changing their foreground, background, border color and/or font. Some widgets allow for more complex styling, effectively changing all or part of their appearance.
**Styling variables:**
- **bg_color** (*Optional*, :ref:`color <lvgl-color>`): Color for the background of the widget. Defaults to ``0xFFFFFF`` (white).
- **bg_grad_color** (*Optional*, :ref:`color <lvgl-color>`): Color to make the background gradually fade to. Defaults to ``0`` (black).
- **bg_dither_mode** (*Optional*, dict): Set dithering of the background gradient. One of ``NONE``, ``ORDERED``, ``ERR_DIFF``. Defaults to ``NONE``.
- **bg_grad_dir** (*Optional*, dict): Choose the direction of the background gradient: ``NONE``, ``HOR``, ``VER``. Defaults to ``NONE``.
- **bg_main_stop** (*Optional*, 0-255): Specify where the gradient should start: ``0`` = upper left, ``128`` = in the center, ``255`` = lower right. Defaults to ``0``.
- **bg_grad_stop** (*Optional*, 0-255): Specify where the gradient should stop: ``0`` = upper left, ``128`` = in the center, ``255`` = lower right. Defaults to ``255``.
- **opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the entire widget. Inherited from parent. Defaults to ``COVER``.
- **bg_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the widget background.
- **opa_layered** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the entire layer the widget is on. Inherited from parent. Defaults to ``COVER``.
- **bg_image_src** (*Optional*, :ref:`image <display-image>`): The ID of an existing image configuration, to show as the background of the widget.
- **bg_image_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the background image of the widget.
- **bg_image_recolor** (*Optional*, :ref:`color <lvgl-color>`): Color to mix with every pixel of the background image of the widget.
- **bg_image_recolor_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the recoloring of the background image of the widget.
- **border_width** (*Optional*, int16): Set the width of the border in pixels. Defaults to ``0``.
- **border_color** (*Optional*, :ref:`color <lvgl-color>`): Color to draw borders of the widget. Defaults to ``0`` (black).
- **border_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the borders of the widget. Defaults to ``COVER``.
- **border_post** (*Optional*, boolean): If ``true`` the border will be drawn after all children of the widget have been drawn. Defaults to ``false``.
- **border_side** (*Optional*, list): Select which borders of the widgets to show (multiple can be specified as a YAML list, defaults to ``NONE``):
- ``NONE``
- ``TOP``
- ``BOTTOM``
- ``LEFT``
- ``RIGHT``
- ``INTERNAL``
- **clip_corner** (*Optional*, boolean): If set to ``true``, overflowing content will be clipped off by the widget's rounded corners (``radius`` > ``0``).
- **color_filter_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the color filter. Currently color filters are applied only by the default LVGL theme, this option allows the effect of those to be disabled by setting to ``TRANSP``.
- **outline_width** (*Optional*, int16): Set the width of the outline in pixels. Defaults to ``0``.
- **outline_color** (*Optional*, :ref:`color <lvgl-color>`): Color used to draw an outline around the widget. Defaults to ``0`` (black).
- **outline_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the outline of the widget. Defaults to ``COVER``.
- **outline_pad** (*Optional*, int16): Distance between the outline and the widget itself. Defaults to ``0``.
- **pad_all** (*Optional*, int16): Set the padding in all directions, in pixels.
- **pad_top** (*Optional*, int16): Set the padding on the top, in pixels.
- **pad_bottom** (*Optional*, int16): Set the padding on the bottom, in pixels.
- **pad_left** (*Optional*, int16): Set the padding on the left, in pixels.
- **pad_right** (*Optional*, int16): Set the padding on the right, in pixels.
- **pad_row** (*Optional*, int16): Set the padding between the rows of the children elements, in pixels.
- **pad_column** (*Optional*, int16): Set the padding between the columns of the children elements, in pixels.
- **radius** (*Optional*, uint16): The radius to be used to form the widget's rounded corners. 0 = no radius (square corners); 65535 = pill shaped widget (true circle if it has same width and height).
- **shadow_color** (*Optional*, :ref:`color <lvgl-color>`): Color used to create a drop shadow under the widget. Defaults to ``0`` (black).
- **shadow_ofs_x** (*Optional*, int16): Horizontal offset of the shadow, in pixels. Defaults to ``0``.
- **shadow_ofs_y** (*Optional*, int16): Vertical offset of the shadow, in pixels. Defaults to ``0``.
- **shadow_opa** (*Optional*, :ref:`opacity <lvgl-opacity>`): Opacity of the shadow. Defaults to ``COVER``.
- **shadow_spread** (*Optional*, int16): Spread of the shadow, in pixels. Defaults to ``0``.
- **shadow_width** (*Optional*, int16): Width of the shadow, in pixels. Defaults to ``0``.
- **transform_angle** (*Optional*, 0-360): Transformation angle of the widget (eg. rotation)
- **transform_height** (*Optional*, int16 or percentage): Transformation height of the widget (eg. stretching)
- **transform_pivot_x** (*Optional*, int16): Horizontal anchor point of the transformation. Relative to the widget's top left corner.
- **transform_pivot_y** (*Optional*, int16): Vertical anchor point of the transformation. Relative to the widget's top left corner.
- **transform_zoom** (*Optional*, 0.1-10): Transformation zoom of the widget (eg. resizing)
- **translate_x** (*Optional*, int16 or percentage): Movement of the widget with this value in horizontal direction.
- **translate_y** (*Optional*, int16 or percentage): Movement of the widget with this value in vertical direction.
.. _lvgl-theme:
Themes
******
The widgets support lots of :ref:`lvgl-styling` to customize their appearance and behavior.
You can configure a global theme for all widgets at the top level with the ``theme`` configuration variable. In the example below, all the ``arc``, ``slider`` and ``button`` widgets will, by default, use the styles and properties defined here. A combination of styles and :ref:`states <lvgl-widgetproperty-state>` can be chosen for every widget.
.. code-block:: yaml
lvgl:
theme:
arc:
scroll_on_focus: true
group: general
slider:
scroll_on_focus: true
group: general
button:
scroll_on_focus: true
group: general
border_width: 2
outline_pad: 6
pressed:
border_color: 0xFF0000
checked:
border_color: 0xFFFF00
focused:
border_color: 0x00FF00
Naturally, you can override these at the individual configuration level of each widget. This can be done in batches, using the ``style_definitions`` configuration variable of the main component.
In the example below, you defined ``date_style``:
.. code-block:: yaml
lvgl:
style_definitions:
- id: date_style # choose an ID for your definition
text_font: unscii_8
align: center
text_color: 0x000000
bg_opa: cover
radius: 4
pad_all: 2
And then you apply these selected styles to two labels, and only change very specific style ``y`` locally:
.. code-block:: yaml
widgets:
- label:
id: day_label
styles: date_style # apply the definition here by the ID chosen above
y: -20
- label:
id: date_label
styles: date_style
y: +20
Additionally, you can change the styles based on the :ref:`state <lvgl-widgetproperty-state>` property of the widgets or their parts. If you want to set a property for all states (e.g. red background color) just set it for the default state at the root of the widget. If the widget can't find a property for its current state it will fall back to this.
In the example below, you have an ``arc`` with some styles set here. Note how you change the ``arc_color`` of the ``indicator`` part, based on state changes:
.. code-block:: yaml
- arc:
id: my_arc
value: 75
min_value: 1
max_value: 100
indicator:
arc_color: 0xF000FF
pressed:
arc_color: 0xFFFF00
focused:
arc_color: 0x808080
So the precedence happens like this: state based styles override the locally specified styles, which override the style definitions, which override the theme, which overrides the top level styles. The value precedence of states is quite intuitive and it's something the user would expect naturally. For example, if a widget is focused the user will still want to see if it's pressed, therefore the pressed state has a higher precedence. (If the focused state had a higher precedence it would override the *pressed* color, defeating its purpose.)
Feel free to experiment to discover inheritance and precedence of the styles based on states between the nested widgets.
.. _lvgl-layouts:
Layouts
*******
Layouts aim to position widgets automatically, eliminating the need to specify ``x`` and ``y`` coordinates to position each widget. This is a great way to simplify your configuration as it allows you to omit alignment options.
The layout configuration options are applied to any parent widget or page, influencing the appearance of the children. The position and size calculated by the layout overwrites the *normal* ``x``, ``y``, ``width``, and ``height`` settings of the children.
The ``hidden``, ``ignore_layout`` and ``floating`` :ref:`flags <lvgl-widget-flags>` can be used on widgets to ignore them in layout calculations.
**Configuration variables:**
- **layout** (*Optional*, dict): A dictionary describing the layout configuration:
- **type** (*Optional*, string): ``FLEX``, ``GRID`` or ``NONE``. Defaults to ``NONE``.
- Further options from below depending on the chosen type.
**Flex**
The Flex layout in LVGL is a subset implementation of `CSS Flexbox <https://css-tricks.com/snippets/css/a-guide-to-flexbox/>`__.
It can arrange items into rows or columns (tracks), handle wrapping, adjust spacing between items and tracks and even handle growing the layout to make the item(s) fill the remaining space with respect to minimum/maximum width and height.
**Terms used:**
- *track*: the rows or columns *main* direction flow: row or column in the direction in which the items are placed one after the other.
- *cross direction*: perpendicular to the main direction.
- *wrap*: if there is no more space in the track a new track is started.
- *gap*: the space between the rows and columns or the items on a track.
- *grow*: if set on an item it will grow to fill the remaining space on the track. The available space will be distributed among items respective to their grow value (larger value means more space). It dictates what amount of the available space the widget should take up. For example if all items on the track have a ``grow`` set to ``1``, the space in the track will be distributed equally to all of them. If one of the items has a value of 2, that one would take up twice as much of the space as either one of the others.
**Configuration variables:**
- **flex_flow** (*Optional*, string): Select the arrangement of the children widgets:
- ``ROW``: place the children in a row without wrapping.
- ``COLUMN``: place the children in a column without wrapping.
- ``ROW_WRAP``: place the children in a row with wrapping (default).
- ``COLUMN_WRAP``: place the children in a column with wrapping.
- ``ROW_REVERSE``: place the children in a row without wrapping but in reversed order.
- ``COLUMN_REVERSE``: place the children in a column without wrapping but in reversed order.
- ``ROW_WRAP_REVERSE``: place the children in a row with wrapping but in reversed order.
- ``COLUMN_WRAP_REVERSE``: place the children in a column with wrapping but in reversed order.
- **flex_align_main** (*Optional*, string): Determines how to distribute the items in their track on the *main* axis. For example, flush the items to the right on with ``flex_flow: ROW_WRAP`` (known as *justify-content* in CSS). Possible options below.
- **flex_align_cross** (*Optional*, string): Determines how to distribute the items in their track on the *cross* axis. For example, if the items have different height place them to the bottom of the track (known as *align-items* in CSS). Possible options below.
- **flex_align_track** (*Optional*, string): Determines how to distribute the tracks (known as *align-content* in CSS). Possible options below.
Values for use with ``flex_align_main``, ``flex_align_cross``, ``flex_align_track``:
- ``START``: means left horizontally and top vertically (default).
- ``END``: means right horizontally and bottom vertically.
- ``CENTER``: simply center.
- ``SPACE_EVENLY``: items are distributed so that the spacing between any two items (and the space to the edges) is equal. Does not apply to ``flex_align_track``.
- ``SPACE_AROUND``: items are evenly distributed in the track with equal space around them. Note that visually the spaces arent equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Does not apply to ``flex_align_track``.
- ``SPACE_BETWEEN``: items are evenly distributed in the track: first item is on the start line, last item on the end line. Does not apply to ``flex_align_track``.
- **pad_row** (*Optional*, int16): Set the padding between the rows, in pixels.
- **pad_column** (*Optional*, int16): Set the padding between the columns, in pixels.
- **flex_grow** (*Optional*, int16): Flex grow can be used to make one or more children fill the available space on the track. When more children have grow parameters, the available space will be distributed proportionally to the grow values. Defaults to ``0``, which disables growing.
**Grid**
The Grid layout in LVGL is a subset implementation of `CSS Flexbox <https://css-tricks.com/snippets/css/a-guide-to-flexbox/>`__.
It can arrange items into a 2D "table" that has rows or columns (tracks). The item(s) can span through multiple columns or rows. The track's size can be set in pixels, to the largest item of the track (``CONTENT``) or in "free units" to distribute the free space proportionally.
**Terms used:**
- *tracks*: the rows or the columns.
- *gap*: the space between the rows and columns or the items on a track.
- *free unit (FR)*: a proportional distribution unit for the space available on the track. It accepts a unitless integer value that serves as a proportion. It dictates what amount of the available space the widget should take up. For example if all items on the track have a ``FR`` set to ``1``, the space in the track will be distributed equally to all of them. If one of the items has a value of 2, that one would take up twice as much of the space as either one of the others.
**Configuration variables:**
- **grid_rows** (**Required**): The number of rows in the grid, expressed a list of values in pixels, ``CONTENT`` or ``FR(n)`` (free units, where ``n`` is a proportional integer value).
- **grid_columns** (**Required**): The number of columns in the grid, expressed a list of values in pixels, ``CONTENT`` or ``FR(n)`` (free units, where ``n`` is a proportional integer value).
- **grid_row_align** (*Optional*, string): How to align the row. Works only when ``grid_rows`` is given in pixels. Possible options below.
- **grid_column_align** (*Optional*, string): How to align the column. Works only when ``grid_columns`` is given in pixels. Possible options below.
- **pad_row** (*Optional*, int16): Set the padding between the rows, in pixels.
- **pad_column** (*Optional*, int16): Set the padding between the columns, in pixels.
In a grid layout, *all the widgets placed on the grid* will get some additional configuration variables to help with placement:
- **grid_cell_row_pos** (**Required**, int16): Position of the widget, in which row to appear (0 based count).
- **grid_cell_column_pos** (**Required**, int16): Position of the widget, in which column to appear (0 based count).
- **grid_cell_x_align** (*Optional*, string): How to align the widget horizontally within the cell. Can also be applied through :ref:`lvgl-styling`. Possible options below.
- **grid_cell_y_align** (*Optional*, string): How to align the widget vertically within the cell. Can also be applied through :ref:`lvgl-styling`. Possible options below.
- **grid_cell_row_span** (*Optional*, int16): How many rows to span across the widget. Defaults to ``1``.
- **grid_cell_column_span** (*Optional*, int16): How many columns to span across the widget. . Defaults to ``1``.
.. note::
These ``grid_cell_`` variables apply to widget configuations!
Values for use with ``grid_column_align``, ``grid_row_align``, ``grid_cell_x_align``, ``grid_cell_y_align``:
- ``START``: means left horizontally and top vertically (default).
- ``END``: means right horizontally and bottom vertically.
- ``CENTER``: simply center.
- ``STRETCH``: stretch the widget to the cell in the respective direction. Does not apply to ``grid_column_align``, ``grid_row_align``.
- ``SPACE_EVENLY``: items are distributed so that the spacing between any two items (and the space to the edges) is equal.
- ``SPACE_AROUND``: items are evenly distributed in the track with equal space around them. Note that visually the spaces arent equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies.
- ``SPACE_BETWEEN``: items are evenly distributed in the track: first item is on the start line, last item on the end line.
.. tip::
To visualize real, calculated sizes of transparent widgets you can temporarily set ``outline_width: 1`` on them.
Widgets
*******
LVGL supports a list of :doc:`/components/lvgl/widgets` which can be used to draw interactive objects on the screen.
Actions
-------
Widgets support :ref:`general or specific <lvgl-automation-actions>` actions.
Several actions are available for LVGL, these are outlined below.
.. _lvgl-redraw-action:
``lvgl.widget.redraw``
**********************
This :ref:`action <actions-action>` redraws the entire screen, or optionally only a widget on it.
- **id** (*Optional*): The ID of a widget configured in LVGL which you want to redraw; if omitted, the entire screen will be redrawn.
.. code-block:: yaml
on_...:
then:
- lvgl.widget.redraw:
.. _lvgl-pause-action:
``lvgl.pause``
**************
This :ref:`action <actions-action>` pauses the activity of LVGL, including rendering.
- **show_snow** (*Optional*, boolean): When paused, display random colored pixels across the entire screen in order to minimize screen burn-in, to relief the tension put on each individual pixel.
.. code-block:: yaml
on_...:
then:
- lvgl.pause:
show_snow: true
.. _lvgl-resume-action:
``lvgl.resume``
***************
This :ref:`action <actions-action>` resumes the activity of LVGL, including rendering.
.. code-block:: yaml
on_...:
then:
- lvgl.resume:
``lvgl.update``
***************
This :ref:`action <actions-action>` allows changing/updating the ``disp_bg_color`` or ``disp_bg_image`` configuration variables of the main component, making it possible to change the background color or wallpaper at any time.
.. code-block:: yaml
# Examples:
on_...:
then:
- lvgl.update:
disp_bg_color: 0x0000FF
- lvgl.update:
disp_bg_image: cat_image
.. _lvgl-page-next-previous-action:
``lvgl.page.next``, ``lvgl.page.previous``
******************************************
This :ref:`action <actions-action>` changes the page to the next/previous based on the configuration (pages with their ``skip`` option enabled are...skipped). Page changes will wrap around at the end.
- **animation** (*Optional*): Animate page changes as specified. One of: ``NONE``, ``OVER_LEFT``, ``OVER_RIGHT``, ``OVER_TOP``, ``OVER_BOTTOM``, ``MOVE_LEFT``, ``MOVE_RIGHT``, ``MOVE_TOP``, ``MOVE_BOTTOM``, ``FADE_IN``, ``FADE_OUT``, ``OUT_LEFT``, ``OUT_RIGHT``, ``OUT_TOP``, ``OUT_BOTTOM``. Defaults to ``NONE``.
- **time** (*Optional*, :ref:`Time <config-time>`): Duration of the page change animation. Defaults to ``50ms``.
.. code-block:: yaml
on_...:
then:
- lvgl.page.next:
animation: OUT_LEFT
time: 300ms
on_...:
then:
- lvgl.page.previous:
animation: OUT_RIGHT
time: 300ms
.. _lvgl-page-show-action:
``lvgl.page.show``
******************
This :ref:`action <actions-action>` shows a specific page (including pages with their ``skip`` option enabled).
- **id** (**Required**): The ID of the page to be shown.
- **animation** (*Optional*): Animate page changes as specified. One of: ``NONE``, ``OVER_LEFT``, ``OVER_RIGHT``, ``OVER_TOP``, ``OVER_BOTTOM``, ``MOVE_LEFT``, ``MOVE_RIGHT``, ``MOVE_TOP``, ``MOVE_BOTTOM``, ``FADE_IN``, ``FADE_OUT``, ``OUT_LEFT``, ``OUT_RIGHT``, ``OUT_TOP``, ``OUT_BOTTOM``. Defaults to ``NONE``.
- **time** (*Optional*, :ref:`Time <config-time>`): Duration of the page change animation. Defaults to ``50ms``.
.. code-block:: yaml
on_...:
then:
- lvgl.page.show:
id: secret_page
on_...:
then:
- lvgl.page.show: secret_page # shorthand version
.. _lvgl-conditions:
Conditions
----------
.. _lvgl-is-idle-condition:
``lvgl.is_idle``
****************
This :ref:`condition <common_conditions>` checks if the amount of time specified has passed since the last touch event.
- **timeout** (**Required**, :ref:`templatable <config-templatable>`, int): Amount of :ref:`time <config-time>` expected since the last touch event.
.. code-block:: yaml
# In some trigger:
on_...:
then:
- if:
condition: lvgl.is_idle
timeout: 5s
then:
- light.turn_off:
id: display_backlight
transition_length: 3s
.. _lvgl-is-paused-condition:
``lvgl.is_paused``
******************
This :ref:`condition <common_conditions>` checks if LVGL is in the paused state or not.
.. code-block:: yaml
# In some trigger:
on_...:
then:
- if:
condition: lvgl.is_paused
then:
- lvgl.resume:
Triggers
--------
Widget level :ref:`interaction triggers <lvgl-automation-triggers>` can be configured universally, or depending on the widtget functionality.
.. _lvgl-on-idle-trigger:
``lvgl.on_idle``
****************
LVGL has a notion of screen inactivity -- in other words, the time since the last user interaction with the screen is tracked. This can be used to dim the display backlight or turn it off after a moment of inactivity (like a screen saver). Every use of an input device (touchscreen, rotary encoder) counts as an activity and resets the inactivity counter.
The ``on_idle`` :ref:`triggers <automation>` are activated when inactivity time becomes longer than the specified ``timeout``. You can configure any desired number of timeouts with different actions.
- **timeout** (**Required**, :ref:`templatable <config-templatable>`, int): :ref:`Time <config-time>` that has elapsed since the last touch event, after which you want your actions to be performed.
.. code-block:: yaml
lvgl:
...
on_idle:
- timeout: 30s
then:
- lvgl.page.show: main_page
- timeout: 60s
then:
- light.turn_off: display_backlight
- lvgl.pause:
See Also
--------
.. toctree::
:maxdepth: 1
:glob:
*
- :doc:`/components/display/index`
- :doc:`/components/touchscreen/index`
- :doc:`/components/sensor/rotary_encoder`
- `LVGL docs <https://docs.lvgl.io/>`__
- :ghedit:`Edit`

1788
components/lvgl/widgets.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -89,6 +89,9 @@ Configuration variables:
- **read_lambda** (**Required**, :ref:`lambda <config-lambda>`):
Lambda that returns the value of this register.
Automations:
- **on_command_sent** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a modbus command has been sent. See :ref:`modbus_controller-on_command_sent`
Example Client
--------------
@ -721,6 +724,28 @@ The response is mapped to the sensor based on ``register_count`` and offset in b
.. _modbusseealso:
.. _modbus_controller-automations:
Automation
----------
.. _modbus_controller-on_command_sent:
``on_command_sent``
*******************
This automation will be triggered when a command has been sent by the `modbus_controller`. In :ref:`Lambdas <config-lambda>`
you can get the function code in ``function_code`` and the register address in ``address``.
.. code-block:: yaml
modbus_controller:
- id: modbus_con
# ...
on_command_sent:
then:
- number.increment: modbus_commands
See Also
--------

View File

@ -41,7 +41,9 @@ Configuration variables:
authentication. Empty (the default) means no authentication.
- **client_id** (*Optional*, string): The client id to use for opening
connections. See :ref:`mqtt-defaults` for more information.
- **discovery** (*Optional*, boolean): If Home Assistant automatic
- **discover_ip** (*Optional*, boolean): If Home Assistant automatic device
discovery should be enabled. Defaults to ``true``.
- **discovery** (*Optional*, boolean): If Home Assistant automatic entity
discovery should be enabled. Defaults to ``true``.
- **discovery_retain** (*Optional*, boolean): Whether to retain MQTT
discovery messages so that entities are added automatically on Home
@ -137,10 +139,93 @@ Configuration options:
- **retain** (*Optional*, boolean): If the published message should
have a retain flag on or not. Defaults to ``true``.
.. _mqtt-using_with_home_assistant:
Using with Home Assistant
-------------------------
.. _mqtt-device_discovery:
MQTT device discovery
---------------------
The ESPHome device will respond to the following MQTT topics if ``mqtt.discover_ip`` is enabled.
- ``esphome/discover`` (All ESPHome device will answer)
- ``esphome/ping/<APP_NAME>``
The response will be sent to ``esphome/discover/<APP_NAME>`` and is a JSON encoded message.
The MQTT device discovery is currently used for:
- ESPHome dashboard (online / offline status)
- ESPHome CLI (IP discovery; used to view logs and perform OTA uploads)
- Home Assistant device discovery
Example Payload:
.. code-block:: json
{
"ip": "192.168.0.122",
"name": "esp32-test",
"friendly_name": "Test Device",
"port": 6053,
"version": "2024.4.1",
"mac": "84fce6123456",
"platform": "ESP32",
"board": "esp32-c3-devkitm-1",
"network": "wifi",
"api_encryption": "Noise_NNpsk0_25519_ChaChaPoly_SHA256"
}
JSON keys:
- **ip** (**Required**, ip): The IP address of the ESPHome device.
- **name** (**Required**, string): Name of the device (``esphome.name``).
- **mac** (**Required**, string): MAC address of the device.
- **board** (**Required**, string): Board used for the device.
- **version** (**Required**, string): ESPHome version.
- **port** (*Optional*, port): Port of the ESPHome API (if enabled).
- **ipX** (*Optional*, ip): Additional IP addresses (X is a number starting at 1).
- **friendly_name** (*Optional*, string): Friendly name of the device (``esphome.friendly_name``).
- **platform** (*Optional*, string): Platform of the device (e.g. ESP32 or ESP8266)
- **network** (*Optional*, string): Network type.
- **project_name** (*Optional*, string): ``esphome.project.name``.
- **project_version** (*Optional*, string): ``esphome.project.version``.
- **project_version** (*Optional*, string): ``dashboard_import.package_import_url``.
- **api_encryption** (*Optional*, string): API encryption type.
.. _mqtt-using_device_discovery_with_home_assistant:
Using device discovery with Home Assistant
------------------------------------------
MQTT can be used to automatically discover the ESPHome devices in Home Assistant.
This allows Home Assistant to find the ESPHome device and connect
to it via the ESPHome API which allows the usage
of more features then MQTT entity discovery alone (e.g. Bluetooth Proxy, Voice Assistant).
This can be achieved by enabling ``api`` and ``mqtt`` with ``mqtt.discover_ip`` enabled.
It may makes sense to disable ``mqtt.discovery`` since there will be no need to use the
MQTT entity discovery if Home Assistant will connect to the ESPHome API.
Example configuration:
.. code-block:: yaml
api:
encryption:
key: "<secret>"
mqtt:
broker: 10.0.0.2
username: livingroom
password: !secret mqtt_password
discovery: False # disable entity discovery
discover_ip: True # enable device discovery
.. _mqtt-using_with_home_assistant_entities:
Using with Home Assistant MQTT entities
---------------------------------------
Using ESPHome with Home Assistant is easy, simply setup an MQTT
broker (like `mosquitto <https://mosquitto.org/>`__) and point both your
@ -377,16 +462,16 @@ Configuration variables:
- **state_topic** (*Optional*, string): The topic to publish state
updates to. Defaults to
``<TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/state``.
ESPHome will always publish a manually configured state topic, even if
the component is internal. Use ``null`` to disable publishing the
ESPHome will always publish a manually configured state topic, even if
the component is internal. Use ``null`` to disable publishing the
component's state.
- **command_topic** (*Optional*, string): The topic to subscribe to for
commands from the remote. Defaults to
``<TOPIC_PREFIX>/<COMPONENT_TYPE>/<COMPONENT_NAME>/command``.
ESPHome will always subscribe to a manually configured command topic,
even if the component is internal. Use ``null`` to disable subscribing
ESPHome will always subscribe to a manually configured command topic,
even if the component is internal. Use ``null`` to disable subscribing
to the component's command topic.
- **command_retain** (*Optional*, boolean): Whether MQTT command messages
sent to the device should be retained or not. Default to ``false``.

View File

@ -0,0 +1,36 @@
Home Assistant Number
=====================
.. seo::
:description: Instructions for setting up Home Assistant numbers with ESPHome.
:image: description.svg
The ``homeassistant`` number platform allows you to create a number that is synchronized
with Home Assistant. Min, Max and Step are not configurable for this platform because they are taken from the Home Assistant entity.
.. code-block:: yaml
# Example configuration entry
number:
- platform: homeassistant
id: my_ha_number
entity_id: number.my_number
Configuration variables:
------------------------
- **entity_id** (**Required**, string): The Home Assistant entity ID of the number to synchronize with.
- All other options from :ref:`Number <config-number>`.
``number.set`` Action
---------------------
You can also set the number for the Home Assistant number from elsewhere in your YAML file
with the :ref:`number-set_action`.
See Also
--------
- :ref:`automation`
- :apiref:`homeassistant/number/homeassistant_number.h`
- :ghedit:`Edit`

View File

@ -0,0 +1,48 @@
LVGL Number
===========
.. seo::
:description: Instructions for setting up an LVGL widget number component.
:image: ../images/lvgl_c_num.png
The ``lvgl`` number platform creates a number component from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-arc`, :ref:`lvgl-widget-bar`, :ref:`lvgl-widget-slider` and :ref:`lvgl-widget-spinbox`. A single number supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome number component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the number.
- **animated** (*Optional*, boolean): Whether to set the value of the widget with an animation (if supported by the widget). Defaults to ``true``.
- **update_on_release** (*Optional*, boolean): By default the number will publish a new value each time the value of the associated widget changes. If this option is ``true`` then the value will only be published when touch is released.
- All other variables from :ref:`Number <config-number>`.
Example:
.. code-block:: yaml
number:
- platform: lvgl
widget: slider_id
name: LVGL Slider
.. note::
Widget-specific actions (``lvgl.arc.update``, ``lvgl.bar.update``, ``lvgl.slider.update``, ``lvgl.spinbox.update``, ``lvgl.spinbox.decrement``, ``lvgl.spinbox.increment``) will trigger correspponding component updates to be sent to Home Assistant.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Arc widget <lvgl-widget-arc>`
- :ref:`Bar widget <lvgl-widget-bar>`
- :ref:`Slider widget <lvgl-widget-slider>`
- :ref:`Spinbox widget <lvgl-widget-spinbox>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

154
components/online_image.rst Normal file
View File

@ -0,0 +1,154 @@
.. _online_image:
Online Image Component
======================
.. seo::
:description: Instructions for displaying images downloaded at runtime in ESPHome.
:image: image-sync-outline.svg
With this component you can define images that will be downloaded, decoded and drawn at runtime.
.. note::
Currently only images in PNG format are supported.
.. warning::
This component requires a fair amount of RAM; both for downloading the image, and for storing the decoded image. It might work on devices without PSRAM, but there is no guarantee.
This component has a dependency to :doc:`/components/http_request`; the configuration options you set to the ``http_request`` component will also apply here.
.. code-block:: yaml
online_image:
- url: "https://example.com/example.png"
format: png
id: my_online_image
Configuration variables
-----------------------
- **url** (**Required**, url): The URL where the image will be downloaded from.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the image later
in your display code.
- **format** (**Required**): The format that the image is encoded with.
- ``PNG``: The image on the server is encoded in PNG format.
- **resize** (*Optional*, string): If set, this will resize the image to fit inside the given dimensions ``WIDTHxHEIGHT``
and preserve the aspect ratio.
- **placeholder** (**Optional**, :ref:`config-id`): ID of an :doc:`Image </components/image>` to display while the downloaded image is not yet ready.
This placeholder image will **not** be resized; regardless of the ``resize`` option value for the ``online_image``.
- **type** (*Optional*): Specifies how to encode image internally. Defaults to ``BINARY``.
- ``BINARY``: Two colors, suitable for 1 color displays or 2 color image in color displays. Uses 1 bit
per pixel, 8 pixels per byte.
- ``TRANSPARENT_BINARY``: One color, any pixel that is fully transparent will not be drawn, and any other pixel
will be the on color. Uses 1 bit per pixel, 8 pixels per byte.
- ``GRAYSCALE``: Full scale grey. Uses 8 bits per pixel, 1 pixel per byte.
- ``RGB565``: Lossy RGB color stored. Uses 2 bytes per pixel.
- ``RGB24``: Full RGB color stored. Uses 3 bytes per pixel.
- ``RGBA``: Full RGB color stored. Uses 4 bytes per pixel. Any pixel with an alpha value < 127 will not be drawn.
- **use_transparency** (*Optional*, boolean): If set the alpha channel of the input image will be taken into account,
and pixels with alpha < 127 will not be drawn. For image types without explicit alpha channel,
the color (0, 0, 1) (very dark blue) will be mapped to black, to be able to store transparency information
within the image. Explicitly transparent types (``TRANSPARENT_BINARY`` and ``RGBA``) default to ``true`` and cannot be set to ``false``; other types default to ``false``.
- **update_interval** (*Optional*, int): Redownload the image when the specified time has elapsed. Defaults to ``never`` (i.e. the update component action needs to be called manually).
Automations
-----------
- **on_download_finished** (*Optional*, :ref:`Automation <automation>`): An automation to perform when the image has been successfully downloaded.
A good example for that is to update the display component after the download succeeded.
- **on_error** (*Optional*, :ref:`Automation <automation>`): An automation to perform when an error happened during download or decode.
Actions
-------
**online_image.set_url**: Change the URL where the image is downloaded from. The image needs to be manually updated afterwards.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The image to update the URL for.
- **url** (**Required**, url): The new URL to download the image from.
.. code-block:: yaml
on_...:
- online_image.set_url:
id: my_online_image
url: "https://www.example.com/new_image.png"
- component.update: my_online_image
**online_image.release**: Release the memory currently used by an image. Can be used if different display pages need different images, to avoid wasting memory on an image that is currently not being displayed.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The image to update the URL for.
.. code-block:: yaml
on_...:
- online_image.release: my_online_image
Examples
--------
.. code-block:: yaml
online_image:
- url: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png"
format: png
id: my_online_image
on_download_finished:
component.update: my_display
And then later in code:
.. code-block:: yaml
display:
- platform: ...
id: my_display
# ...
lambda: |-
// Draw the image my_online_image at position [x=0,y=0]
it.image(0, 0, id(my_online_image));
For monochrome displays the ``image`` method accepts two additional color parameters which can
be supplied to specify the color used to draw bright and dark pixels respectively.
In this case the image will be internally converted to a grayscale image and then to monochrome
based on an internally defined threshold.
.. code-block:: yaml
display:
- platform: ...
id: my_display
# ...
lambda: |-
// Draw the image my_image at position [x=0,y=0]
// with front color "OFF" and back color "ON"
it.image(0, 0, id(my_online_image), COLOR_OFF, COLOR_ON);
By default ``online_image`` is configured to not automatically update/download the image; in order to do the initial download, you can either:
- Add a ``component.update <image_id>`` in the ``on_connect:`` action on the :doc:`/components/wifi` component.
- Explicitly set an ``update_interval``.
- Call ``component.update <image_id>`` in an :doc:`/components/interval` block.
- Call ``component.update <image_id>`` where you need the image to be downloaded/updated.
.. code-block:: yaml
wifi:
on_connect:
- component.update: my_online_image
See Also
--------
- :apiref:`online_image/online_image.h`
- :doc:`Image Component <image>`
- :doc:`Animation Component <animation>`
- :ghedit:`Edit`

View File

@ -28,7 +28,7 @@ Local Packages
Consider the following example where the author put common pieces of configuration (like Wi-Fi and API) into base files
and then extends it with some device-specific configuration in the main configuration.
Note how the piece of configuration describing ``api`` component in ``device_base.yaml`` gets merged with the services
Note how the piece of configuration describing ``api`` component in ``device_base.yaml`` gets merged with the actions
definitions from main configuration file.
.. code-block:: yaml
@ -39,8 +39,8 @@ definitions from main configuration file.
device_base: !include common/device_base.yaml
api:
services:
- service: start_laundry
actions:
- action: start_laundry
then:
- switch.turn_on: relay

View File

@ -347,8 +347,8 @@ Home Assistant as events and will also setup a service so you can send codes wit
.. code-block:: yaml
api:
services:
- service: send_rf_code
actions:
- action: send_rf_code
variables:
sync: int
low: int
@ -360,7 +360,7 @@ Home Assistant as events and will also setup a service so you can send codes wit
low: !lambda 'return low;'
high: !lambda 'return high;'
code: !lambda 'return code;'
- service: learn
- action: learn
then:
- rf_bridge.learn
@ -393,7 +393,7 @@ To trigger the automation from Home Assistant you can invoke the service with th
automation:
# ...
action:
- service: esphome.rf_bridge_send_rf_code
- action: esphome.rf_bridge_send_rf_code
data:
sync: 0x700
low: 0x800

View File

@ -174,8 +174,8 @@ Sample code
- logger.log: 'Song ended!'
api:
services:
- service: play_rtttl
actions:
- action: play_rtttl
variables:
song_str: string
then:

View File

@ -0,0 +1,44 @@
LVGL Select
===========
.. seo::
:description: Instructions for setting up an LVGL widget select.
:image: ../images/lvgl_c_sel.png
The ``lvgl`` select platform creates a select from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-dropdown` and :ref:`lvgl-widget-roller`. A single select supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome select component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the select.
- All other variables from :ref:`Select <config-select>`.
Example:
.. code-block:: yaml
select:
- platform: lvgl
widget: dropdown_id
name: LVGL Dropdown
.. note::
Widget-specific actions (``lvgl.dropdown.update``, ``lvgl.roller.update``) will trigger correspponding component updates to be sent to Home Assistant.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Roller widget <lvgl-widget-roller>`
- :ref:`Dropdown widget <lvgl-widget-dropdown>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

View File

@ -71,6 +71,8 @@ Configuration example:
name: "WavePlus CO2"
tvoc:
name: "WavePlus VOC"
illuminance:
name: "WavePlus ambient light"
battery_voltage:
name: "WavePlus Battery Voltage"

View File

@ -0,0 +1,70 @@
APDS9306 Sensor
===============
.. seo::
:description: Instructions for setting up APDS9306 sensors.
:image: apds9306.png
.. _apds9306-component:
Component
---------
The ``apds9306`` sensor component allows you to use APDS9306 ambient light sensors (`datasheet <https://docs.broadcom.com/doc/AV02-4755EN>`__, `Broadcom`_) with ESPHome.
The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.
.. figure:: images/apds9306.png
:align: center
:width: 80.0%
Image by `Broadcom`_
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: apds9306
name: "APDS9306 Light Level" # below are optional
gain: 1
bit_width: 18
measurement_rate: 100ms
update_interval: 60s
.. _Broadcom: https://www.broadcom.com/products/optical-sensors/ambient-light-photo-sensors/apds-9306-065
Configuration variables:
------------------------
The ``apds9306`` sensor allows you to use your :doc:`apds9306` to perform ambient light measurements.
- **address** (*Optional*, int): The I²C address of the sensor. Should be ``0x52`` according to datasheet ("Contact factory for other addressing options").
- **gain** (*Optional*, int): The gain of the ambient light sensor. One of 1, 3, 6, 9, 18. Defaults to ``1``.
- **bit\_width** (*Optional*, int): The bit width/resolution of the ambient light sensor. One of:
- 20 - takes 400ms
- 19 - takes 200ms
- 18 - takes 100ms (``default``)
- 17 - takes 50ms
- 16 - takes 25ms
- 13 - takes 3.125ms
- **measurement\_rate** (*Optional*, int): The measurement rate of the ambient light sensor in milliseconds. One of:
- 25
- 50
- 100 (``default``);
- 200
- 500
- 1000
- **update\_interval** (*Optional*, :ref:`config-time`): The interval at which the sensor reading will be updated. Defaults to ``60s``.
- All opther options from :ref:`Sensor <config-sensor>`.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`apds9306/apds9306.h`
- :ghedit:`Edit`

View File

@ -18,9 +18,11 @@ for CO₂ and Breath Volatile Organic Compounds (b-VOC) using a correlation betw
.. note::
The BSEC library is only available for use after accepting its software license agreement. By enabling this component,
you are explicitly agreeing to the terms of the `BSEC license agreement`_. You must not distribute any compiled firmware
binaries that include this component.
- The BSEC library is only available for use after accepting its software license agreement. By enabling this component,
you are explicitly agreeing to the terms of the `BSEC license agreement`_. You must not distribute any compiled firmware
binaries that include this component.
- We recommend using the newer :doc:`bme68x_bsec2 <bme68x_bsec2>` component whenever possible.
The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,285 @@
BME68x Temperature, Humidity, Pressure & Gas Sensor via BSEC2
=============================================================
.. seo::
:description: Instructions for setting up BME68x temperature, humidity, pressure, and gas sensors via BSEC2.
:image: bme680.jpg
:keywords: BME680, BME688, BME68X, BSEC2
Component/Hub
-------------
The ``bme68x_bsec2_i2c`` sensor platform allows you to use your
`BME680 <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf>`__ and
`BME688 <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf>`__
(`Adafruit`_, `Pimoroni`_) temperature, humidity, pressure and gas sensors with ESPHome via the Bosch Sensortec
Environmental Cluster 2 (BSEC2) software library. The use of Bosch's proprietary algorithms provide an Index for Air
Quality (IAQ) measurement derived from the gas resistance sensor's response to specific Volatile Organic Compounds
(VOCs). The BSEC software also provides estimated values for CO₂ and Breath Volatile Organic Compounds (b-VOC) using
a correlation between VOC and CO₂ in a human's exhaled breath.
The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.
.. _BSEC license agreement: https://www.bosch-sensortec.com/media/boschsensortec/downloads/software/bme688_development_software/2023_04/license_terms_bme688_bme680_bsec.pdf
.. _Adafruit: https://www.adafruit.com/product/3660
.. _Pimoroni: https://shop.pimoroni.com/products/bme680-breakout
.. note::
The BSEC2 library is only available for use after accepting its software license agreement. By enabling this
component in your configuration, you are explicitly agreeing to the terms of the `BSEC license agreement`_. Note
that the license forbids distribution of any compiled firmware binaries that include this component.
.. figure:: images/bme680-full.jpg
:align: center
:width: 50.0%
BME680 Temperature, Pressure, Humidity & Gas Sensor.
.. figure:: images/bme680-bsec-ui.png
:align: center
:width: 80.0%
Example UI
.. code-block:: yaml
# Minimal example configuration with common sensors
bme68x_bsec2_i2c:
address: 0x76
model: bme680
operating_age: 28d
sample_rate: LP
voltage: 3.3V
Configuration variables:
^^^^^^^^^^^^^^^^^^^^^^^^
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x76``. The sensor can
also be configured to use ``0x77``.
- **model** (*Optional*, string): The model of the connected sensor; either ``BME680`` or ``BME688``.
- **algorithm_output** (*Optional*, string): The output of the BSEC2 algorithm. Either ``classification`` (default) or
``regression``. *Only valid when model is BME688.*
- **operating_age** (*Optional*, string): The history BSEC2 considers for the automatic background calibration of the
IAQ in days. That means changes in this time period will influence the IAQ value. Either ``4d`` or ``28d``.
- **sample_rate** (*Optional*, string): Sample rate. Default is ``LP`` for low power consumption, sampling every 3
seconds. Can be ``ULP`` for ultra-low power, sampling every 5 minutes. This controls the sampling rate for
gas-dependent sensors and will govern the interval at which the sensor heater is operated. By default, this rate will
also be used for temperature, humidity and pressure sensors but can be overridden per-sensor if required.
- **supply_voltage** (*Optional*, string): Supply voltage of the sensor. Default is ``3.3V``. Can be set to ``1.8V`` if
your sensor is powerd with 1.8 volts (for example, the Pimoroni PIM357 BME680 breakout module).
- **temperature_offset** (*Optional*, float): Temperature offset if device is in enclosure and reads too high. This
value is subtracted from the reading (for example, if the sensor reads 5°C higher than expected, set this to ``5``)
and also corrects the relative humidity readings. Defaults to ``0``.
- **state_save_interval** (*Optional*, :ref:`config-time`): The minimum interval at which to save the calibrated BSEC2
algorithm state to flash so that calibration doesn't have to start from scratch on device restart. Defaults to ``6h``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Use this ID in the sensor
section to refer to the correct BME68x sensor if you have more than one device. This will also be used to refer to
the calibrated BSEC2 algorithm state saved to flash.
Sensor
------
.. code-block:: yaml
sensor:
- platform: bme68x_bsec2
temperature:
name: "BME68x Temperature"
pressure:
name: "BME68x Pressure"
humidity:
name: "BME68x Humidity"
iaq:
name: "BME68x IAQ"
id: iaq
co2_equivalent:
name: "BME68x CO2 Equivalent"
breath_voc_equivalent:
name: "BME68x Breath VOC Equivalent"
Configuration variables:
^^^^^^^^^^^^^^^^^^^^^^^^
- **bme68x_bsec2_id** (*Optional*, :ref:`config-id`): The ID of the ``bme68x_bsec2_i2c`` component sensors will refer
to. Useful when multiple devices are present in your configuration.
- **temperature** (*Optional*): Configuration for the temperature sensor.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``LP`` for low power
consumption, sampling every 3 seconds or ``ULP`` for ultra-low power, sampling every 5 minutes.
- All other options from :ref:`Sensor <config-sensor>`.
- **pressure** (*Optional*): Configuration for the pressure sensor.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``LP`` for low power
consumption, sampling every 3 seconds or ``ULP`` for ultra-low power, sampling every 5 minutes.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (*Optional*): Configuration for the humidity sensor.
- **sample_rate** (*Optional*, string): Optional sample rate override for this sensor. Can be ``LP`` for low power
consumption, sampling every 3 seconds or ``ULP`` for ultra-low power, sampling every 5 minutes.
- All other options from :ref:`Sensor <config-sensor>`.
- **gas_resistance** (*Optional*): Configuration for the gas sensor.
- All options from :ref:`Sensor <config-sensor>`.
- **iaq** (*Optional*): Configuration for the IAQ sensor.
- All options from :ref:`Sensor <config-sensor>`.
- **iaq_static** (*Optional*): Configuration for the IAQ static sensor.
- All options from :ref:`Sensor <config-sensor>`.
- **iaq_accuracy** (*Optional*): Configuration for the numeric IAQ accuracy sensor.
- All options from :ref:`Sensor <config-sensor>`.
- **co2_equivalent** (*Optional*): Configuration for the CO₂ equivalent sensor.
- All options from :ref:`Sensor <config-sensor>`.
- **breath_voc_equivalent** (*Optional*): Configuration for the Breath VOC equivalent humidity sensor.
- All options from :ref:`Sensor <config-sensor>`.
Text Sensor
-----------
The sensor's accuracy can be reported in text format.
.. code-block:: yaml
text_sensor:
- platform: bme68x_bsec2
iaq_accuracy:
name: "BME68x IAQ Accuracy"
Configuration variables:
^^^^^^^^^^^^^^^^^^^^^^^^
- **bme68x_bsec2_id** (*Optional*, :ref:`config-id`): The ID of the ``bme68x_bsec2_i2c`` component the text sensor
will refer to. Useful when multiple devices are present in your configuration.
- **iaq_accuracy** (*Optional*): Configuration for the IAQ accuracy sensor. Shows: ``Stabilizing``, ``Uncertain``,
``Calibrating``, ``Calibrated``.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
Index for Air Quality (IAQ) Measurement
---------------------------------------
The measurements are expressed with an index scale ranging from 0 to 500. The index itself is deduced from tests using
ethanol gas, as well as important VOC in the exhaled breath of healthy humans. The VOC values themselves are derived
from several publications on breath analysis studies. The BSEC2 software library defines the levels as follows:
+-----------+---------------------+
| IAQ Index | Air Quality |
+===========+=====================+
| 0 - 50 | Excellent |
+-----------+---------------------+
| 51 - 100 | Good |
+-----------+---------------------+
| 101 - 150 | Lightly polluted |
+-----------+---------------------+
| 151 - 200 | Moderately polluted |
+-----------+---------------------+
| 201 - 250 | Heavily polluted |
+-----------+---------------------+
| 251 - 350 | Severely polluted |
+-----------+---------------------+
| > 351 | Extremely polluted |
+-----------+---------------------+
This can be represented by a template text sensor such as below
.. code-block:: yaml
text_sensor:
- platform: template
name: "BME68x IAQ Classification"
lambda: |-
if ( int(id(iaq).state) <= 50) {
return {"Excellent"};
}
else if (int(id(iaq).state) >= 51 && int(id(iaq).state) <= 100) {
return {"Good"};
}
else if (int(id(iaq).state) >= 101 && int(id(iaq).state) <= 150) {
return {"Lightly polluted"};
}
else if (int(id(iaq).state) >= 151 && int(id(iaq).state) <= 200) {
return {"Moderately polluted"};
}
else if (int(id(iaq).state) >= 201 && int(id(iaq).state) <= 250) {
return {"Heavily polluted"};
}
else if (int(id(iaq).state) >= 251 && int(id(iaq).state) <= 350) {
return {"Severely polluted"};
}
else if (int(id(iaq).state) >= 351) {
return {"Extremely polluted"};
}
else {
return {"error"};
}
The selected b-VOC gasses are as follows:
+--------------------+----------------+
| Compound | Molar fraction |
+====================+================+
| `Ethane`_ | 5 ppm |
+--------------------+----------------+
| `Isoprene`_ | 10 ppm |
+--------------------+----------------+
| `Ethanol`_ | 10 ppm |
+--------------------+----------------+
| `Acetone`_ | 50 ppm |
+--------------------+----------------+
| `Carbon Monoxide`_ | 15 ppm |
+--------------------+----------------+
.. _Ethane: https://en.wikipedia.org/wiki/Ethane
.. _Isoprene: https://en.wikipedia.org/wiki/Isoprene
.. _Ethanol: https://en.wikipedia.org/wiki/Ethanol
.. _Acetone: https://en.wikipedia.org/wiki/Acetone
.. _Carbon Monoxide: https://en.wikipedia.org/wiki/Carbon_monoxide
.. _bsec2-calibration:
IAQ Accuracy and Calibration
----------------------------
The BSEC2 software automatically calibrates in the background to provide consistent IAQ performance. The calibration
process considers the recent measurement history so that a value of 50 corresponds to a “typical good” level and a
value of 200 to a “typical polluted” level. The IAQ Accuracy sensor will indicate one of the following values:
- ``Stabilizing``: The device has just started, and the sensor is stabilizing (this typically lasts 5 minutes)
- ``Uncertain``: The background history of BSEC2 is uncertain. This typically means the gas sensor data was too stable
for BSEC2 to clearly define its reference.
- ``Calibrating``: BSEC2 found new calibration data and is currently calibrating.
- ``Calibrated``: BSEC2 calibrated successfully.
Every ``state_save_interval``, or as soon thereafter when full calibration is reached, the current algorithm state is
saved to flash so that the process does not have to start from scratch on device restart.
See Also
--------
- :ref:`sensor-filters`
- :doc:`absolute_humidity`
- :doc:`bme680`
- :apiref:`bme68x_bsec2_i2c/bme68x_bsec2_i2c.h`
- `BME680 datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf>`__
- `BME688 datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf>`__
- `BME680 VOC classification <https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME680-VOC-classification/td-p/26154>`__
- `Bosch BSEC2 Library <https://github.com/boschsensortec/Bosch-BSEC2-Library>`__ by `Bosch Sensortec <https://www.bosch-sensortec.com/>`__
- `Bosch Sensortec Community <https://community.bosch-sensortec.com/>`__
- :ghedit:`Edit`

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -11,6 +11,12 @@ The ``esp32_hall`` sensor platform allows you to use the integrated
ESP32 chip to measure the magnitude and direction of magnetic field around the
chip (with quite poor accuracy).
.. warning::
Espressif has `removed support <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.0/peripherals.html?highlight=hall_sensor_read#api-changes>`__
for the ESP32's Hall sensor in IDF 5; for this reason, support for this component is
likely to be removed in a future release.
Please make sure that nothing is connected to pins ``GPIO36`` and ``GPIO39`` if this
component is enabled, as those pins are used for the internal low-noise amplifier used
by the hall sensor.

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -296,6 +296,27 @@ Rounds the value to the given decimal places.
- round: 1 # will round to 1 decimal place
``round_to_multiple_of``
************************
Rounds the value to the nearest multiple. Takes a float greater than zero.
.. code-block:: yaml
- platform: ...
filters:
- round_to_multiple_of: 10
# 123 -> 120
# 126 -> 130
- platform: ...
filters:
- round_to_multiple_of: 0.25
# 3.1415 -> 3.25
# 1.6180 -> 1.5
``quantile``
************

View File

@ -6,7 +6,7 @@ JSN-SR04T Waterproof Ultrasonic Range Finder
:image: jsn-sr04t-v3.jpg
:keywords: JSN-SR04T
This sensor allows you to use the JSN-SR04T Waterproof Ultrasonic Range Finder **in Mode 1 and 2**
This sensor allows you to use the JSN-SR04T and AJ_SR04M Waterproof Ultrasonic Range Finder **in Mode 1 and 2**
with ESPHome to measure distances. This sensor can measure
ranges between 25 centimeters and 600 centimeters with a resolution of 1 millimeter.
@ -18,6 +18,12 @@ Configure the JSN-SR04T for mode 2:
- **V1.0 and V2.0**: Add a 120k resistor to pad R27.
- **V3.0**: Short pad M2 or add 120k resistor to pad mode.
Configure the AJ_SR04M for mode 1:
- Add a 120k resistor to pad R19.
Configure the AJ_SR04M for mode 2:
- Add a 47k resistor to pad R19.
.. figure:: images/jsn-sr04t-v3-mode-select-pads.jpg
:align: center
:width: 50.0%
@ -54,6 +60,7 @@ Configuration variables:
sensor. Defaults to ``60s``. Not applicable in mode 1.
- **uart_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`UART bus <uart>` you wish to use for this sensor.
Use this if you want to use multiple UART buses at once.
- **model** (*Optional*): Sensor model. Available options: ``jsn_sr04t`` (default) and ``aj_sr04t``.
- All other options from :ref:`Sensor <config-sensor>`.
See Also

View File

@ -156,7 +156,7 @@ Configuration variables:
- **detection_distance** (*Optional*, int): Distance in cm of target.
All options from :ref:`Sensor <config-sensor>`.
- **gX** (*Optional*): Energies for the Xth gate (X => 0 to 8).
- **move_energy** (*Optional*, int): When in :ref:`engineering mode<ld2410-engineering-mode>`, the move energy of the gate, otherwise ``unknown``.
Value between ``0`` and ``100`` inclusive.
All options from :ref:`Sensor <config-sensor>`.
@ -276,7 +276,7 @@ Configuration variables:
Value between ``2`` and ``8`` inclusive. Defaults to ``8``.
All options from :ref:`Number <config-number>`.
- **gX** (*Optional*): Thresholds for the Xth gate (X => 0 to 8).
- **move_threshold** (**Required**, int): Threshold for the gate for motion detection.
Above this level for the considered gate (distance), movement detection will be triggered.
Value between ``0`` and ``100`` inclusive. See default values below.
@ -435,8 +435,8 @@ To change the password from HA you can use the following example config:
id: my_ld2410
api:
services:
- service: set_ld2410_bluetooth_password
actions:
- action: set_ld2410_bluetooth_password
variables:
password: string
then:

View File

@ -0,0 +1,46 @@
LVGL Sensor
===========
.. seo::
:description: Instructions for setting up an LVGL widget sensor component.
:image: ../images/lvgl_c_num.png
The ``lvgl`` sensor platform creates a semsor component from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-arc`, :ref:`lvgl-widget-bar`, :ref:`lvgl-widget-slider` and :ref:`lvgl-widget-spinbox`. A single sensor supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome sensor.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the sensor.
- All other variables from :ref:`Sensor <config-sensor>`.
Example:
.. code-block:: yaml
sensor:
- platform: lvgl
widget: slider_id
name: LVGL Slider
.. note::
Widget-specific actions (``lvgl.arc.update``, ``lvgl.bar.update``, ``lvgl.slider.update``, ``lvgl.spinbox.update``, ``lvgl.spinbox.decrement``, ``lvgl.spinbox.increment``) will trigger correspponding component updates to be sent to Home Assistant.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Arc widget <lvgl-widget-arc>`
- :ref:`Bar widget <lvgl-widget-bar>`
- :ref:`Slider widget <lvgl-widget-slider>`
- :ref:`Spinbox widget <lvgl-widget-spinbox>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

View File

@ -0,0 +1,145 @@
M5Stack Unit 8 Angle
====================
.. seo::
:description: Setting up the M5Stack Unit 8 Angle input device with 8 knobs.
:image: m5stack_8angle.png
Component/Hub
-------------
The ``m5stack_8angle`` platform allows to use the [m5angle](https://docs.m5stack.com/en/unit/UNIT%208Angle) input device with ESPHome.
It has 8 knobs, a switch and can individually drive 9 RGB LEDs.
.. figure:: images/m5stack_8angle.jpg
:align: center
:width: 75.0%
The m5stack_8angle unit.
The ``m5stack_8angle`` component communicates through an :ref:`I²C <i2c>` bus and uses a default address of 0x43.
.. code-block:: yaml
# Example configuration entry
m5stack_8angle:
id: m5stack_8angle_base
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component <i2c>` if you need
- **address** (*Optional*, int): Manually specify the I²C address of the device. Defaults to ``0x43``.
Knob's position sensor
----------------------
The position of the 8 knobs can be made available as sensors with values between 0-1 (with 0 being the leftmost position).
.. code-block:: yaml
sensor:
- platform: m5stack_8angle
m5stack_8angle_id: m5stack_8angle_base
channel: 1
name: "Knob 1"
bit_depth: 12 bit
- platform: m5stack_8angle
m5stack_8angle_id: m5stack_8angle_base
channel: 2
name: "Knob 2"
Configuration variables:
************************
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``10s``.
- **bit_depth** (*Optional*, one of ``12 bit`` or ``8 bit``) determines the precision of the analog readout, defaults to ``8bit``.
- **raw** (*Optional*, boolean) if true, the sensor returns the raw readout value of the knob.
- All other options from :ref:`Sensor <config-sensor>`.
Input switch binary sensor
--------------------------
A binary sensor indicating the state of the switch on the device.
.. code-block:: yaml
binary_sensor:
- platform: m5stack_8angle
m5stack_8angle_id: m5stack_8angle_base
name: "Switch"
Configuration variables:
************************
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``10s``.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Lights
------
The 9 LEDs can be used a addressable light output.
.. code-block:: yaml
light:
- platform: m5stack_8angle
m5stack_8angle_id: m5stack_8angle_base
id: m8_angle_leds
name: "Lights"
effects:
- addressable_rainbow:
Configuration variables:
************************
- All options from :ref:`Light <config-light>`.
Read knob's positions and switch state in Lambdas
-------------------------------------------------
You can trigger the readout of the position of an individual knob through ``float value = id(...)->read_knob_pos(index);`` and of the switch through ``int value = id(...)->read_switch();``.
A negative return value indicates a failure to read the state.
.. code-block:: yaml
# Example configuration entry for having the LEDs indicate the knobs' position
light:
- platform: m5stack_8angle
m5stack_8angle_id: m5stack_8angle_base
id: m8_angle_leds
name: "Lights"
effects:
- addressable_lambda:
name: "Indicate Values"
update_interval: 200ms
lambda: |-
ESPHSVColor hsv;
hsv.value = 255;
hsv.saturation = 240;
auto parent = id(m5stack_8angle_base);
for (int i=0; i < 8; i++) {
auto kpos = parent->read_knob_pos(i);
if (kpos >= 0){
hsv.hue = kpos * 200;
it[i] = hsv;
}
}
if (parent->read_switch() > 0)
hsv.hue = 200;
else
hsv.hue = 0;
it[8] = hsv;
See Also
--------
- :ref:`sensor-filters`
- :doc:`/components/binary_sensor/index`
- :doc:`/components/light/index`
- :doc:`template`
- :apiref:`m5stack_8angle/m5stack_8angle.h`
- :ghedit:`Edit`

View File

@ -82,13 +82,13 @@ for over 20 minutes and you execute this function.
then:
- mhz19.calibrate_zero: my_mhz19_id
You can provide :ref:`service <api-services>` to call it from Home Assistant
You can provide an :ref:`action <api-device-actions>` to perform from Home Assistant
.. code-block:: yaml
api:
services:
- service: mhz19_calibrate_zero
actions:
- action: mhz19_calibrate_zero
then:
- mhz19.calibrate_zero: my_mhz19_id

View File

@ -104,10 +104,10 @@ trying to match.
.. code-block:: yaml
# Set pulse counter total from home assistant using this service call:
# Set pulse counter total from home assistant using this action:
api:
services:
- service: set_pulse_total
actions:
- action: set_pulse_total
variables:
new_pulse_total: int
then:

View File

@ -90,8 +90,8 @@ trying to match.
.. code-block:: yaml
api:
services:
- service: set_total
actions:
- action: set_total
variables:
new_total: int
then:

View File

@ -99,13 +99,13 @@ As of April 2022 the average fresh air Co² concentration is 419 ppm.
value: 419 # outside average April 2022
id: my_scd41
value can also be a template, for example to define a Home Assistant calibration service:
value can also be a template, for example to define a Home Assistant calibration action:
.. code-block:: yaml
api:
services:
- service: calibrate_co2_value
actions:
- action: calibrate_co2_value
variables:
co2_ppm: int
then:
@ -160,8 +160,8 @@ This example creates a service `set_ambient_pressure` that can be called from Ho
.. code-block:: yaml
api:
services:
- service: set_ambient_pressure
actions:
- action: set_ambient_pressure
variables:
pressure_mbar: int
then:

View File

@ -4,7 +4,7 @@ Xiaomi Mijia BLE Sensors
.. seo::
:description: Instructions for setting up Xiaomi Mi Home (Mijia) bluetooth-based sensors in ESPHome.
:image: xiaomi_mijia_logo.jpg
:keywords: Xiaomi, Mi Home, Mijia, BLE, Bluetooth, HHCCJCY01, GCLS002, HHCCPOT002, LYWSDCGQ, LYWSD02, CGG1, LYWSD03MMC, CGD1, JQJCY01YM, MUE4094RT, WX08ZM, MHO, C401, MHOC401
:keywords: Xiaomi, Mi Home, Mijia, BLE, Bluetooth, HHCCJCY01, GCLS002, HHCCPOT002, LYWSDCGQ, LYWSD02, LYWSD02MMC, CGG1, LYWSD03MMC, CGD1, JQJCY01YM, MUE4094RT, WX08ZM, MHO, C401, MHOC401
The ``xiaomi_ble`` sensor platform lets you track the output of Xiaomi Bluetooth Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track, for example, the temperature, humidity, moisture, conductivity, illuminance, formaldehyde, mosquito tablet and battery level of the device every time the sensor sends out a BLE broadcast. Contrary to other implementations, ``xiaomi_ble`` listens passively to advertisement packets and does not pair with the device. Hence ESPHome has no impact on battery life. Thus, if you only use such sensors, you can safely set ``scan_parameters.active: false`` in ``esp32_ble_tracker`` configuration, to save from spamming your RF environment with useless scan requests.
@ -143,6 +143,26 @@ Configuration example:
battery_level:
name: "LYWSD02 Battery Level"
LYWSD02MMC
**********
Hygro thermometer, rectangular body, e-ink display, broadcasts temperature, humidity and battery level. Encrypted.
Configuration example:
.. code-block:: yaml
sensor:
- platform: xiaomi_lywsd02mmc
mac_address: "A4:C1:38:54:5E:18"
bindkey: "2529d8e0d23150a588675cc54ad48400"
temperature:
name: "LYWSD02MMC Temperature"
humidity:
name: "LYWSD02MMC Humidity"
battery_level:
name: "LYWSD02MMC Battery Level"
CGG1
****

View File

@ -245,8 +245,8 @@ on Home Assistant and will also setup a service so you can send messages and dia
.. code-block:: yaml
api:
services:
- service: send_sms
actions:
- action: send_sms
variables:
recipient: string
message: string
@ -254,19 +254,19 @@ on Home Assistant and will also setup a service so you can send messages and dia
- sim800l.send_sms:
recipient: !lambda 'return recipient;'
message: !lambda 'return message;'
- service: dial
- action: dial
variables:
recipient: string
then:
- sim800l.dial:
recipient: !lambda 'return recipient;'
- service: connect
- action: connect
then:
- sim800l.connect
- service: disconnect
- action: disconnect
then:
- sim800l.disconnect
- service: send_ussd
- action: send_ussd
variables:
ussdCode: string
then:
@ -320,11 +320,11 @@ To trigger the automation from Home Assistant you can invoke the service with th
automation:
# ...
action:
- service: esphome.livingroom_send_sms
- action: esphome.livingroom_send_sms
data:
recipient: "+15551234567"
message: "Hello World!"
- service: esphome.livingroom_dial
- action: esphome.livingroom_dial
data:
recipient: "+15551234567"

View File

@ -60,6 +60,17 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): The speaker to control. Defaults to the only one in YAML.
.. _speaker-finish:
``speaker.finish`` Action
^^^^^^^^^^^^^^^^^^^^^^^^^
This action will stop playing audio data from the speaker after all data **is** played.
Configuration variables:
- **id** (*Optional*, :ref:`config-id`): The speaker to control. Defaults to the only one in YAML.
.. _speaker-conditions:
Speaker Conditions
@ -79,6 +90,21 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): The speaker to check. Defaults to the only one in YAML.
.. _speaker-is_stopped:
``speaker.is_stopped`` Condition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This condition will check if the speaker is fully stopped audio data and is in idle mode.
.. note:
Between the time ``speaker.is_playing`` is false and ``speaker.is_stopped`` is true the 'speaker' component is closing down structures that where used to play the data correctly. *It better to check if the speaker is stopped then that if it plays.*
Configuration variables:
- **id** (*Optional*, :ref:`config-id`): The speaker to check. Defaults to the only one in YAML.
Platforms
---------

View File

@ -1087,38 +1087,38 @@ memory use.
Expose Sprinkler Controller Actions via user-API
************************************************
This configuration snippet illustrates how user-defined ESPHome API services may be used to expose
This configuration snippet illustrates how user-defined ESPHome API actions may be used to expose
various sprinkler controller actions to the front end. This could be useful to change settings
and/or trigger sprinkler controller actions using automations.
.. code-block:: yaml
api:
services:
- service: set_multiplier
actions:
- action: set_multiplier
variables:
multiplier: float
then:
- sprinkler.set_multiplier:
id: lawn_sprinkler_ctrlr
multiplier: !lambda 'return multiplier;'
- service: start_full_cycle
- action: start_full_cycle
then:
- sprinkler.start_full_cycle: lawn_sprinkler_ctrlr
- service: start_single_valve
- action: start_single_valve
variables:
valve: int
then:
- sprinkler.start_single_valve:
id: lawn_sprinkler_ctrlr
valve_number: !lambda 'return valve;'
- service: next_valve
- action: next_valve
then:
- sprinkler.next_valve: lawn_sprinkler_ctrlr
- service: previous_valve
- action: previous_valve
then:
- sprinkler.previous_valve: lawn_sprinkler_ctrlr
- service: shutdown
- action: shutdown
then:
- sprinkler.shutdown: lawn_sprinkler_ctrlr

View File

@ -0,0 +1,30 @@
Home Assistant Switch
=====================
.. seo::
:description: Instructions for setting up Home Assistant Switch with ESPHome that import states and allows control via your Home Assistant instance.
:image: home-assistant.svg
The ``homeassistant`` Switch platform allows you to create Switch that **import**
states and allow **control** via your Home Assistant instance using the :doc:`native API </components/api>`.
.. code-block:: yaml
# Example configuration entry
switch:
- platform: homeassistant
id: my_cool_switch_from_ha
entity_id: switch.my_cool_switch
Configuration variables:
------------------------
- **entity_id** (**Required**, string): The entity ID to import / control from Home Assistant.
- All other options from :ref:`Switch <config-switch>`.
See Also
--------
- :ref:`automation`
- :apiref:`homeassistant/switch/homeassistant_switch.h`
- :ghedit:`Edit`

View File

@ -0,0 +1,42 @@
LVGL Switch
===========
.. seo::
:description: Instructions for setting up an LVGL widget switch.
:image: ../images/lvgl_c_swi.png
The ``lvgl`` switch platform creates a switch from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-button` (with ``checkable`` option enabled), :ref:`lvgl-widget-switch` and :ref:`lvgl-widget-checkbox`. A single switch supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome switch component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the switch.
- All other variables from :ref:`Switch <config-switch>`.
Example:
.. code-block:: yaml
switch:
- platform: lvgl
widget: checkbox_id
name: LVGL switch
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Button widget <lvgl-widget-button>`
- :ref:`Switch widget <lvgl-widget-switch>`
- :ref:`Checkbox widget <lvgl-widget-checkbox>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :doc:`/components/output/index`
- :ghedit:`Edit`

43
components/text/lvgl.rst Normal file
View File

@ -0,0 +1,43 @@
LVGL Text
=========
.. seo::
:description: Instructions for setting up an LVGL Text component.
:image: ../images/lvgl_c_txt.png
The ``lvgl`` text platform creates an editable text component from an LVGL textual widget and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-label` and :ref:`lvgl-widget-textarea`. A single text supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome text component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a ``textarea`` widget configured in LVGL, which will reflect the state of the text component.
- All other variables from :ref:`Text <config-text>`.
Example:
.. code-block:: yaml
text:
- platform: lvgl
widget: textarea_id
name: "Textarea 1 text"
.. note::
Widget-specific actions (``lvgl.label.update``, ``lvgl.textarea.update``) will trigger correspponding component updates to be sent to Home Assistant.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Label widget <lvgl-widget-label>`
- :ref:`Textarea widget <lvgl-widget-textarea>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`

View File

@ -0,0 +1,44 @@
LVGL Text Sensor
================
.. seo::
:description: Instructions for setting up an LVGL Text Sensor.
:image: ../images/lvgl_c_txt.png
The ``lvgl`` text sensor platform creates a Text Sensor from an LVGL textual widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.
Supported widgets are :ref:`lvgl-widget-label` and :ref:`lvgl-widget-textarea`. A single text sensor supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome text sensor component.
Configuration variables:
------------------------
- **widget** (**Required**): The ID of a ``textarea`` widget configured in LVGL, which will reflect the state of the text sensor.
- All other variables from :ref:`Text Sensor <config-text_sensor>`.
Example:
.. code-block:: yaml
text_sensor:
- platform: lvgl
widget: textarea_id
name: "Textarea 1 text"
.. note::
Widget-specific actions (``lvgl.label.update``, ``lvgl.textarea.update``) will trigger correspponding component updates to be sent to Home Assistant.
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Label widget <lvgl-widget-label>`
- :ref:`Textarea widget <lvgl-widget-textarea>`
- :doc:`/components/binary_sensor/lvgl`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/text/lvgl`
- :ghedit:`Edit`

View File

@ -133,14 +133,14 @@ You also can control this component with lambda expressions
.. code-block:: yaml
api:
services:
- service: battery_level
actions:
- action: battery_level
variables:
level: int
then:
- lambda: |-
id(tm1651_battery).set_level(level);
- service: battery_brightness
- action: battery_brightness
variables:
brightness: int
then:

View File

@ -298,6 +298,9 @@ Configuration variables:
- **y_min** (**Required**, int): Top coordinate of the screen area to be detected as the virtual button.
- **y_max** (**Required**, int): Bottom coordinate of the screen area to be detected as the virtual button.
- **page_id** (*Optional*, :ref:`config-id`): Only trigger this binary sensor if the display is showing this page.
Cannot be used with ``pages``.
- **pages** (*Optional*, list of :ref:`config-id`): Only trigger this binary sensor if the display is showing one of these pages.
Cannot be used with ``page_id``.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.

View File

@ -39,6 +39,31 @@ Configuration variables:
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Specifying an ``id`` without a ``name`` will
implicitly set this to true.
- **on_update_available** (*Optional*, :ref:`Action <config-action>`): An automation to perform when an update is available.
Automations
-----------
``update.perform`` Action
~~~~~~~~~~~~~~~~~~~~~~~~~
This action allows you to trigger the update entity to start the update process.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the update entity.
- **force_update** (*Optional*, boolean): Perform the update even if the device is already running the same version.
Defaults to ``false``.
``update.is_available`` Condition
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This condition checks if an update is available for the device.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the update entity.
See Also
--------

View File

@ -67,9 +67,9 @@ author = "ESPHome"
# built documents.
#
# The short X.Y version.
version = "2024.7"
version = "2024.8"
# The full version, including alpha/beta/rc tags.
release = "2024.7.3"
release = "2024.8.0b1"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -111,7 +111,7 @@ The automation to show the CO2 warning light (e.g. red if CO2 > 1000 ppm) is don
above: 1000
condition: []
action:
- service: light.turn_on
- action: light.turn_on
data:
color_name: red
entity_id: light.pl2
@ -125,7 +125,7 @@ The automation to show the CO2 warning light (e.g. red if CO2 > 1000 ppm) is don
below: 800
condition: []
action:
- service: light.turn_off
- action: light.turn_off
entity_id: light.pl2
mode: single
- alias: "State Light Mapping"
@ -134,7 +134,7 @@ The automation to show the CO2 warning light (e.g. red if CO2 > 1000 ppm) is don
# You can also match on interval. This will match every 5 minutes
minutes: "/5"
action:
- service: light.turn_on
- action: light.turn_on
data_template:
entity_id: light.pl1
brightness_pct: 30

View File

@ -108,8 +108,8 @@ Using this action, you are able to reset/set the total pulse count. This can be
.. code-block:: yaml
api:
services:
- service: set_total
actions:
- action: set_total
variables:
new_total: int
then:
@ -137,7 +137,7 @@ Additionally you can also calculate the total daily energy generated, for which
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
time:
- platform: homeassistant
id: homeassistant_time

View File

@ -86,8 +86,8 @@ Native API Custom Component
---------------------------
If you want to communicate directly with Home Assistant via the :doc:`native API </components/api>`
you can use the :apiclass:`api::CustomAPIDevice` class to declare services that can be executed from
Home Assistant, as well as starting services in Home Assistant.
you can use the :apiclass:`api::CustomAPIDevice` class to declare actions that can be performed from
Home Assistant, as well as performing actions in Home Assistant.
.. code-block:: cpp

View File

@ -140,7 +140,7 @@ The ``esphome upload <CONFIG>`` validates the configuration and uploads the most
.. program:: esphome clean-mqtt
The ``esphome clean-mqtt <CONFIG>`` cleans retained MQTT discovery messages from the MQTT broker.
See :ref:`mqtt-using_with_home_assistant`.
See :ref:`mqtt-using_with_home_assistant_entities`.
.. option:: --topic TOPIC

View File

@ -3,5 +3,6 @@ Guides
.. toctree::
:glob:
:maxdepth: 1
*

View File

@ -224,6 +224,7 @@ Contributors
- `bleeisme (@bleeisme) <https://github.com/bleeisme>`__
- `Jim Ekman (@blejdfist) <https://github.com/blejdfist>`__
- `blindguynar (@blindguynar) <https://github.com/blindguynar>`__
- `BlueSkyB (@BlueSkyB) <https://github.com/BlueSkyB>`__
- `Scott Smith (@blurfl) <https://github.com/blurfl>`__
- `Bruno Medici (@bmedici) <https://github.com/bmedici>`__
- `Bob (@Bmooij) <https://github.com/Bmooij>`__
@ -512,6 +513,7 @@ Contributors
- `Jannick (@DutchDeffy) <https://github.com/DutchDeffy>`__
- `David van der Leij (@dvanderleij) <https://github.com/dvanderleij>`__
- `dwildstr (@dwildstr) <https://github.com/dwildstr>`__
- `David Woodhouse (@dwmw2) <https://github.com/dwmw2>`__
- `dxta1986 (@dxta1986) <https://github.com/dxta1986>`__
- `dyarkovoy (@dyarkovoy) <https://github.com/dyarkovoy>`__
- `Janez Troha (@dz0ny) <https://github.com/dz0ny>`__
@ -619,6 +621,7 @@ Contributors
- `Fabio Pugliese Ornellas (@fornellas) <https://github.com/fornellas>`__
- `SmartShackMaster (@fototakas) <https://github.com/fototakas>`__
- `foxsam21 (@foxsam21) <https://github.com/foxsam21>`__
- `ESP32andmore (@fpovoski) <https://github.com/fpovoski>`__
- `Fractal147 (@Fractal147) <https://github.com/Fractal147>`__
- `Francis-labo (@Francis-labo) <https://github.com/Francis-labo>`__
- `Francisk0 (@Francisk0) <https://github.com/Francisk0>`__
@ -914,6 +917,7 @@ Contributors
- `jsuanet (@jsuanet) <https://github.com/jsuanet>`__
- `James Szalay (@jtszalay) <https://github.com/jtszalay>`__
- `Jules-R (@Jules-R) <https://github.com/Jules-R>`__
- `Julian Stremel (@JulianStremel) <https://github.com/JulianStremel>`__
- `Julie Koubová (@juliekoubova) <https://github.com/juliekoubova>`__
- `junkie1969 (@junkie1969) <https://github.com/junkie1969>`__
- `junnikokuki (@junnikokuki) <https://github.com/junnikokuki>`__
@ -1218,6 +1222,7 @@ Contributors
- `Chris Laplante (@mostthingsweb) <https://github.com/mostthingsweb>`__
- `Matthew Pettitt (@mpettitt) <https://github.com/mpettitt>`__
- `Michael P. Flaga (@mpflaga) <https://github.com/mpflaga>`__
- `Björn Ebbinghaus (@MrEbbinghaus) <https://github.com/MrEbbinghaus>`__
- `Sam Hughes (@MrEditor97) <https://github.com/MrEditor97>`__
- `MrEditor97 (@mreditor97) <https://github.com/mreditor97>`__
- `MRemy2 (@MRemy2) <https://github.com/MRemy2>`__
@ -1335,6 +1340,7 @@ Contributors
- `ogatatsu (@ogatatsu) <https://github.com/ogatatsu>`__
- `Oğuzhan Başer (@oguzhanbaser) <https://github.com/oguzhanbaser>`__
- `Larry (@ojaksch) <https://github.com/ojaksch>`__
- `ojwc (@ojwc) <https://github.com/ojwc>`__
- `OkhammahkO (@OkhammahkO) <https://github.com/OkhammahkO>`__
- `Oleg Tarasov (@olegtarasov) <https://github.com/olegtarasov>`__
- `Oliver Hihn (@oliverhihn) <https://github.com/oliverhihn>`__
@ -1730,6 +1736,7 @@ Contributors
- `Alan Lord (@theopensourcerer) <https://github.com/theopensourcerer>`__
- `Simon (@theOzzieRat) <https://github.com/theOzzieRat>`__
- `Brian Levinsen (@therealeldaria) <https://github.com/therealeldaria>`__
- `thevogoncoder (@thevogoncoder) <https://github.com/thevogoncoder>`__
- `Steve Scott (@thewishy) <https://github.com/thewishy>`__
- `Zachery Notz (@TheZackCodec) <https://github.com/TheZackCodec>`__
- `Florian Gareis (@TheZoker) <https://github.com/TheZoker>`__
@ -1924,4 +1931,4 @@ Contributors
- `Christian Zufferey (@zuzu59) <https://github.com/zuzu59>`__
- `Zynth-dev (@Zynth-dev) <https://github.com/Zynth-dev>`__
*This page was last updated August 1, 2024.*
*This page was last updated August 14, 2024.*

BIN
images/apds9306.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.18 19C13.35 19.72 13.64 20.39 14.03 21H5C3.9 21 3 20.11 3 19V5C3 3.9 3.9 3 5 3H19C20.11 3 21 3.9 21 5V11.18C20.5 11.07 20 11 19.5 11C19.33 11 19.17 11 19 11.03V5H5V19H13.18M11.21 15.83L9.25 13.47L6.5 17H13.03C13.14 15.54 13.73 14.22 14.64 13.19L13.96 12.29L11.21 15.83M19 13.5V12L16.75 14.25L19 16.5V15C20.38 15 21.5 16.12 21.5 17.5C21.5 17.9 21.41 18.28 21.24 18.62L22.33 19.71C22.75 19.08 23 18.32 23 17.5C23 15.29 21.21 13.5 19 13.5M19 20C17.62 20 16.5 18.88 16.5 17.5C16.5 17.1 16.59 16.72 16.76 16.38L15.67 15.29C15.25 15.92 15 16.68 15 17.5C15 19.71 16.79 21.5 19 21.5V23L21.25 20.75L19 18.5V20Z" /></svg>

After

Width:  |  Height:  |  Size: 684 B

BIN
images/lvgl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
images/lvgl_c_bns.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/lvgl_c_lig.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Some files were not shown because too many files have changed in this diff Show More