Merge branch 'next' into uart-tx-buffer

This commit is contained in:
brambo123 2024-05-07 12:49:12 +02:00 committed by GitHub
commit 913bddb1a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
365 changed files with 5020 additions and 2297 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
@ -9,10 +9,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
COPY requirements.txt .
RUN useradd -ms /bin/bash esphome
USER esphome
WORKDIR /workspaces/esphome-docs
ENV PATH="${PATH}:/home/esphome/.local/bin"
COPY requirements.txt ./
RUN pip3 install --no-cache-dir --no-binary :all: -r requirements.txt
EXPOSE 8000
WORKDIR /data/esphomedocs
CMD ["make", "live-html"]
LABEL \
org.opencontainers.image.title="esphome-docs" \
org.opencontainers.image.description="An image to help with ESPHomes documentation development" \
org.opencontainers.image.vendor="ESPHome" \
org.opencontainers.image.licenses="CC BY-NC-SA 4.0" \
org.opencontainers.image.url="https://esphome.io" \
org.opencontainers.image.source="https://github.com/esphome/esphome-docs" \
org.opencontainers.image.documentation="https://github.com/esphome/esphome-docs/blob/current/README.md"

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.3.0-dev
PROJECT_NUMBER = 2024.4.2
# 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 = dev
ESPHOME_REF = 2024.4.2
.PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

View File

@ -240,6 +240,11 @@ a:hover code {
background: none;
}
/* don't underline links that contain an image and nothing else */
a:has(> img:only-child) {
border-bottom: none;
}
div.body p, div.body dd, div.body li, div.body blockquote {
hyphens: none;
}

View File

@ -1 +1 @@
2024.3.0-dev
2024.4.2

View File

@ -16,6 +16,7 @@
<link rel="icon" type="image/png" sizes="16x16" href="/_static/favicon-16x16.png">
<link rel="manifest" href="/_static/site.webmanifest">
<link rel="mask-icon" href="/_static/safari-pinned-tab.svg" color="#646464">
<link rel="me" href="https://fosstodon.org/@esphome">
<meta name="apple-mobile-web-app-title" content="ESPHome">
<meta name="application-name" content="ESPHome">
<meta name="msapplication-TileColor" content="#dfdfdf">
@ -40,7 +41,7 @@
{% block footer %}
<div id="upgrade-footer">
A new version has been release since you last visited this page: {{ release }} 🎉
A new version has been released since you last visited this page: {{ release }} 🎉
<div class="footer-button-container">
<div role="button" id="upgrade-footer-dismiss" class="footer-button">Dismiss</div>
<a id="upgrade-footer-changelog" class="footer-button" href="/changelog/{{ version }}.0.html">View Changelog</a>

View File

@ -14,7 +14,7 @@ ESPHome 2023.12.0 - 20th December 2023
GT911, components/touchscreen/gt911, esp32_s3_box_3.png
Pylontech Batteries, components/pylontech, pylontech.jpg
HE60R Cover, components/cover/he60r, he60r.jpg
Graphical Display Menu, components/display_menu/graphical_display_menu, graphical_display_menu.jpg
Graphical Display Menu, components/display_menu/graphical_display_menu, graphical_display_menu.png
FT63X6, components/touchscreen/ft63x6, wt32-sc01.png
A02YYUW, components/sensor/a02yyuw, a02yyuw.jpg
PN7150, components/binary_sensor/pn7150, pn7150.jpg

View File

@ -66,6 +66,14 @@ Release 2024.2.1 - February 26
- fix throttle average nan handling :esphomepr:`6275` by :ghuser:`ssieb`
- Fix thermostat supplemental actions :esphomepr:`6282` by :ghuser:`kbx81`
Release 2024.2.2 - March 6
--------------------------
- CSE7766: Fix energy calculation :esphomepr:`6286` by :ghuser:`puuu`
- handling with the negative temperature in the sensor tmp102 :esphomepr:`6316` by :ghuser:`FlyingFeng2021`
- fix tmp102 negative calculation :esphomepr:`6320` by :ghuser:`ssieb`
- auto load output for now :esphomepr:`6309` by :ghuser:`ssieb`
- Add wake word phrase to voice assistant start command :esphomepr:`6290` by :ghuser:`jesserockz`
Full list of changes
--------------------

311
changelog/2024.3.0.rst Normal file
View File

@ -0,0 +1,311 @@
ESPHome 2024.3.0 - 20th March 2024
==================================
.. seo::
:description: Changelog for ESPHome 2024.3.0.
:image: /_static/changelog-2024.3.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 5
Datetime Core, components/datetime/index, clock-outline.svg, dark-invert
Template Datetime, components/datetime/template, description.svg, dark-invert
AM2315C, components/sensor/am2315c, am2315c.jpg
HTU31D, components/sensor/htu31d, htu31d.jpg,
MS8607, components/sensor/ms8607, ms8607.jpg
AGS10, components/sensor/ags10, ags10.jpg
VEML6030, components/sensor/veml7700, veml6030.jpg
VEML7700, components/sensor/veml7700, veml7700.jpg
MR24HPC1 mmWave, components/seeed_mr24hpc1, seeed-mr24hpc1.jpg
ADS1118, components/sensor/ads1118, ads1118.jpg
CST816, components/touchscreen/cst816, cst816.jpg
CST226, components/touchscreen/cst226, t4-s3.jpg
RPI_DPI_RGB, components/display/rpi_dpi_rgb, waveshare_touch-s3.jpg
Quad SPI AMOLED, components/display/qspi_amoled, t4-s3.jpg
ST7701S, components/display/st7701s, indicator.jpg
ADE7880, components/sensor/ade7880, ade7880.svg
Emmeti, components/climate/climate_ir, air-conditioner-ir.svg, dark-invert
Uponor Smatrix, components/uponor_smatrix, uponor.svg
Kamstrup KMP, components/sensor/kamstrup_kmp, kamstrup_kmp.jpg
Template Fan, components/fan/template, description.svg, dark-invert
Dates
-----
ESPHome now has support for ``date`` entities that can be set from the frontend (like Home Assistant) for you to check against and execute
automations in the future.
ESPHome Dates require Home Assistant 2024.4 or later.
IPv6
----
ESPHome is now prepared for the future! The future that is the old IPv6 that is.
Dualstack is added and it could now have up to 5 ip addresses of any type, and communication with Home assistant,
MQTT and NTP works with IPv6. ESPHome still depends on IPv4, but the crystal ball shows sign of IPv6-only networks.
If you are building an :doc:`/components/external_components` or you use
``network::get_ip_address()``, ``wifi::global_wifi_component->get_ip_address()`` or ``ethernet::global_eth_component->get_ip_address()``,
these functions have been renamed to ``::get_ip_addresses()`` respectively and now return a list of all IP addresses.
Release 2024.3.1 - March 27
---------------------------
- AHT10: Fix bug :esphomepr:`6409` by :ghuser:`clydebarrow`
- microWakeWord: Fix model path joining :esphomepr:`6426` by :ghuser:`ebw44`
- Don't compile strptime unless its required :esphomepr:`6424` by :ghuser:`gabest11`
- Fix editor live validation :esphomepr:`6431` by :ghuser:`bdraco`
Release 2024.3.2 - April 4
--------------------------
- Fix logger compile error on ESP32-C6 :esphomepr:`6323` by :ghuser:`DAVe3283`
- Add missing ethernet types :esphomepr:`6444` by :ghuser:`ssieb`
- fix: changing the content source when playing is paused blocks the player :esphomepr:`6454` by :ghuser:`NewoPL`
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 Components
^^^^^^^^^^^^^^
- New component: ADE7880 voltage/current/power/energy sensor :esphomepr:`5242` by :ghuser:`kpfleming` (new-integration)
- Add Uponor Smatrix component :esphomepr:`5769` by :ghuser:`kroimon` (new-integration)
- Support for MS8607 PHT (Pressure Humidity Temperature) sensor :esphomepr:`3307` by :ghuser:`e28eta` (new-integration)
- Add datetime date entities :esphomepr:`6191` by :ghuser:`RFDarter` (new-integration)
- Add AGS10 Sensor :esphomepr:`6070` by :ghuser:`mak-42` (new-integration)
- ads1118 component :esphomepr:`5711` by :ghuser:`solomondg1` (new-integration)
- Add CST816 touchscreen driver :esphomepr:`5941` by :ghuser:`clydebarrow` (new-integration)
- AM2315C Temperature + Humidity Sensor :esphomepr:`6266` by :ghuser:`swoboda1337` (new-integration)
- Touchscreen: add support for CST226 controller chip :esphomepr:`6151` by :ghuser:`clydebarrow` (new-integration)
- Drivers for RGB 16 bit parallel displays :esphomepr:`5872` by :ghuser:`clydebarrow` (new-integration)
- VEML7700 and VEML6030 light sensors :esphomepr:`6067` by :ghuser:`latonita` (new-integration)
- Add Seeed Studio mmWave Kit MR24HPC1 :esphomepr:`5761` by :ghuser:`limengdu` (new-integration)
- Add driver for quad SPI AMOLED displays :esphomepr:`6354` by :ghuser:`clydebarrow` (new-integration)
- feat: Add HTU31D Support :esphomepr:`5805` by :ghuser:`betterengineering` (new-integration)
- Emmeti infrared climate support :esphomepr:`5197` by :ghuser:`E440QF` (new-integration)
- Added Kamstrup Multical 40x component :esphomepr:`4200` by :ghuser:`cfeenstra1024` (new-integration)
New Platforms
^^^^^^^^^^^^^
- Additional sensors and binary sensors support for Haier Climate :esphomepr:`6257` by :ghuser:`paveldn` (breaking-change) (new-platform)
- add template fan :esphomepr:`6310` by :ghuser:`ssieb` (breaking-change) (new-platform)
Breaking Changes
^^^^^^^^^^^^^^^^
- LTR390 - Multiple bugfixes :esphomepr:`6161` by :ghuser:`sjtrny` (breaking-change)
- Touchscreen component and driver fixes :esphomepr:`5997` by :ghuser:`nielsnl68` (breaking-change)
- Additional sensors and binary sensors support for Haier Climate :esphomepr:`6257` by :ghuser:`paveldn` (breaking-change) (new-platform)
- add template fan :esphomepr:`6310` by :ghuser:`ssieb` (breaking-change) (new-platform)
Beta Changes
^^^^^^^^^^^^
- SPI: Revert clk_pin to standard output pin schema :esphomepr:`6368` by :ghuser:`clydebarrow`
- Allow actions in web_server to be executed via GET method :esphomepr:`5938` by :ghuser:`afarago`
- fix servo restore :esphomepr:`6370` by :ghuser:`ssieb`
- Don't try to get IPv6 addresses when disabled :esphomepr:`6366` by :ghuser:`HeMan`
- Use AQI device class :esphomepr:`6376` by :ghuser:`fgsch`
- Fix list-components when PR is not targeting dev :esphomepr:`6375` by :ghuser:`jesserockz`
- allow negative ppm for sensair :esphomepr:`6385` by :ghuser:`ssieb`
- microWakeWord - add new ops and small improvements :esphomepr:`6360` by :ghuser:`kahrendt`
- Fix compilation for uponor_smatrix without time component :esphomepr:`6389` by :ghuser:`kroimon`
- Shows component operation time in ``ms`` :esphomepr:`6388` by :ghuser:`edwardtfn`
- IPv6 can't be enabled for libretiny :esphomepr:`6387` by :ghuser:`HeMan`
- Replace name and friendly name in full adopted configs :esphomepr:`4456` by :ghuser:`jesserockz`
- Fix bug in ``remote_base`` conditional :esphomepr:`6281` by :ghuser:`swoboda1337`
- Fix sending packets to uponor_smatrix devices :esphomepr:`6392` by :ghuser:`kroimon`
- Fix wrong initialization of vectors in ade7953_i2c :esphomepr:`6393` by :ghuser:`kroimon`
- ld2420: Firmware v1.5.4+ bug workaround :esphomepr:`6168` by :ghuser:`descipher`
- Require xsrf/csrf when using a password :esphomepr:`6396` by :ghuser:`jesserockz`
- AHT10: Use state machine to avoid blocking delay :esphomepr:`6401` by :ghuser:`clydebarrow`
- Show component warnings and errors in the log; :esphomepr:`6400` by :ghuser:`clydebarrow`
- web_server support for v3 :esphomepr:`6203` by :ghuser:`RFDarter`
All changes
^^^^^^^^^^^
- Bump openssh-client to 1:9.2p1-2+deb12u2 :esphomepr:`6216` by :ghuser:`jesserockz`
- Add support for 1.8V-powered devices :esphomepr:`6234` by :ghuser:`bisbastuner`
- Adjust HeatpumpIR dependency :esphomepr:`6222` by :ghuser:`ivankravets`
- INA226 - fixed improper work with signed values, added configurable ADC parameters :esphomepr:`6172` by :ghuser:`latonita`
- Prevent network config on rpipico board :esphomepr:`5832` by :ghuser:`carlosV2`
- Bump pytest-asyncio from 0.23.3 to 0.23.5 :esphomepr:`6201` by :ghuser:`dependabot[bot]`
- New component: ADE7880 voltage/current/power/energy sensor :esphomepr:`5242` by :ghuser:`kpfleming` (new-integration)
- Add some components to the new testing framework (D) :esphomepr:`6175` by :ghuser:`kbx81`
- Provide example devcontainer config for mdns and USB passthrough :esphomepr:`6094` by :ghuser:`linkedupbits`
- Bump black from 23.12.1 to 24.2.0 :esphomepr:`6221` by :ghuser:`dependabot[bot]`
- Bump pytest from 7.4.4 to 8.0.1 :esphomepr:`6246` by :ghuser:`dependabot[bot]`
- Bump codecov/codecov-action from 3 to 4 :esphomepr:`6160` by :ghuser:`dependabot[bot]`
- Bump peter-evans/create-pull-request from 5.0.2 to 6.0.0 :esphomepr:`6159` by :ghuser:`dependabot[bot]`
- Bump frenck/action-yamllint from 1.4.2 to 1.5.0 :esphomepr:`6236` by :ghuser:`dependabot[bot]`
- Bump voluptuous from 0.14.1 to 0.14.2 :esphomepr:`6181` by :ghuser:`dependabot[bot]`
- Bump pyupgrade from 3.15.0 to 3.15.1 :esphomepr:`6247` by :ghuser:`dependabot[bot]`
- LTR390 - Multiple bugfixes :esphomepr:`6161` by :ghuser:`sjtrny` (breaking-change)
- Fix yamllint :esphomepr:`6253` by :ghuser:`jesserockz`
- Improve the error message on OTA version mismatch :esphomepr:`6259` by :ghuser:`sybrenstuvel`
- Bump aioesphomeapi from 21.0.2 to 22.0.0 :esphomepr:`6263` by :ghuser:`dependabot[bot]`
- Allow ESP8266 to use multiple i2c busses :esphomepr:`6145` by :ghuser:`LouDou`
- Add Uponor Smatrix component :esphomepr:`5769` by :ghuser:`kroimon` (new-integration)
- Fix test_build_components for macOS sed :esphomepr:`6278` by :ghuser:`kbx81`
- Allow to specify global build directory :esphomepr:`6276` by :ghuser:`werwolfby`
- Add device class support to text sensor :esphomepr:`6202` by :ghuser:`dougiteixeira`
- Bump pytest from 8.0.1 to 8.0.2 :esphomepr:`6288` by :ghuser:`dependabot[bot]`
- Improve dualstack and IPv6 support :esphomepr:`5449` by :ghuser:`HeMan`
- Waveshare e-ink 2IN9_V2 - fix full and partial update based on vendor… :esphomepr:`5481` by :ghuser:`darianndd`
- Add RTTTL volume control. :esphomepr:`5968` by :ghuser:`nielsnl68`
- Touchscreen component and driver fixes :esphomepr:`5997` by :ghuser:`nielsnl68` (breaking-change)
- Add `on_update` trigger for Project versions :esphomepr:`6298` by :ghuser:`jesserockz`
- Bump peter-evans/create-pull-request from 6.0.0 to 6.0.1 :esphomepr:`6302` by :ghuser:`dependabot[bot]`
- CSE7766 Apparent Power & Power Factor calculations :esphomepr:`6292` by :ghuser:`DAVe3283`
- Adding W5500 support to ethernet component :esphomepr:`4424` by :ghuser:`JeroenVanOort`
- Fix numbering of ip_address sensors :esphomepr:`6305` by :ghuser:`HeMan`
- Bump aioesphomeapi from 22.0.0 to 23.0.0 :esphomepr:`6293` by :ghuser:`dependabot[bot]`
- Add regular polygon shapes to display component :esphomepr:`6108` by :ghuser:`mathieu-mp`
- Fix return value in `core/automation.h` :esphomepr:`6314` by :ghuser:`FlyingFeng2021`
- aht10: Added new CMD and renamed existing CMD to match datasheet :esphomepr:`6303` by :ghuser:`cptskippy`
- handling with the negative temperature in the sensor tmp102 :esphomepr:`6316` by :ghuser:`FlyingFeng2021`
- x9c: fix off by 1 error :esphomepr:`6318` by :ghuser:`andynumber2`
- Support for MS8607 PHT (Pressure Humidity Temperature) sensor :esphomepr:`3307` by :ghuser:`e28eta` (new-integration)
- Separate logger implementations for each hardware platform into different files :esphomepr:`6167` by :ghuser:`tomaszduda23`
- Additional sensors and binary sensors support for Haier Climate :esphomepr:`6257` by :ghuser:`paveldn` (breaking-change) (new-platform)
- Add toggle command to cover web_server endpoint :esphomepr:`6319` by :ghuser:`heythisisnate`
- Improv: support connecting to hidden networks :esphomepr:`6322` by :ghuser:`jesserockz`
- Update mDNS for IDF >= 5.0 :esphomepr:`6328` by :ghuser:`HeMan`
- DFPlayer: refix Bug created with PR 4758 :esphomepr:`5861` by :ghuser:`sandronidi`
- Fix build failures on host platform caused by #6167 :esphomepr:`6338` by :ghuser:`clydebarrow`
- Update bang_bang to log two decimal places in config dump :esphomepr:`6304` by :ghuser:`rafalw1277`
- Add datetime date entities :esphomepr:`6191` by :ghuser:`RFDarter` (new-integration)
- Add AGS10 Sensor :esphomepr:`6070` by :ghuser:`mak-42` (new-integration)
- Bump aioesphomeapi from 23.0.0 to 23.1.0 :esphomepr:`6332` by :ghuser:`dependabot[bot]`
- Bump pytest-asyncio from 0.23.5 to 0.23.5.post1 :esphomepr:`6334` by :ghuser:`dependabot[bot]`
- Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 :esphomepr:`6295` by :ghuser:`dependabot[bot]`
- Set dependabot to look at composite actions versions :esphomepr:`6343` by :ghuser:`jesserockz`
- ads1118 component :esphomepr:`5711` by :ghuser:`solomondg1` (new-integration)
- Bump actions/cache from 4.0.0 to 4.0.1 :esphomepr:`6306` by :ghuser:`dependabot[bot]`
- Bump docker/build-push-action from 5.0.0 to 5.2.0 in /.github/actions/build-image :esphomepr:`6347` by :ghuser:`dependabot[bot]`
- fix: modbus_textsensor response is too long in some cases :esphomepr:`6333` by :ghuser:`NewoPL`
- add template fan :esphomepr:`6310` by :ghuser:`ssieb` (breaking-change) (new-platform)
- dump config after logging CDC port is opened by host :esphomepr:`6169` by :ghuser:`tomaszduda23`
- Add IRK support to allow tracking of devices with random MAC addresses :esphomepr:`6335` by :ghuser:`chbmuc`
- [Fingerprint_grow] Implements Sleep Mode feature :esphomepr:`6116` by :ghuser:`alexborro`
- cleanup ili9xxx component by removing data rate define :esphomepr:`6350` by :ghuser:`nielsnl68`
- web_server_idf: support x-www-form-urlencoded POST requests :esphomepr:`6037` by :ghuser:`dentra`
- feat(MQTT): Add QoS option for each MQTT component :esphomepr:`6279` by :ghuser:`Rapsssito`
- Check permissions :esphomepr:`6255` by :ghuser:`OdileVidrine`
- Add CST816 touchscreen driver :esphomepr:`5941` by :ghuser:`clydebarrow` (new-integration)
- ILI9XXX: Lazily allocate buffer :esphomepr:`6352` by :ghuser:`clydebarrow`
- AM2315C Temperature + Humidity Sensor :esphomepr:`6266` by :ghuser:`swoboda1337` (new-integration)
- Add ble_presence binary sensor timeout config value. :esphomepr:`6024` by :ghuser:`clydebarrow`
- Add state listeners to `rotary_encoder` :esphomepr:`6035` by :ghuser:`clydebarrow`
- ili9xxx: Add support for GC9A01A display :esphomepr:`6351` by :ghuser:`clydebarrow`
- Touchscreen: add support for CST226 controller chip :esphomepr:`6151` by :ghuser:`clydebarrow` (new-integration)
- font: add anti-aliasing and other features :esphomepr:`6198` by :ghuser:`clydebarrow`
- Mhz19 warmup :esphomepr:`6214` by :ghuser:`fornellas`
- Refactor ATM90E32 to reduce blocking time and improve accuracy. :esphomepr:`5670` by :ghuser:`descipher`
- Bump aioesphomeapi from 23.1.0 to 23.1.1 :esphomepr:`6348` by :ghuser:`dependabot[bot]`
- Bump pytest from 8.0.2 to 8.1.1 :esphomepr:`6346` by :ghuser:`dependabot[bot]`
- Add support for Waveshare 2.13" V2 display :esphomepr:`6337` by :ghuser:`manuelkasper`
- Mitsubishi Climate updates :esphomepr:`3886` by :ghuser:`RubyBailey`
- Drivers for RGB 16 bit parallel displays :esphomepr:`5872` by :ghuser:`clydebarrow` (new-integration)
- hydreon_rgxx - add resolution option :esphomepr:`6077` by :ghuser:`mrtoy-me`
- SPI schema now uses typed_schema with `type` key :esphomepr:`6353` by :ghuser:`clydebarrow`
- VEML7700 and VEML6030 light sensors :esphomepr:`6067` by :ghuser:`latonita` (new-integration)
- Add Seeed Studio mmWave Kit MR24HPC1 :esphomepr:`5761` by :ghuser:`limengdu` (new-integration)
- Add getter for font glyph data :esphomepr:`6355` by :ghuser:`clydebarrow`
- Require reset_pin for certain waveshare_epaper models in YAML validation :esphomepr:`6357` by :ghuser:`manuelkasper`
- touchscreen driver fixes :esphomepr:`6356` by :ghuser:`clydebarrow`
- Make USE_HOST compilable on msys2 :esphomepr:`6359` by :ghuser:`maruel`
- download font from url on build :esphomepr:`5254` by :ghuser:`landonr`
- Add driver for quad SPI AMOLED displays :esphomepr:`6354` by :ghuser:`clydebarrow` (new-integration)
- ADE7953: Add the ability to use accumulating energy registers, more precise power reporting :esphomepr:`6311` by :ghuser:`isorin`
- feat: Add HTU31D Support :esphomepr:`5805` by :ghuser:`betterengineering` (new-integration)
- Emmeti infrared climate support :esphomepr:`5197` by :ghuser:`E440QF` (new-integration)
- Added Kamstrup Multical 40x component :esphomepr:`4200` by :ghuser:`cfeenstra1024` (new-integration)
- add possibility to provide different conversion times for Bus Voltage… :esphomepr:`6327` by :ghuser:`kev300`
- SPI: Revert clk_pin to standard output pin schema :esphomepr:`6368` by :ghuser:`clydebarrow`
- Allow actions in web_server to be executed via GET method :esphomepr:`5938` by :ghuser:`afarago`
- fix servo restore :esphomepr:`6370` by :ghuser:`ssieb`
- Don't try to get IPv6 addresses when disabled :esphomepr:`6366` by :ghuser:`HeMan`
- Use AQI device class :esphomepr:`6376` by :ghuser:`fgsch`
- Fix list-components when PR is not targeting dev :esphomepr:`6375` by :ghuser:`jesserockz`
- allow negative ppm for sensair :esphomepr:`6385` by :ghuser:`ssieb`
- microWakeWord - add new ops and small improvements :esphomepr:`6360` by :ghuser:`kahrendt`
- Fix compilation for uponor_smatrix without time component :esphomepr:`6389` by :ghuser:`kroimon`
- Shows component operation time in ``ms`` :esphomepr:`6388` by :ghuser:`edwardtfn`
- IPv6 can't be enabled for libretiny :esphomepr:`6387` by :ghuser:`HeMan`
- Replace name and friendly name in full adopted configs :esphomepr:`4456` by :ghuser:`jesserockz`
- Fix bug in ``remote_base`` conditional :esphomepr:`6281` by :ghuser:`swoboda1337`
- Fix sending packets to uponor_smatrix devices :esphomepr:`6392` by :ghuser:`kroimon`
- Fix wrong initialization of vectors in ade7953_i2c :esphomepr:`6393` by :ghuser:`kroimon`
- ld2420: Firmware v1.5.4+ bug workaround :esphomepr:`6168` by :ghuser:`descipher`
- Require xsrf/csrf when using a password :esphomepr:`6396` by :ghuser:`jesserockz`
- AHT10: Use state machine to avoid blocking delay :esphomepr:`6401` by :ghuser:`clydebarrow`
- Show component warnings and errors in the log; :esphomepr:`6400` by :ghuser:`clydebarrow`
- web_server support for v3 :esphomepr:`6203` by :ghuser:`RFDarter`
Past Changelogs
---------------
- :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`

231
changelog/2024.4.0.rst Normal file
View File

@ -0,0 +1,231 @@
ESPHome 2024.4.0 - 17th April 2024
==================================
.. seo::
:description: Changelog for ESPHome 2024.4.0.
:image: /_static/changelog-2024.4.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 4
Template Datetime Time, components/datetime/template, description.svg, dark-invert
SUN-GTIL2 inverter, components/sun_gtil2, sun_1000g2.png
AT581X, components/at581x, at581x.png
JSN-SR04T, components/sensor/jsn_sr04t, jsn-sr04t-v3.jpg
Daikin ARC, components/climate/climate_ir, air-conditioner-ir.svg, dark-invert
HHCCJCY10 (MiFlora Pink), components/sensor/xiaomi_hhccjcy10, xiaomi_hhccjcy10.jpg
TLC5971, components/output/tlc5971, tlc5971.jpg
Dooya, components/remote_transmitter, remote.svg
Time Entities
-------------
ESPHome now has support for ``time`` entities that can be set from the frontend (like Home Assistant). THis allows you to set a timer to execute future automations on device.
ESPHome Dates require Home Assistant 2024.4 or later.
Voice Assistant Audio
---------------------
This release adds support for sending and receiving audio to/from voice assistants via the API. Currently ESPHome sends and receives the Voice Assistant audio bytes
via a UDP socket which can be unreliable and insecure. Beginning with Home Assistant 2024.5, both sides will automatically recognise that they both support API Audio and will
use that route instead. This is more reliable because the ESPHome API uses a TCP socket, so packet order and delivery is guaranteed, and if you use API Encryption,
your audio will also be encrypted in transit.
Release 2024.4.1 - April 23
---------------------------
- [Tuya Climate] Fix compilation error caused by codegen :esphomepr:`6568` by :ghuser:`zry98`
- wifi: fix reconnect issue due to enablement of fast connect :esphomepr:`6598` by :ghuser:`jpeletier`
- Calibrate Beken internal temperature :esphomepr:`6599` by :ghuser:`Mat931`
- fix streaming logs from MQTT for ESP32 devices using TLS :esphomepr:`6605` by :ghuser:`ccutrer`
- Disallow variant/family override for known boards :esphomepr:`6512` by :ghuser:`clydebarrow`
- esp32_ble: Consider ESP_BT_STATUS_DONE a successful state :esphomepr:`6493` by :ghuser:`polyfloyd`
- Fix or filter :esphomepr:`6574` by :ghuser:`swoboda1337`
Release 2024.4.2 - April 30
---------------------------
- Fix SHT3xd fails sometimes in 2024.4.0 :esphomepr:`6592` by :ghuser:`mrtoy-me`
- allow defaults with no include vars :esphomepr:`6613` by :ghuser:`ssieb`
- Revert #6458 :esphomepr:`6650` by :ghuser:`tronikos`
- [i2s_audio.microphone] Fixing adc bug :esphomepr:`6654` by :ghuser:`jesserockz`
Full list of changes
--------------------
New Components
^^^^^^^^^^^^^^
- Add sun_gtil2 component (for SUN-1000G2 / SUN-2000G2 grid tie inverters) :esphomepr:`4958` by :ghuser:`Mat931` (new-integration)
- Add support for AT581x component :esphomepr:`6297` by :ghuser:`X-Ryl669` (new-integration)
- Add new Component: Ultrasonic Distance Sensor JSN-SR04T :esphomepr:`6023` by :ghuser:`Mafus1` (new-integration)
- feat: Add Daikin ARC (tested on Daikin ARC472A62) :esphomepr:`6429` by :ghuser:`magicbear` (new-integration)
- add support for Tuya pink version of miflora :esphomepr:`5402` by :ghuser:`fariouche` (new-integration)
- Implemented support for the TLC5971 as an output component :esphomepr:`6494` by :ghuser:`IJIJI` (new-integration)
Breaking Changes
^^^^^^^^^^^^^^^^
- Add support for new modes in Tuya Climate :esphomepr:`5159` by :ghuser:`moriahmorgan` (breaking-change)
- IPv6 string representation follows RFC5952 :esphomepr:`6449` by :ghuser:`HeMan` (breaking-change)
Beta Changes
^^^^^^^^^^^^
- Add dooya remote transmitter test :esphomepr:`6508` by :ghuser:`jesserockz`
- ads1115: remove auto-load and split sensor into platform folder :esphomepr:`5981` by :ghuser:`jesserockz` (new-platform)
- Bump esphome-dashboard to 20240412.0 :esphomepr:`6517` by :ghuser:`jesserockz`
- Fix missing ifdefs in voice assistant :esphomepr:`6520` by :ghuser:`jesserockz`
- Fix project version longer than 30 characters breaking compilation :esphomepr:`6535` by :ghuser:`jesserockz`
- Fix no-release bug on ft6x36 :esphomepr:`6527` by :ghuser:`clydebarrow`
All changes
^^^^^^^^^^^
- Bump docker/login-action from 3.0.0 to 3.1.0 :esphomepr:`6367` by :ghuser:`dependabot[bot]`
- Bump peter-evans/create-pull-request from 6.0.1 to 6.0.2 :esphomepr:`6361` by :ghuser:`dependabot[bot]`
- Bump docker/build-push-action from 5.2.0 to 5.3.0 in /.github/actions/build-image :esphomepr:`6373` by :ghuser:`dependabot[bot]`
- Bump docker/setup-buildx-action from 3.1.0 to 3.2.0 :esphomepr:`6372` by :ghuser:`dependabot[bot]`
- Fix deep_sleep for ESP32-C6 :esphomepr:`6377` by :ghuser:`ferrets6`
- Fix keeloq for IDF 5+ :esphomepr:`6382` by :ghuser:`kbx81`
- Fix Nextion set_component_picture call :esphomepr:`6378` by :ghuser:`edwardtfn`
- Add line_at_angle method to Display component :esphomepr:`6381` by :ghuser:`deisterhold`
- Check generated proto files are as expected if any are modified in PRs :esphomepr:`6254` by :ghuser:`jesserockz`
- ld2420: fix energy mode documentation :esphomepr:`6225` by :ghuser:`andresv`
- Add actions for component tests A, B and C :esphomepr:`6256` by :ghuser:`kbx81`
- Add some components to the new testing framework (V) :esphomepr:`6231` by :ghuser:`kbx81`
- Add some components to the new testing framework (X,Y,Z) :esphomepr:`6233` by :ghuser:`kbx81`
- Add some components to the new testing framework (E) :esphomepr:`6176` by :ghuser:`kbx81`
- Make SPI compile with IDF >= 5.0 :esphomepr:`6383` by :ghuser:`HeMan`
- Fix esp32-camera test yaml :esphomepr:`6398` by :ghuser:`kbx81`
- Bump pytest-asyncio from 0.23.5.post1 to 0.23.6 :esphomepr:`6402` by :ghuser:`dependabot[bot]`
- Bump actions/cache from 4.0.1 to 4.0.2 in /.github/actions/restore-python :esphomepr:`6403` by :ghuser:`dependabot[bot]`
- Bump actions/cache from 4.0.1 to 4.0.2 :esphomepr:`6404` by :ghuser:`dependabot[bot]`
- Bump ESP8266 Arduino versions :esphomepr:`5359` by :ghuser:`HeMan`
- Allow accept/reject delta to be specified. :esphomepr:`5060` by :ghuser:`cvwillegen`
- Allow setting htop for ledc :esphomepr:`6340` by :ghuser:`Gagootron`
- sm2135: add separate_modes option to support different chip variants :esphomepr:`6152` by :ghuser:`jasperro`
- AHT10: fix temperature-only operation; add warning/error messages :esphomepr:`6405` by :ghuser:`clydebarrow`
- Add support for new modes in Tuya Climate :esphomepr:`5159` by :ghuser:`moriahmorgan` (breaking-change)
- Add sun_gtil2 component (for SUN-1000G2 / SUN-2000G2 grid tie inverters) :esphomepr:`4958` by :ghuser:`Mat931` (new-integration)
- SPI: Make some validation failures give more useful messages. :esphomepr:`6413` by :ghuser:`clydebarrow`
- Bump aioesphomeapi from 23.1.1 to 23.2.0 :esphomepr:`6412` by :ghuser:`dependabot[bot]`
- Add check for use of GPIOXX in config :esphomepr:`6419` by :ghuser:`clydebarrow`
- WireGuard for esp8266 :esphomepr:`6365` by :ghuser:`droscy`
- setup.cfg: drop duplicate, underintended trove classifier :esphomepr:`6421` by :ghuser:`mweinelt`
- Store preferences in disk file on host platform :esphomepr:`6428` by :ghuser:`clydebarrow`
- Add support for AT581x component :esphomepr:`6297` by :ghuser:`X-Ryl669` (new-integration)
- Add some components to the new testing framework (F) :esphomepr:`6177` by :ghuser:`kbx81`
- Add get_contrast() and get_brightness() to SSD1306 class to get protected variables :esphomepr:`6435` by :ghuser:`benediktkr`
- Add new Component: Ultrasonic Distance Sensor JSN-SR04T :esphomepr:`6023` by :ghuser:`Mafus1` (new-integration)
- Add some components to the new testing framework (G) :esphomepr:`6178` by :ghuser:`kbx81`
- Add some components to the new testing framework (K) :esphomepr:`6186` by :ghuser:`kbx81`
- Add some components to the new testing framework (N) :esphomepr:`6210` by :ghuser:`kbx81`
- Add some components to the new testing framework (Q) :esphomepr:`6218` by :ghuser:`kbx81`
- Add some components to the new testing framework (U) :esphomepr:`6230` by :ghuser:`kbx81`
- Fix spacing in new test yaml :esphomepr:`6441` by :ghuser:`kbx81`
- Add some components to the new testing framework (W) :esphomepr:`6232` by :ghuser:`kbx81`
- Add some components to the new testing framework (L) :esphomepr:`6195` by :ghuser:`kbx81`
- feat: Add Daikin ARC (tested on Daikin ARC472A62) :esphomepr:`6429` by :ghuser:`magicbear` (new-integration)
- Disable truthy yamllint rule :esphomepr:`6442` by :ghuser:`jesserockz`
- Add get_size method to QR Code header :esphomepr:`6430` by :ghuser:`deisterhold`
- Minor change to support sht85 sensor :esphomepr:`6415` by :ghuser:`mrtoy-me`
- IPv6 string representation follows RFC5952 :esphomepr:`6449` by :ghuser:`HeMan` (breaking-change)
- Bump actions/setup-python from 5.0.0 to 5.1.0 :esphomepr:`6437` by :ghuser:`dependabot[bot]`
- Bump actions/setup-python from 5.0.0 to 5.1.0 in /.github/actions/restore-python :esphomepr:`6438` by :ghuser:`dependabot[bot]`
- Optimize QMC5883L: Read registers only for enabled sensors :esphomepr:`6458` by :ghuser:`tronikos`
- minor refactor to allow commit hash as ref value. :esphomepr:`6446` by :ghuser:`LelandSindt`
- TMP117 fix polling period config :esphomepr:`6452` by :ghuser:`mrtoy-me`
- Bump Arduino Pico Framework to 3.7.2 and Platform to 1.12.0 :esphomepr:`6386` by :ghuser:`HeMan`
- Display menu: Allow "left" key to exit current menu if not editing :esphomepr:`6460` by :ghuser:`jesserockz`
- Fix NOLINT on inclusive-language check :esphomepr:`6464` by :ghuser:`jesserockz`
- Add yamllint to dev requirements :esphomepr:`6466` by :ghuser:`jesserockz`
- Add temperature for QMC5883L :esphomepr:`6456` by :ghuser:`tronikos`
- web_server: Return early if no clients connected :esphomepr:`6467` by :ghuser:`jesserockz`
- ESP32 Arduino WiFi: misc bug fixes :esphomepr:`6470` by :ghuser:`paravoid`
- Replace std::regex with sscanf calls :esphomepr:`6468` by :ghuser:`jesserockz`
- Include "Failed" status in config log. :esphomepr:`6482` by :ghuser:`clydebarrow`
- Fix Microphone IsCapturingCondition :esphomepr:`6490` by :ghuser:`RaymiiOrg`
- Remove misleading tag/line in messages :esphomepr:`6495` by :ghuser:`clydebarrow`
- Send/Receive Voice Assistant audio via API :esphomepr:`6471` by :ghuser:`jesserockz`
- Datetime date initial value fix :esphomepr:`6483` by :ghuser:`RFDarter`
- If the loop() took more than the required time, don't delay further :esphomepr:`6496` by :ghuser:`clydebarrow`
- Bump LibreTiny version to 1.5.1 :esphomepr:`6500` by :ghuser:`kuba2k2`
- Internal temperature: Support Beken platform :esphomepr:`6491` by :ghuser:`Mat931`
- Bump docker/setup-buildx-action from 3.2.0 to 3.3.0 :esphomepr:`6502` by :ghuser:`dependabot[bot]`
- add support for Tuya pink version of miflora :esphomepr:`5402` by :ghuser:`fariouche` (new-integration)
- Add MAC address to WiFi config reply :esphomepr:`6489` by :ghuser:`cvwillegen`
- Adds i2c timeout config :esphomepr:`4614` by :ghuser:`tracestep`
- Add ABB-Welcome / Busch-Welcome Door Intercom Protocol :esphomepr:`4689` by :ghuser:`Mat931`
- Add support for time entities :esphomepr:`6399` by :ghuser:`jesserockz`
- Fix Match by IRK :esphomepr:`6499` by :ghuser:`MRemy2`
- Add rmt_channel to remote_transmitter and remote_receiver :esphomepr:`6497` by :ghuser:`jesserockz` (new-integration)
- Rework tlc5947 to remove AUTO_LOAD :esphomepr:`6503` by :ghuser:`jesserockz`
- UART: ignore require_tx/rx if not a native uart implementation :esphomepr:`6504` by :ghuser:`jesserockz`
- esp32_rmt_led_strip bugfixes :esphomepr:`6506` by :ghuser:`Mat931`
- Implemented support for the TLC5971 as an output component :esphomepr:`6494` by :ghuser:`IJIJI` (new-integration)
- Add Dooya protocol to remote_base :esphomepr:`6488` by :ghuser:`bukureckid`
- Only give error for connected sensors at startup :esphomepr:`6474` by :ghuser:`leejoow`
- Webserver float to string fix :esphomepr:`6507` by :ghuser:`RFDarter`
- Add dooya remote transmitter test :esphomepr:`6508` by :ghuser:`jesserockz`
- ads1115: remove auto-load and split sensor into platform folder :esphomepr:`5981` by :ghuser:`jesserockz` (new-platform)
- Bump esphome-dashboard to 20240412.0 :esphomepr:`6517` by :ghuser:`jesserockz`
- Fix missing ifdefs in voice assistant :esphomepr:`6520` by :ghuser:`jesserockz`
- Fix project version longer than 30 characters breaking compilation :esphomepr:`6535` by :ghuser:`jesserockz`
- Fix no-release bug on ft6x36 :esphomepr:`6527` by :ghuser:`clydebarrow`
Past Changelogs
---------------
- :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.2.0.html
:url: /changelog/2024.4.0.html
.. toctree::
:glob:

View File

@ -30,7 +30,7 @@ awesome things with DIY hardware!
The features I'm particularly excited about are:
* :ref:`esphomeflasher <esphome-flasher>` - Experiencing problems flashing esphomelib firmwares using esphomeyaml?
* ``esphomeflasher`` - Experiencing problems flashing esphomelib firmwares using esphomeyaml?
No problem, esphomeflasher is a tool designed to make that super easy. Just let esphomeyaml generate the binary and flash
from your PC.
* :doc:`Over-the-Air Updates </components/ota>` have been completely re-written to make them a lot more
@ -76,7 +76,7 @@ New Features
- esphomelib now has a new tool: `esphomeflasher <https://github.com/esphome/esphome-flasher>`__ to simplify
flashing on Windows/MacOS machines **without having to install esphomeyaml**. So if esphomeyaml for some reason
can't find your USB port, you now can use the esphomeflasher app. See :ref:`esphome-flasher`.
can't find your USB port, you now can use the esphomeflasher app. See ``esphomeflasher``.
- ESP8266s now save the states of lights/switches/... internally and restores them on boot.
Additionally, esphomelib can now operate in fully offline mode if your WiFi network goes down

View File

@ -27,8 +27,8 @@ Configuration variables:
- **codes** (*Optional*, list of string): A list of codes for disarming the alarm, if *requires_code_to_arm* set to true then for arming the alarm too.
- **requires_code_to_arm** (*Optional*, boolean): Code required for arming the alarm, *codes* must be provided.
- **arming_away_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to away mode. Defaults to ``0s``.
- **arming_home_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to home mode.
- **arming_night_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to night mode.
- **arming_home_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to home mode.
- **arming_night_time** (*Optional*, :ref:`config-time`): The exit delay before the alarm is armed to night mode.
- **pending_time** (*Optional*, :ref:`config-time`): The entry delay before the alarm is triggered. Defaults to ``0s``.
- **trigger_time** (*Optional*, :ref:`config-time`): The time after a triggered alarm before resetting to previous state if the sensors are cleared/off. Defaults to ``0s``.
- **binary_sensors** (*Optional*, *list*): A list of binary sensors the panel should use. Each consists of:
@ -169,7 +169,7 @@ Example:
name: Zone 1
device_class: door
pin:
number: D1
number: GPIOXX
mode: INPUT_PULLUP
inverted: True
- platform: gpio
@ -177,7 +177,7 @@ Example:
name: Zone 2
device_class: door
pin:
number: D2
number: GPIOXX
mode: INPUT_PULLUP
inverted: True
- platform: gpio
@ -185,7 +185,7 @@ Example:
name: Zone 3
device_class: motion
pin:
number: D3
number: GPIOXX
mode: INPUT_PULLUP
inverted: True
- platform: gpio
@ -193,7 +193,7 @@ Example:
name: Zone 4
device_class: door
pin:
number: D4
number: GPIOXX
mode: INPUT_PULLUP
inverted: True
- platform: homeassistant
@ -206,7 +206,7 @@ Example:
id: siren
name: Siren
icon: mdi:alarm-bell
pin: D7
pin: GPIOXX
See Also

View File

@ -75,20 +75,35 @@ Configuration variables:
.. _api-actions:
.. note::
Before a newly added ESPHome device can interact with the Home Assistant API it needs to be allowed to communicate
with it. This setting can be found in the ESPHome integration (NOT in the Add-On) by clicking "CONFIGURE" for
that device and enabling the "Allow device to make service calls" option.
Actions
-------
Before using any of the actions below, you'll need to tell Home Assistant to allow your device to
make service calls.
Open the ESPHome integration page on your Home Assistant instance:
.. raw:: html
<a href="https://my.home-assistant.io/redirect/integration/?domain=esphome" target="_blank" rel="noreferrer noopener"><img src="https://my.home-assistant.io/badges/integration.svg" alt="Open your Home Assistant instance and show an integration." /></a>
Then:
#. Fnd 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
#. Then click "submit".
.. _api-homeassistant_event_action:
``homeassistant.event`` Action
******************************
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
When using the native API with Home Assistant, you can create events in the Home Assistant event bus
straight from ESPHome :ref:`Automations <automation>`.
@ -117,6 +132,11 @@ Configuration variables:
``homeassistant.service`` Action
********************************
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
When using the native API with Home Assistant, you can create Home Assistant service
calls straight from ESPHome :ref:`Automations <automation>`.
@ -189,6 +209,11 @@ Then, in ESPHome:
``homeassistant.tag_scanned`` Action
************************************
.. note::
Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
When using the native API with Home Assistant, you can push tag_scanned to Home Assistant
straight from ESPHome :ref:`Automations <automation>`.

183
components/at581x.rst Normal file
View File

@ -0,0 +1,183 @@
AirTouch AT581x Radar
=====================
.. seo::
:description: Instructions for setting up AirTouch AT581x Radar
:image: at581x.png
:keywords: radar
The `AirTouch AT581x radar <https://en.airtouching.com/product/32.html>`__
(aka ``AT581x``) is a familly of 5.8GHz radar which can be used for human presence detection. It can detect tiny movements
and compared to a PIR sensor **it can detect presence continuously**. This can be useful, for example, to turn
the lights on when you enter a room, keep them on as long as you are there (without waving your hands at the
sensor) and turn them off almost immediately after you leave the room.
They are ultra-low power (as low as 40µA of current consumption) and are extremely simple to use, yet can be setup by I2C.
It's installed in many low cost appliance, like the ESP32S3-BOX-3, and can be found by many different manufacturer or reference,
like the MoreSense MS58-3909S68U4.
It is possible to use this sensor with only a single GPIO pin; however, if you wish to change its settings,
a :doc:`/components/i2c` component (and its requisite GPIO pins) is required in your device's configuration.
.. figure:: ../images/at581x.png
:align: center
:width: 75%
AirTouch AT581x Radar / presence detection sensor
.. code-block:: yaml
# Example configuration entry
at581x:
id: "Radar"
i2c_id: bus_a
.. _at581x-component:
Component/Hub
-------------
You need to have the hub component (``at581x:`` entry) defined to be able to change the sensor's
settings, get it listed as an motion entity or being able to turn on/off the radio frequency emmission.
A :doc:`/components/binary_sensor/gpio` alone could be sufficient if you only want
to determine presence/occupancy. When you define ``at581x:`` you'll need to have a ``i2c:`` entry in
your configuration with both the SDA and SCL pins defined.
Multiple instances of this component may be defined if multiple :doc:`/components/i2c` components are available:
.. code-block:: yaml
at581x:
- id: mmWave_1
i2c_id: bus_a
address: 0x28
- id: mmWave_2
i2c_id: bus_a
address: 0x29
...
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Necessary if you want
to define multiple instances of this component.
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :doc:`/components/i2c` if you want
to use multiple I2C buses.
.. _at581x-binary_sensor:
Binary Sensor
-------------
The state of the radar detection is available via its GPIO pin. It's required to use a GPIO binary sensor to monitor the motion status
.. code-block:: yaml
binary_sensor:
- platform: gpio
name: "Human in front"
pin: GPIOXX
Configuration variables:
************************
- Refer to other options from :ref:`Binary Sensor <config-binary_sensor>` and :doc:`GPIO Binary Sensor </components/binary_sensor/gpio>`.
.. _at581x-switch:
Switch
------
:ref:`Switch components <config-switch>` are used to enable/disable radio frequency hardware.
.. code-block:: yaml
switch:
- platform: at581x
at581x_id: Radar
name: "Enable Radar"
Configuration variables:
************************
- **at581x_id** (*Optional*, :ref:`config-id`): The ID of the AT581x component defined above.
Required when multiple instances of the ``at581x`` component are defined.
- All other options from :ref:`Switch <config-switch>`.
.. _at581x-actions:
Actions
-------
.. _at581x-action_settings:
``at581x.settings`` Action
**************************
.. warning::
The hardware frontend reset option is only required to reset the frontend in case it is struck, before sending the
new configuration. However, a frontend reset is always performed after changing the settings.
The radar has several settings which can be changed. These settings are not saved in non-volatile memory
and need to be set on each boot.
The settings action allows changing of any number of the radar's internal parameters/settings. With this
action, any unspecified parameters will remain unchanged.
.. code-block:: yaml
on_...:
- at581x.settings:
id: "Waveradar"
hw_frontend_reset: false
frequency: 5800MHz
sensing_distance: 200 # 0-1023
poweron_selfcheck_time: 2000ms
protect_time: 1s
trigger_base: 500ms
trigger_keep: 10s
stage_gain: 3 # 0-12 the higher the value the smaller the gain
power_consumption: 70µA
Configuration variables:
````````````````````````
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the sensor on which settings should be
changed. If only one radar is defined, this is optional.
- **hw_frontend_reset** (*Optional*, boolean): If set to true, a reset of the analog frontend will be performed before
changing other options. Ignored if not set or set to ``false``. Upon applying the settings a frontend reset
will be performed anyway, this is only useful if the sensor is not answering or locked up.
- **frequency** (*Optional*, int): Any of the possible frequencies (5696, 5715, 5730, 5748, 5765, 5784, 5800, 5819, 5836, 5851, 5869, 5888) in MHz.
- **sensing_distance** (*Optional*, int): A unitless number, in range 0-1023, specifying the maximum distance to detect motion
- **poweron_selfcheck_time** (*Optional*, int): The delay to perform self check and calibration on power on. Recommanded not to change this
- **protect_time** (*Optional*, int): The delay after an end-of-trigger event where the detection will not trigger anymore. Max 65535ms
- **trigger_base** (*Optional*, int): The delay while a detection must be active to change the state of the sensor. Max 65535ms
- **trigger_keep** (*Optional*, int): The delay that the output will stay high after a detection event. This is usually what you want to change.
- **stage_gain** (*Optional*, int): The analog gain to use for threshold test. Any value in range 0-12, with 12 being the lowest gain and 0 the highest
- **power_consumption** (*Optional*, int): Any of the possible power profile (48, 56, 63, 70, 77, 91, 105, 115, 40, 44, 47, 51, 54, 61, 68, 78) in µA
``at581x.reset`` Action
***********************
Restart the sensor.
.. code-block:: yaml
on_...:
at581x.reset:
Configuration variables:
````````````````````````
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the AT581x component. Useful when multiple instances of this component are defined.
See Also
--------
- :ref:`I2C bus <i2c>`
- :ref:`Binary Sensor <config-binary_sensor>`
- :doc:`GPIO Binary Sensor </components/binary_sensor/gpio>`
- :ref:`config-id`
- :ghedit:`Edit`

View File

@ -30,7 +30,7 @@ required to be set up in your configuration for this sensor to work.
cap1188:
id: cap1188_component
address: 0x29
reset_pin: 14
reset_pin: GPIOXX
touch_threshold: 0x40
allow_multiple_touches: true

View File

@ -1,22 +1,28 @@
Custom Binary Sensor
====================
.. seo::
:description: Instructions for setting up Custom C++ binary sensors with ESPHome.
:image: language-cpp.svg
:keywords: C++, Custom
.. warning::
Custom components are deprecated, not recommended for new configurations
and will be removed from ESPHome in a future release.
Please look at creating a real ESPHome component and "importing" it into your
configuration with :doc:`/components/external_components`.
Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
You can find some basic documentation on creating your own components
at :ref:`contributing_to_esphome`.
You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.
This integration can be used to create custom binary sensors in ESPHome
using the C++ (Arduino) API.
.. warning::
Please first read :doc:`/components/sensor/custom` guide,
the same principles apply here and binary sensors are very similar
to sensors internally.
While we try to keep the ESPHome YAML configuration options as stable as possible, the ESPHome API is less
stable. If something in the APIs needs to be changed in order for something else to work, we will do so.
This component can be used to create custom binary sensors in ESPHome using the C++ (Arduino) API.
Please first read :doc:`/components/sensor/custom` guide, the same principles apply here and binary
sensors are very similar to sensors internally.
The example below is an example of a custom binary sensor; this custom sensor is essentially the
same as the gpio binary sensor.

View File

@ -130,8 +130,8 @@ an ``OFF`` state.
binary_sensor:
- platform: esp32_touch
name: "ESP32 Touch Pad GPIO27"
pin: GPIO27
name: "ESP32 Touch Pad"
pin: GPIOXX
threshold: 1000
Configuration variables:
@ -149,6 +149,35 @@ Configuration variables:
wake-up from a touch event. Note that no filter(s) is/are active during deep sleep.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Raw Values
----------
If access to the raw values is required, a template sensor can be created that polls for them:
.. code-block:: yaml
# Example configuration entry for accessing raw values
esp32_touch:
id: esp32_touch_1
binary_sensor:
- platform: esp32_touch
id: esp32_touch_pad
pin: GPIOXX
threshold: 0
sensor:
- platform: template
name: "Raw touch value"
lambda: |-
return id(esp32_touch_pad).get_value();
update_interval: 3s
One example of use is a wide area pressure sensor that integrates a number of smaller sensors in an area. Make two strips
of aluminium foil that sandwich paper, and connect one wire to a touch pin and the other to ground. Set up several sensors
under a flexible object like a plastic mat, add the raw values, and apply a threshold.
.. _esp32-touch-pad-pins:
Touch Pad Pins

View File

@ -17,17 +17,17 @@ Additional sensors for Haier Climate device. **These sensors are supported only
# Example configuration entry
uart:
baud_rate: 9600
tx_pin: 17
rx_pin: 16
tx_pin: GPIOXX
rx_pin: GPIOXX
id: ac_port
climate:
- platform: haier
id: haier_ac
protocol: hOn
name: Haier AC
uart_id: ac_port
binary_sensor:
- platform: haier
haier_id: haier_ac
@ -56,9 +56,9 @@ Configuration variables:
All options from :ref:`Binary Sensor <config-binary_sensor>`.
- **indoor_electric_heating_status** (*Optional*): A binary sensor that indicates electrical heating system activity.
All options from :ref:`Binary Sensor <config-binary_sensor>`.
- **indoor_fan_status** (*Optional*): A binary sensor that indicates indoor fan activity.
- **indoor_fan_status** (*Optional*): A binary sensor that indicates indoor fan activity.
All options from :ref:`Binary Sensor <config-binary_sensor>`.
- **outdoor_fan_status** (*Optional*): A binary sensor that indicates outdoor fan activity.
- **outdoor_fan_status** (*Optional*): A binary sensor that indicates outdoor fan activity.
All options from :ref:`Binary Sensor <config-binary_sensor>`.
See Also

View File

@ -34,7 +34,6 @@ Configuration variables:
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
- **attribute** (*Optional*, string): The name of the state attribute to import from the
specified entity. The entity state is used when this option is omitted.
Requires Home Assistant 2021.6 or newer.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.

View File

@ -12,12 +12,6 @@ For this sensor to work, a :doc:`/components/sensor/hydreon_rgxx` must be set up
.. code-block:: yaml
# Example RG-9 entry
uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 9600
sensor:
- platform: hydreon_rgxx
model: "RG_9"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -66,12 +66,12 @@ Advanced options:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **publish_initial_state** (*Optional*, boolean): If true, then the sensor will publish its initial state at boot or when
HA first connects, depending on the platform. This means that any applicable triggers will be run. Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.

View File

@ -42,7 +42,7 @@ you can then create individual binary sensors that track if an NFC/RFID tag is c
spi:
rc522_spi:
cs_pin: GPIO15
cs_pin: GPIOXX
binary_sensor:
- platform: rc522

View File

@ -32,7 +32,7 @@ our `Bluetooth Proxy installer <https://esphome.github.io/bluetooth-proxies/>`__
The :doc:`web_server` component should be disabled as the device is likely
to run out of memory and will malfunction when both components are enabled simultaneously.
Not all devices are supported and ESPHome does not decode or keep a list. To find out if your device is supported,
please search for it in the `Home Assistant Integrations <https://www.home-assistant.io/integrations/>`__ list.
@ -43,15 +43,11 @@ Configuration:
bluetooth_proxy:
- **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``. Requires Home Assistant 2022.10 or later.
- **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``.
- **cache_services** (*Optional*, boolean): Enables caching GATT services in NVS flash storage which significantly speeds up active connections. Defaults to ``true`` when using the ESP-IDF framework.
The Bluetooth proxy depends on :doc:`esp32_ble_tracker` so make sure to add that to your configuration.
.. note::
Bluetooth proxy requires Home Assistant 2022.9 or later. ESPHome 2022.12.0 and Home Assistant 2022.12.6 or later is recommended.
Improving reception performance
-------------------------------

View File

@ -17,7 +17,7 @@ momentarily set a GPIO pin using a button.
# Example configuration entry
output:
- platform: gpio
pin: 25
pin: GPIOXX
id: output1
button:

View File

@ -11,10 +11,6 @@ The ``uart`` button platform allows you to send a pre-defined sequence of bytes
.. code-block:: yaml
# Example configuration entry
uart:
baud_rate: 9600
tx_pin: D0
button:
- platform: uart
name: "UART String Output"

View File

@ -69,7 +69,7 @@ Configuration variables:
- ``12K5BPS`` - Support by ``esp32_can`` depends on ESP32 variant
- ``16KBPS`` - Support by ``esp32_can`` depends on ESP32 variant
- ``20KBPS`` - Support by ``esp32_can`` depends on ESP32 variant
- ``25KBPS``
- ``25KBPS``
- ``31K25BPS`` - Not supported by ``esp32_can``
- ``33KBPS`` - Not supported by ``esp32_can``
- ``40KBPS`` - Not supported by ``esp32_can``
@ -197,8 +197,8 @@ You only need to specify the RX and TX pins. Any GPIO will work.
# Example configuration entry
canbus:
- platform: esp32_can
tx_pin: GPIO5
rx_pin: GPIO4
tx_pin: GPIOXX
rx_pin: GPIOXX
can_id: 4
bit_rate: 50kbps
on_frame:
@ -209,28 +209,28 @@ You only need to specify the RX and TX pins. Any GPIO will work.
The table lists the specific bit rates supported by the component for ESP32 variants:
=================== ======= ========== ========== ========== ========== ==========
bit_rate ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6 ESP32-H2
bit_rate ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6 ESP32-H2
=================== ======= ========== ========== ========== ========== ==========
1KBPS x x x x x
5KBPS x x x x x
10KBPS x x x x x
12K5BPS x x x x x
16KBPS x x x x x
20KBPS x x x x x
25KBPS x x x x x x
31K25BPS
33KBPS
40KBPS
50KBPS x x x x x x
80KBPS
83K38BPS
95KBPS
100KBPS x x x x x x
125KBPS (Default) x x x x x x
250KBPS x x x x x x
500KBPS x x x x x x
800KBPS x x x x x x
1000KBPS x x x x x x
1KBPS x x x x x
5KBPS x x x x x
10KBPS x x x x x
12K5BPS x x x x x
16KBPS x x x x x
20KBPS x x x x x
25KBPS x x x x x x
31K25BPS
33KBPS
40KBPS
50KBPS x x x x x x
80KBPS
83K38BPS
95KBPS
100KBPS x x x x x x
125KBPS (Default) x x x x x x
250KBPS x x x x x x
500KBPS x x x x x x
800KBPS x x x x x x
1000KBPS x x x x x x
=================== ======= ========== ========== ========== ========== ==========
@ -273,7 +273,7 @@ For wiring up the MSP2515 please refer to the section below.
# Example configuration entry
canbus:
- platform: mcp2515
cs_pin: D5
cs_pin: GPIOXX
can_id: 4
bit_rate: 50kbps
on_frame:
@ -359,7 +359,7 @@ Standard IDs and Extended IDs can coexist on the same segment.
- platform: mcp2515
id: my_mcp2515
spi_id: McpSpi
cs_pin: GPIO14
cs_pin: GPIOXX
can_id: 0x1fff
use_extended_id: true
bit_rate: 125kbps
@ -385,9 +385,9 @@ Button is connected on a can node which sends an A message on ID 0x100 with payl
spi:
id: McpSpi
clk_pin: GPIO16
mosi_pin: GPIO5
miso_pin: GPIO4
clk_pin: GPIOXX
mosi_pin: GPIOXX
miso_pin: GPIOXX
binary_sensor:
- platform: template
@ -398,7 +398,7 @@ Button is connected on a can node which sends an A message on ID 0x100 with payl
- platform: mcp2515
id: my_mcp2515
spi_id: McpSpi
cs_pin: GPIO14
cs_pin: GPIOXX
can_id: 4
bit_rate: 125kbps
on_frame:
@ -430,15 +430,15 @@ Buttons are connected on the CAN-Node and also the motor is connected via CAN.
spi:
id: McpSpi
clk_pin: GPIO16
mosi_pin: GPIO5
miso_pin: GPIO4
clk_pin: GPIOXX
mosi_pin: GPIOXX
miso_pin: GPIOXX
canbus:
- platform: mcp2515
id: my_mcp2515
spi_id: McpSpi
cs_pin: GPIO14
cs_pin: GPIOXX
can_id: 4
bit_rate: 125kbps
on_frame:

View File

@ -27,10 +27,14 @@ submit a feature request (see FAQ).
+---------------------------------------+---------------------+----------------------+
| Daikin | ``daikin`` | yes |
+---------------------------------------+---------------------+----------------------+
| :ref:`Daikin ARC<daikin_arc>` | ``daikin_arc`` | yes |
+---------------------------------------+---------------------+----------------------+
| :ref:`Daikin BRC<daikin_brc>` | ``daikin_brc`` | yes |
+---------------------------------------+---------------------+----------------------+
| :ref:`Delonghi<delonghi_ir>` | ``delonghi`` | yes |
+---------------------------------------+---------------------+----------------------+
| Emmeti | ``emmeti`` | yes |
+---------------------------------------+---------------------+----------------------+
| Fujitsu General | ``fujitsu_general`` | yes |
+---------------------------------------+---------------------+----------------------+
| :ref:`GREE<gree_ir>` | ``gree`` | |
@ -72,7 +76,7 @@ controller unit.
# Example configuration entry
remote_transmitter:
pin: GPIO32
pin: GPIOXX
carrier_duty_percent: 50%
climate:
@ -152,7 +156,7 @@ IR receiver.
remote_receiver:
id: rcvr
pin:
number: GPIO14
number: GPIOXX
inverted: true
mode:
input: true
@ -220,6 +224,21 @@ Configuration variables:
header_high: 3265us # AC Units from LG in Brazil, for example use these timings
header_low: 9856us
.. _daikin_arc:
``daikin_arc`` Climate
-------------------------
The Daikin ARC remotes are used by the japanese model of Daikin.
.. code-block:: yaml
# Example configuration entry
climate:
- platform: daikin_arc
name: "AC"
sensor: room_temperature
.. _daikin_brc:
``daikin_brc`` Climate
@ -264,8 +283,8 @@ Configuration variables:
- **set_fan_mode** (*Optional*, string): Select the fan modes desired or that are supported on your remote. Defaults to ``3levels``
- Options are: ``3levels`` , ``4levels``, ``quiet_4levels``.
- Options are: ``3levels`` , ``4levels``, ``quiet_4levels``.
- ``3levels``; Low [fan speed 1], Medium [2], High [3]
- ``4levels``; Low [1], Middle [2], Medium [3], High [4]
- ``quiet_4levels``; Low [1], Middle [2], Medium [3], High [4], Quiet [5]
@ -273,10 +292,10 @@ Configuration variables:
- **supports_dry** (*Optional*, boolean): Enables setting dry mode for this unit. Defaults to ``false``.
- **supports_fan_only** (*Optional*, boolean): Enables setting fan only mode for this unit. Confirm that mode is supported on your remote. Defaults to ``false``.
- **horizontal_default** (*Optional*, string): What to default to when the AC unit's horizontal direction is *not* set to swing. Defaults to ``middle``.
- **horizontal_default** (*Optional*, string): What to default to when the AC unit's horizontal direction is *not* set to swing. Defaults to ``middle``.
- Options are: ``left``, ``middle-left``, ``middle``, ``middle-right``, ``right``, ``auto``
- **vertical_default** (*Optional*, string): What to default to when the AC unit's vertical direction is *not* set to swing. Defaults to ``middle``.
- **vertical_default** (*Optional*, string): What to default to when the AC unit's vertical direction is *not* set to swing. Defaults to ``middle``.
- Options are: ``down``, ``middle-down``, ``middle``, ``middle-up``, ``up``, ``auto``
@ -404,8 +423,8 @@ Configuration variables:
``zhlt01`` Climate
---------------------
ZH/LT-01 is a remote control that is used with many locally branded split airconditioners.
Supported brands include:
ZH/LT-01 is a remote control that is used with many locally branded split airconditioners.
Supported brands include:
- Eurom
- Chigo

View File

@ -1,21 +1,27 @@
Custom Climate
==============
.. seo::
:description: Instructions for setting up Custom C++ climate components with ESPHome.
:image: language-cpp.svg
:keywords: C++, Custom
.. warning::
Custom components are deprecated, not recommended for new configurations
and will be removed from ESPHome in a future release.
Please look at creating a real ESPHome component and "importing" it into your
configuration with :doc:`/components/external_components`.
Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
You can find some basic documentation on creating your own components
at :ref:`contributing_to_esphome`.
You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.
This integration can be used to create custom climate devices in ESPHome
using the C++ (Arduino) API.
.. warning::
Please first read :doc:`/components/sensor/custom` guide,
the same principles apply here.
While we try to keep the ESPHome YAML configuration options as stable as possible, the ESPHome API is less
stable. If something in the APIs needs to be changed in order for something else to work, we will do so.
This component can be used to create custom climate devices in ESPHome using the C++ (Arduino) API.
Please first read :doc:`/components/sensor/custom` guide, the same principles apply here.
The example below is an example of a custom climate device - all climate devices must override
two methods (:apiclass:`Climate <climate::Climate>`):

View File

@ -58,18 +58,11 @@ This component requires a :ref:`uart` to be setup.
.. code-block:: yaml
# Example configuration entry
uart:
baud_rate: 9600
tx_pin: 17
rx_pin: 16
id: ac_port
climate:
- platform: haier
id: haier_ac
protocol: hOn
name: Haier AC
name: Haier AC
uart_id: ac_port
wifi_signal: true
beeper: true

View File

@ -80,10 +80,10 @@ Advanced options:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
MQTT options:

View File

@ -25,17 +25,6 @@ The ``midea`` component creates a Midea air conditioner climate device.
.. code-block:: yaml
# Example configuration entry
# Disable logging over UART (required)
logger:
baud_rate: 0
# UART settings for Midea dongle (required)
uart:
tx_pin: 1 # hardware dependant
rx_pin: 3 # hardware dependant
baud_rate: 9600
# Main settings
climate:
- platform: midea

View File

@ -39,8 +39,10 @@ Based on this, you can create the climate device as follows:
switch_datapoint: 1
target_temperature_datapoint: 3
current_temperature_datapoint: 4
eco_datapoint: 7
eco_temperature: 20 °C
preset:
eco:
datapoint: 8
temperature: 28
Configuration variables:
------------------------
@ -50,22 +52,46 @@ Configuration variables:
- **supports_heat** (*Optional*, boolean): Specifies if the device has a heating mode. Defaults to ``true``.
- **supports_cool** (*Optional*, boolean): Specifies if the device has a cooling mode. Defaults to ``false``.
- **switch_datapoint** (**Required**, int): The datapoint id number of the climate switch (device on/off).
- **active_state_datapoint** (*Optional*, int): The datapoint id number of the active state - :ref:`see below <active_state_detection>`.
- **active_state_heating_value** (*Optional*, int): The active state datapoint value the device reports when heating. Defaults to ``1`` - :ref:`see below <active_state_detection>`.
- **active_state_cooling_value** (*Optional*, int): The active state datapoint value the device reports when cooling - :ref:`see below <active_state_detection>`.
- **active_state** (*Optional*): Configuration for the Active State Configuration.
- **datapoint** (**Required**, int): The datapoint id number of the active state - :ref:`see below <active_state_detection>`.
- **heating_value** (*Optional*, int): The active state datapoint value the device reports when heating. Defaults to ``1`` - :ref:`see below <active_state_detection>`.
- **cooling_value** (*Optional*, int): The active state datapoint value the device reports when cooling - :ref:`see below <active_state_detection>`.
- **drying_value** (*Optional*, int): The active state datapoint value the device reports when in drying mode.
- **fanonly_value** (*Optional*, int): The active state datapoint value the device reports when in Fan Only mode.
- **preset** (*Optional*): Configuration for presets.
- **eco** (*Optional*): Configuration for Eco preset.
- **datapoint** (**Required**, int): The datapoint id number of the Eco action.
- **temperature** (*Optional*, int): Temperature setpoint for Eco preset.
- **sleep** (*Optional*): Configuration for Sleep preset
- **datapoint** (**Required**, int): The Datapoint id number of the Sleep Action
- **swing_mode** (*Optional*): Configuration for the swing (oscillation) modes.
- **vertical_datapoint** (*Optional*, int): The datapoint id number of the vertical swing action.
- **horizontal_datapoint** (*Optional*, int): The datapoint id number of the horizontal swing action.
- **fan_mode** (*Optional*): Configuration for fan modes/fan speeds.
- **datapoint** (**Required**, int): The datapoint id number of the Fan value state.
- **auto_value** (*Optional*, int): The datapoint value the device reports when the fan is on ``auto`` speed.
- **low_value** (*Optional*, int): The datapoint value the device reports when the fan is on ``low`` speed.
- **medium_value** (*Optional*, int): The datapoint value the device reports when the fan is on ``medium`` speed.
- **middle_value** (*Optional*, int): The datapoint value the device reports when the fan is on ``middle`` speed. (May set to device's ``high`` value if you have a ``Turbo`` option).
- **high_value** (*Optional*, int): The datapoint value the device reports when the fan is on ``high`` speed. (Sometimes called ``Turbo``).
- **heating_state_pin** (*Optional*, :ref:`config-pin`): The input pin indicating that the device is heating - :ref:`see below <active_state_detection>`. Only used if **active_state_datapoint** is not configured.
- **cooling_state_pin** (*Optional*, :ref:`config-pin`): The input pin indicating that the device is cooling - :ref:`see below <active_state_detection>`. Only used if **active_state_datapoint** is not configured.
- **target_temperature_datapoint** (**Required**, int): The datapoint id number of the target temperature.
- **current_temperature_datapoint** (**Required**, int): The datapoint id number of the current temperature.
- **temperature_multiplier** (*Optional*, float): A multiplier to modify the incoming and outgoing temperature values - :ref:`see below <temperature-multiplier>`.
- **eco_datapoint** (*Optional*, int): The datapoint id number of the eco mode state.
- **eco_temperature** (*Optional*, float): The target temperature the controller uses while the eco mode is active.
- **reports_fahrenheit** (*Optional*, boolean): Set to ``true`` if the device reports temperatures in Fahrenheit. ESPHome expects all climate temperatures to be in Celcius, otherwise unexpected conversions will take place when it is published to Home Assistant. Defaults to ``false``.
If the device has different multipliers for current and target temperatures, **temperature_multiplier** can be replaced with both of:
- **current_temperature_multiplier** (*Optional*, float): A multiplier to modify the current temperature value.
- **target_temperature_multiplier** (*Optional*, float): A multiplier to modify the target temperature value.
- **current_temperature_multiplier** (*Optional*, float): A multiplier to modify the current temperature value.
- **target_temperature_multiplier** (*Optional*, float): A multiplier to modify the target temperature value.
- All other options from :ref:`Climate <config-climate>`.

View File

@ -1,11 +1,11 @@
Copy Integration
================
Copy Component
==============
.. seo::
:description: Instructions for setting up the copy integration in ESPHome
:description: Instructions for setting up the copy component in ESPHome
:image: content-copy.svg
The ``copy`` integration can be used to copy an existing component (like a sensor, switch, etc.)
The ``copy`` component can be used to copy an existing component (like a sensor, switch, etc.)
and create a duplicate mirroring the source's state and forwarding actions such as turning on to the source.
For each of the supported platforms, the configuration consists of the required configuration

View File

@ -1,24 +1,29 @@
Custom Cover
============
.. seo::
:description: Instructions for setting up Custom C++ covers with ESPHome.
:image: language-cpp.svg
:keywords: C++, Custom
.. warning::
Custom components are deprecated, not recommended for new configurations
and will be removed from ESPHome in a future release.
Please look at creating a real ESPHome component and "importing" it into your
configuration with :doc:`/components/external_components`.
Custom components are deprecated, not recommended for new configurations and will be removed from ESPHome in a
future release. Please look at creating a real ESPHome component and "importing" it into your configuration with
:doc:`/components/external_components`.
You can find some basic documentation on creating your own components
at :ref:`contributing_to_esphome`.
You can find some basic documentation on creating your own components at :ref:`contributing_to_esphome`.
This integration can be used to create custom covers in ESPHome
using the C++ (Arduino) API.
.. warning::
Please first read :doc:`/components/sensor/custom` guide,
the same principles apply here.
While we try to keep the ESPHome YAML configuration options as stable as possible, the ESPHome API is less
stable. If something in the APIs needs to be changed in order for something else to work, we will do so.
The example below is an example of a custom cover - all covers must override
two methods:
This component can be used to create custom covers in ESPHome using the C++ (Arduino) API.
Please first read :doc:`/components/sensor/custom` guide, the same principles apply here.
The example below is an example of a custom cover - all covers must override two methods:
- ``get_traits``: This should return a :apiclass:`CoverTraits <cover::CoverTraits>` object
representing the capabilities of the cover.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -46,10 +46,10 @@ Advanced options:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
MQTT options:

View File

@ -77,7 +77,22 @@ Configuration variables:
``esp8266_restore_from_flash: true`` option set.
See :doc:`esp8266_restore_from_flash </components/esphome>` for details.
Handle stop_action:
------------------------
For some cover controllers, separate switches for UP and DOWN action are used while a stop is issued when sending a counter command.
This can be handled at the **stop_action** by using the folling lamda function:
.. code-block:: yaml
stop_action:
- lambda: !lambda |-
if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_OPENING) {
// Cover is currently opening
id(cover_button_down).press();
} else if (id(cover).last_operation() == CoverOperation::COVER_OPERATION_CLOSING) {
// Cover is currently closing
id(cover_button_up).press();
}
See Also
--------

View File

@ -45,7 +45,7 @@ Configuration variables:
Supported devices
-----------------
Tuya cover devices known to be supported by this integration:
Tuya cover devices known to be supported by this component:
- Tuya ``M515EGWT`` (motor for bead chain roller blinds)

View File

@ -42,22 +42,27 @@ Configuration variables:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
- **time_id** (**Required**, :ref:`config-id`): The ID of the time entity. Automatically set
to the ID of a time component if only a single one is defined.
MQTT Options:
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
Datetime Automation
-------------------
Time and DateTime Options:
You can access the most recent state as a string of the datetime in :ref:`lambdas <config-lambda>` using
``id(datetime_id).state``.
You can also access it as a ``ESPTime`` object by ``id(datetime_id).state_as_time``
- **on_time** (*Optional*, :ref:`automation`): Automation to run when the current datetime or time matches the current state.
Only valid on ``time`` or ``datetime`` types.
Automation
----------
You can access the most recent state as a ``ESPTime`` object by ``id(datetime_id).state_as_esptime()``
.. _datetime-on_value:
@ -83,6 +88,9 @@ you can get the value as a ESPTime object from the trigger with ``x``.
Configuration variables: See :ref:`Automation <automation>`.
Date Automation
---------------
.. _datetime-date_set_action:
``datetime.date.set`` Action
@ -151,12 +159,165 @@ advanced stuff (see the full API Reference for more info).
// For example, create a custom log message when a value is received:
ESP_LOGI("main", "Value of my datetime: %04d-%02d-%02d", id(my_date).year, id(my_date).month, id(my_date).day);
Time Automation
---------------
.. _datetime-time_set_action:
``datetime.time.set`` Action
****************************
This is an :ref:`Action <config-action>` for setting a datetime time state.
The ``time`` provided can be in one of 3 formats:
.. code-block:: yaml
# String time
- datetime.time.set:
id: my_time
time: "12:34:56"
# Individual time parts
- datetime.time.set:
id: my_time
time:
hour: 12
minute: 34
second: 56
# Using a lambda
- datetime.time.set:
id: my_time
time: !lambda |-
// Return an ESPTime struct
return {.second: 56, .minute: 34, .hour: 12};
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the datetime to set.
- **time** (**Required**, string, time parts, :ref:`templatable <config-templatable>`):
The value to set the datetime to.
.. _datetime-time-lambda_calls:
lambda calls
************
From :ref:`lambdas <config-lambda>`, you can call several methods on all datetimes to do some
advanced stuff (see the full API Reference for more info).
- ``.make_call()``: Make a call for updating the datetime value.
.. code-block:: cpp
// Within lambda, set the time to 12:34:56
auto call = id(my_time).make_call();
call.set_date("12:34:56");
call.perform();
Check the API reference for information on the methods that are available for
the ``TimeCall`` object.
- ``.hour``: Retrieve the current hour of the ``time``. It will be ``0`` if no value has been set.
- ``.minute``: Retrieve the current minute of the ``time``. It will be ``0`` if no value has been set.
- ``.second``: Retrieve the current second of the ``time``. It will be ``0`` if no value has been set.
- ``.state_as_esptime()``: Retrieve the current value of the datetime as a :apistruct:`ESPTime` object.
.. code-block:: cpp
// For example, create a custom log message when a value is received:
ESP_LOGI("main", "Value of my datetime: %0d:%02d:%02d", id(my_time).hour, id(my_time).minute, id(my_time).second);
DateTime Automation
-------------------
.. _datetime-datetime_set_action:
``datetime.datetime.set`` Action
********************************
This is an :ref:`Action <config-action>` for setting a datetime datetime state.
The ``datetime`` provided can be in one of 3 formats:
.. code-block:: yaml
# String datetime
- datetime.time.set:
id: my_datetime
datetime: "2024-12-31 12:34:56"
# Individual datetime parts
- datetime.datetime.set:
id: my_datetime
datetime:
year: 2024
month: 12
day: 31
hour: 12
minute: 34
second: 56
# Using a lambda
- datetime.datetime.set:
id: my_datetime
datetime: !lambda |-
// Return an ESPTime struct
return {.second: 56, .minute: 34, .hour: 12, .day_of_month: 31, .month: 12, .year: 2024};
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the datetime to set.
- **datetime** (**Required**, string, datetime parts, :ref:`templatable <config-templatable>`):
The value to set the datetime to.
.. _datetime-datetime-lambda_calls:
Lambda calls
************
For more complex use cases, several methods are available for use on datetimes from within :ref:`lambdas <config-lambda>`. See the full API Reference for more information.
- ``.make_call()``: Make a call for updating the datetime value.
.. code-block:: cpp
// Within lambda, set the datetime to 2024-12-31 12:34:56
auto call = id(my_datetime).make_call();
call.set_date("2024-12-31 12:34:56");
call.perform();
Check the API reference for information on the methods that are available for
the ``DateTimeCall`` object.
- ``.year``: Retrieve the current year of the ``datetime``. It will be ``0`` if no value has been set.
- ``.month``: Retrieve the current month of the ``datetime``. It will be ``0`` if no value has been set.
- ``.day``: Retrieve the current day of the ``datetime``. It will be ``0`` if no value has been set.
- ``.hour``: Retrieve the current hour of the ``datetime``. It will be ``0`` if no value has been set.
- ``.minute``: Retrieve the current minute of the ``datetime``. It will be ``0`` if no value has been set.
- ``.second``: Retrieve the current second of the ``datetime``. It will be ``0`` if no value has been set.
- ``.state_as_esptime()``: Retrieve the current value of the datetime as a :apistruct:`ESPTime` object.
.. code-block:: cpp
// For example, create a custom log message when a value is received:
ESP_LOGI("main", "Value of my datetime: %04d-%02d-%02d %0d:%02d:%02d",
id(my_datetime).year, id(my_datetime).month, id(my_datetime).day,
id(my_datetime).hour, id(my_datetime).minute, id(my_datetime).second);
See Also
--------
- :apiref:`DateTimeBase <datetime/datetime_base.h>`
- :apiref:`DateEntity <datetime/date_entity.h>`
- :apiref:`DateCall <datetime/date_entity.h>`
- :apiref:`TimeEntity <datetime/time_entity.h>`
- :apiref:`TimeCall <datetime/time_entity.h>`
- :apiref:`DateTimeEntity <datetime/datetime_entity.h>`
- :apiref:`DateTimeCall <datetime/datetime_entity.h>`
- :ghedit:`Edit`
.. toctree::

View File

@ -10,8 +10,8 @@ using :ref:`lambdas <config-lambda>`.
.. code-block:: yaml
# Example configuration entry
datetime:
# Example Date
- platform: template
id: my_date
type: date
@ -20,10 +20,28 @@ using :ref:`lambdas <config-lambda>`.
initial_value: "2024-01-30"
restore_value: true
# Example Time
- platform: template
id: my_time
type: time
name: Pick a Time
optimistic: yes
initial_value: "12:34:56"
restore_value: true
# Example DateTime
- platform: template
id: my_datetime
type: datetime
name: Pick a DateTime
optimistic: yes
initial_value: "2024-12-31 12:34:56"
restore_value: true
Configuration variables:
------------------------
- **type** (*Required*, enum): The type of the datetime. Can only be ``date``.
- **type** (*Required*, enum): The type of the datetime. Can be one of ``date`` or ``time``.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`):
Lambda to be evaluated every update interval to get the current value of the datetime.
- **set_action** (*Optional*, :ref:`Action <config-action>`): The action that should
@ -39,15 +57,44 @@ Configuration variables:
- **initial_value** (*Optional*, string): The value to set the state to on setup if not
restored with ``restore_value``. Can be one of:
- A string in the format ``%Y-%m-%d``, eg: ``"2023-12-04"``.
- An object including ``year``, ``month``, ``day``.
- For ``type: date``:
.. code-block:: yaml
- A string in the format ``%Y-%m-%d`` , eg: ``"2023-12-04"``.
- An object including ``year``, ``month``, ``day``.
initial_value:
year: 2023
month: 12
day: 4
.. code-block:: yaml
initial_value:
year: 2023
month: 12
day: 4
- For ``type: time``:
- A string in the format ``%H:%M:%S`` , eg: ``"12:34:56"``.
- An object including ``hour``, ``minute``, ``second``.
.. code-block:: yaml
initial_value:
hour: 12
minute: 34
second: 56
- For ``type: datetime``:
- A string in the format ``%Y-%m-%d %H:%M:%S`` , eg: ``"2023-12-04 12:34:56"``.
- An object including ``year``, ``month``, ``day``, ``hour``, ``minute``, ``second``.
.. code-block:: yaml
initial_value:
year: 2023
month: 12
day: 4
hour: 12
minute: 34
second: 56
- All other options from :ref:`Datetime <config-datetime>`.

View File

@ -87,6 +87,34 @@ when the deep sleep should start? There are three ways of handling this using th
then re-configure deep sleep to wake up on a LOW signal and vice versa. Useful in situations when you want to
use observe the state changes of a pin using deep sleep and the ON/OFF values last longer.
ESP32 Wakeup Cause
------------------
On the ESP32, the ``esp_sleep_get_wakeup_cause()`` function can be used to check which wakeup source has triggered
wakeup from sleep mode.
.. code-block:: yaml
sensor:
- platform: template
name: "Wakeup Cause"
accuracy_decimals: 0
lambda: return esp_sleep_get_wakeup_cause();
The following integers are the wakeup causes:
- **0** - ``ESP_SLEEP_WAKEUP_UNDEFINED``: In case of deep sleep, reset was not caused by exit from deep sleep
- **1** - ``ESP_SLEEP_WAKEUP_ALL``: Not a wakeup cause, used to disable all wakeup sources with esp_sleep_disable_wakeup_source
- **2** - ``ESP_SLEEP_WAKEUP_EXT0``: Wakeup caused by external signal using RTC_IO
- **3** - ``ESP_SLEEP_WAKEUP_EXT1``: Wakeup caused by external signal using RTC_CNTL
- **4** - ``ESP_SLEEP_WAKEUP_TIMER``: Wakeup caused by timer
- **5** - ``ESP_SLEEP_WAKEUP_TOUCHPAD``: Wakeup caused by touchpad
- **6** - ``ESP_SLEEP_WAKEUP_ULP``: Wakeup caused by ULP program
- **7** - ``ESP_SLEEP_WAKEUP_GPIO``: Wakeup caused by GPIO (light sleep only on ESP32, S2 and S3)
- **8** - ``ESP_SLEEP_WAKEUP_UART``: Wakeup caused by UART (light sleep only)
- **9** - ``ESP_SLEEP_WAKEUP_WIFI``: Wakeup caused by WIFI (light sleep only)
- **10** - ``ESP_SLEEP_WAKEUP_COCPU``: Wakeup caused by COCPU int
- **11** - ``ESP_SLEEP_WAKEUP_COCPU_TRAP_TRIG``: Wakeup caused by COCPU crash
- **12** - ``ESP_SLEEP_WAKEUP_BT``: Wakeup caused by BT (light sleep only)
.. _deep_sleep-enter_action:

View File

@ -1,12 +1,12 @@
Demo Integration
================
Demo Component
==============
.. seo::
:description: Instructions for setting up the demo integration in ESPHome
:description: Instructions for setting up the demo component in ESPHome
:image: description.svg
The ``demo`` integration can be used for testing to generate sample instances of many
different integrations (sensors, lights, ...)
The ``demo`` component can be used for testing to generate sample instances of many
different components (sensors, lights, ...)
.. figure:: images/demo-ui.png
:align: center
@ -20,7 +20,7 @@ different integrations (sensors, lights, ...)
Configuration variables:
------------------------
This integration has no configuration variables
This component has no configuration variables
See Also
--------

View File

@ -2,7 +2,7 @@ DF-Player mini
==============
.. seo::
:description: Instructions for setting up DF Player Mini integration in ESPHome.
:description: Instructions for setting up DF Player Mini component in ESPHome.
:image: dfplayer.svg
The ``dfplayer`` (`datasheet <https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299>`__), component
@ -14,8 +14,7 @@ allows you to play sound and music stored in an SD card or USB flash drive.
DF-Player mini Module.
For this integration to work you need to have set up a :ref:`UART bus <uart>`
in your configuration.
For this component to work you need to have set up a :ref:`UART bus <uart>` in your configuration.
Overview
--------
@ -31,16 +30,7 @@ will be required.
.. code-block:: yaml
# Example configuration entry
uart:
tx_pin: GPIO2
rx_pin: GPIO5
baud_rate: 9600
# Declare DFPlayer mini module
dfplayer:
on_finished_playback:
then:
logger.log: 'Somebody press play!'
Configuration variables:
------------------------
@ -114,11 +104,11 @@ Configuration options:
``dfplayer.play_mp3`` Action
----------------------------
Plays a track inside the folder ``mp3``. Files inside the folder must be numbered from 1
Plays a track inside the folder ``mp3``. Files inside the folder must be numbered from 1
to 9999, like ``0001.mp3``, ``0002.mp3``, ... etc.
The folder name needs to be ``mp3``, placed under the SD card root directory, and the
mp3 file name needs to be 4 digits, for example, "0001.mp3", placed under the mp3 folder.
If you want, you can add additional text after the number in the filename, for example,
The folder name needs to be ``mp3``, placed under the SD card root directory, and the
mp3 file name needs to be 4 digits, for example, "0001.mp3", placed under the mp3 folder.
If you want, you can add additional text after the number in the filename, for example,
``0001hello.mp3``, but must always be referenced by number only in yaml.
.. code-block:: bash
@ -345,8 +335,8 @@ Sample code
.. code-block:: yaml
uart:
tx_pin: GPIO2
rx_pin: GPIO5
tx_pin: GPIOXX
rx_pin: GPIOXX
baud_rate: 9600
dfplayer:

View File

@ -19,18 +19,6 @@ The display requires that an :apiclass:`AddressableLight <light::AddressableLigh
.. code-block:: yaml
light:
- platform: fastled_clockless
chipset: WS2812B
pin: GPIO4
num_leds: 64
rgb_order: GRB
name: "led_matrix"
id: led_matrix_light
default_transition_length: 0s
color_correct: [50%, 50%, 50%]
restore_mode: ALWAYS_ON
display:
- platform: addressable_light
id: led_matrix_display
@ -61,10 +49,10 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to call the lambda to update the display.
Defaults to ``16ms``.
- **pixel_mapper** (*Optional*, :ref:`lambda <config-lambda>`): A lambda that returns the integer address of the LED
given the supplied the ``x`` and ``y`` pixel coordinate. By default, a left-to-right direct pixel mapper is used.
given the supplied the ``x`` and ``y`` pixel coordinate. By default, a left-to-right direct pixel mapper is used.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
``it`` will be an instance of :apiclass:`DisplayBuffer <display::DisplayBuffer>`.
See :ref:`display-engine` for more information.
See :ref:`display-engine` for more information.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
@ -73,7 +61,7 @@ Configuration variables:
When enabled (the default, but also via ``it.set_enabled(true)``), any effect currently running on the
addressable light will be disabled. When disabled (``it.set_enabled(false)``), the last configured effect will
be restored.
While the display is enabled, it is still possible to control the parent addressable light component in some
limited capacity. Changing the brightness will still work, but changing the color will have no affect. It is not
adivsable to enable any effects (ex: rainbow, color wipe, etc) while the display is enabled, as this will cause a

View File

@ -7,11 +7,14 @@ Font Renderer Component
:description: Instructions for setting up fonts in ESPHome.
:image: format-font.svg
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.
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>`.
To use fonts you first have to define a font object in your ESPHome configuration file. 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.
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.
- Use the ``gfonts://`` short form to use Google Fonts directly.
- Load a font from a URL directly on build.
Next, create a ``font:`` section in your configuration:
@ -68,6 +71,15 @@ Next, create a ``font:`` section in your configuration:
"\U000F05D4", # mdi-airplane-landing
]
- file: "https://github.com/IdreesInc/Monocraft/releases/download/v3.0/Monocraft.ttf"
id: web_font
size: 20
- file:
url: "https://github.com/IdreesInc/Monocraft/releases/download/v3.0/Monocraft.ttf"
type: web
id: web_font2
size: 24
display:
# ...
@ -77,7 +89,7 @@ Configuration variables:
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the font
file. You can also use the ``gfonts://`` short form to use Google Fonts, or use the below structure:
- **type** (**Required**, string): Can be ``local`` or ``gfonts``.
- **type** (**Required**, string): Can be ``local``, ``gfonts`` or ``web``.
**Local Fonts**:
@ -101,6 +113,10 @@ Configuration variables:
- **extra-bold**: 800
- **black**: 900
**Web Fonts**:
- **url** (**Required**, string): The URL of the TrueType or bitmap font file.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the font later
in your display code.
- **size** (*Optional*, int): The size of the font in pt (not pixel!).
@ -117,14 +133,14 @@ Configuration variables:
.. note::
OpenType/TrueType font files offer icons at codepoints far from what's reachable on a standard keyboard, for these it's needed
to specify the unicode codepoint of the glyph as a hex address escaped with ``\u`` or ``\U``.
- Code points up to ``0xFFFF`` are encoded like ``\uE6E8``. Lowercase ``\u`` and exactly 4 hexadecimal digits.
OpenType/TrueType font files offer icons at codepoints far from what's reachable on a standard keyboard, for these it's needed
to specify the unicode codepoint of the glyph as a hex address escaped with ``\u`` or ``\U``.
- Code points up to ``0xFFFF`` are encoded like ``\uE6E8``. Lowercase ``\u`` and exactly 4 hexadecimal digits.
- Code points above ``0xFFFF`` are encoded like ``\U0001F5E9``. Capital ``\U`` and exactly 8 hexadecimal digits.
The ``extras`` section only supports OpenType/TrueType files, ``size`` and ``bpp`` will be the same as the above level. This will allow printing icons alongside the characters in the same string, like ``I \uF004 You \uF001``.
The ``extras`` section only supports OpenType/TrueType files, ``size`` and ``bpp`` will be the same as the above level. This will allow printing icons alongside the characters in the same string, like ``I \uF004 You \uF001``.
Many font sizes with multiple glyphs at high bit depths will increase the binary size considerably. Make your choices carefully.
@ -142,4 +158,3 @@ See Also
- `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

@ -55,8 +55,8 @@ beyond the basic SPI connections, and a reasonable amount of RAM, it is not well
display:
- platform: ili9xxx
model: ili9341
dc_pin: 27
reset_pin: 33
dc_pin: GPIOXX
reset_pin: GPIOXX
lambda: |-
it.fill(COLOR_BLACK);
it.print(0, 0, id(my_font), id(my_red), TextAlign::TOP_LEFT, "Hello World!");
@ -96,8 +96,6 @@ Configuration variables:
- **offset_width** (*Optional*, int): Specify an offset for the x-direction of the display, typically used when an LCD is smaller than the maximum supported by the driver chip. Default is 0
- **offset_height** (*Optional*, int): Specify an offset for the y-direction of the display. Default is 0.
- **data_rate** (*Optional*): Set the data rate of the SPI interface to the display. One of ``80MHz``, ``40MHz`` (default), ``20MHz``, ``10MHz``, ``5MHz``, ``2MHz``, ``1MHz``, ``200kHz``, ``75kHz`` or ``1kHz``. If you have multiple ILI9xxx displays they must all use the same **data_rate**.
- **spi_mode** (*Optional*): Set the mode for the SPI interface to the display. Default is ``MODE0`` but some displays require ``MODE3``.
- **invert_colors** (*Optional*): With this boolean option you can invert the display colors. **Note** some of the displays have this option set automatically to true and can't be changed.
- **18bit_mode** (*Optional*): With this boolean option you can manual enable or disable the 18 bit color mode.
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ````, ``90°``, ``180°``, or ``270°``. This option cannot be used with ``transform``.
@ -107,14 +105,18 @@ Configuration variables:
- **mirror_x** (*Optional*, boolean): If true, mirror the x axis.
- **mirror_y** (*Optional*, boolean): If true, mirror the y axis.
**Note:** To rotate the display in hardware use one of the following combinations - with 90 and 270 rotations you
will also need to use `dimensions:` to swap the height and width (see example below.)
**Note:** The ``rotation`` variable will do a software based rotation. It is better to use the **transform** to rotate the display in hardware. Use one of the following combinations:
- 90 degrees - use ``swap_xy`` with ``mirror_x``
- 180 degrees - use ``mirror_x`` with ``mirror_y``
- 270 degrees - use ``swap_xy`` with ``mirror_y``
With 90 and 270 rotations you will also need to swap the **dimensions** ''height'' and ''width'' (see example below.
To modify the SPI setting see :ref:`SPI bus <spi>` . The default **data_rate** is set to ``40MHz`` and the **spi_mode** mode is ``MODE0`` but some displays require ``MODE3`` (*).
**Note:** The maximum achievable data rate will depend on the chip type (e.g. ESP32 vs ESP32-S3) the pins used (on ESP32 using the default SPI pins allows higher rates) and the connection type (on-board connections will support higher rates than long cables or DuPont wires.) If in doubt, start with a low speed and test higher rates to find what works. A MISO pin should preferably not be specified, as this will limit the maximum rate in some circumstances, and is not required if the SPI bus is used only for the display.
Configuration examples
**********************
@ -132,8 +134,6 @@ height 320 and width 480 into portrait. Note that the dimensions are those of th
width: 320
To utilize the color capabilities of this display module, you'll likely want to add a ``color:`` section to your
YAML configuration; please see :ref:`color <config-color>` for more detail on this configuration section.
@ -180,13 +180,13 @@ To configure a dimmable backlight:
# Define a PWM output on the ESP32
output:
- platform: ledc
pin: 32
id: gpio_32_backlight_pwm
pin: GPIOXX
id: backlight_pwm
# Define a monochromatic, dimmable light for the backlight
light:
- platform: monochromatic
output: gpio_32_backlight_pwm
output: backlight_pwm
name: "Display Backlight"
id: back_light
restore_mode: ALWAYS_ON
@ -204,8 +204,8 @@ To configure an image adaptive color pallet to show greater than 8 bit color dep
display:
- platform: ili9xxx
model: ili9341
dc_pin: 4
reset_pin: 22
dc_pin: GPIOXX
reset_pin: GPIOXX
rotation: 90
id: tft_ha
color_palette: IMAGE_ADAPTIVE
@ -234,7 +234,7 @@ This config rotates the display into landscape mode using the driver chip.
mirror_y: true
color_order: bgr
data_rate: 80MHz
cs_pin: 10
cs_pin: GPIOXX
dc_pin: GPIO13
reset_pin: GPIO9

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -2,7 +2,7 @@ Display Component
=================
.. seo::
:description: Instructions for setting up the display integration.
:description: Instructions for setting up the display component.
:image: folder-open.svg
The ``display`` component houses ESPHome's powerful rendering and display
@ -45,6 +45,9 @@ this behavior by setting ``auto_clear_enabled: false``.
In the lambda, you can write code like in any :ref:`lambda <config-lambda>` in ESPHome. Display
lambdas are additionally passed a variable called ``it`` which represents the rendering engine object.
.. figure:: images/display_rendering_line.png
:align: center
.. code-block:: yaml
display:
@ -74,8 +77,10 @@ the rendering engine is always first specify the ``x`` coordinate and then the `
Basic Shapes
------------
Now that you know a bit more about ESPHome's coordinate system, let's draw some basic shapes like lines, rectangles
and circles:
Now that you know a bit more about ESPHome's coordinate system, let's draw some basic shapes like lines, rectangles, circles or even polygons:
.. figure:: images/display_rendering_shapes.png
:align: center
.. code-block:: yaml
@ -85,27 +90,27 @@ and circles:
lambda: |-
// Draw a line from [0,0] to [100,50]
it.line(0, 0, 100, 50);
// Draw the outline of a rectangle with the top left at [50,60], a width of 30 and a height of 42
it.rectangle(50, 60, 30, 42);
// Draw the same rectangle, but this time filled.
it.filled_rectangle(50, 60, 30, 42);
// Draw the outline of a rectangle with the top left at [5,20], a width of 30 and a height of 42
it.rectangle(5, 20, 30, 42);
// Draw the same rectangle a few pixels apart, but this time filled
it.filled_rectangle(40, 40, 30, 42);
// Circles! Let's draw one with the center at [25,25] and a radius of 10
it.circle(25, 25, 10);
// Circles! Let's draw one with the center at [20,40] and a radius of 10
it.circle(20, 40, 10);
// ... and the same thing filled again
it.filled_circle(25, 25, 10);
it.filled_circle(20, 75, 10);
// Triangles... Let's draw the outline of a triangle from the [x,y] coordinates of its three points
// [25,5], [5,25], [50,50]
it.triangle(25, 5, 5, 25, 50, 50);
// [25,5], [100,5], [80,25]
it.triangle(25, 5, 100, 5, 80, 25);
// and a filled triangle !
it.filled_triangle(125, 5, 105, 25, 150, 50);
it.filled_triangle(115, 5, 95, 25, 125, 70);
// Regular Polygons? Let's draw the outline of a pointy-topped hexagon inscribed in a circle
// centered on [x1=100,y1=100] with a radius of 50
it.regular_polygon(100, 100, 50, EDGES_HEXAGON);
// and a filled flat-topped octagon!
it.filled_regular_polygon(200, 200, 50, EDGES_OCTAGON, VARIATION_FLAT_TOP);
// Regular Polygons? Let's draw a filled, pointy-topped hexagon inscribed in a circle
// centered on [170,45] with a radius of 20
it.filled_regular_polygon(170, 45, 20, EDGES_HEXAGON);
// and the outline of flat-topped octagon around it!
it.regular_polygon(170, 45, 40, EDGES_OCTAGON, VARIATION_FLAT_TOP);
// Need to rotate the polygon, or retrieve the coordinates of its vertices? Check the API!
All the above methods can optionally also be called with an argument at the end which specifies in which
@ -117,33 +122,35 @@ color to draw. For monochrome displays, only ``COLOR_ON`` (the default if color
- platform: ...
# ...
lambda: |-
// Turn the whole display on.
// Turn the whole display on
it.fill(COLOR_ON);
// Turn the whole display off.
// Turn the whole display off
it.fill(COLOR_OFF);
// Turn a single pixel off at [50,60]
it.draw_pixel_at(50, 60, COLOR_OFF);
// Turn off a whole display portion.
it.rectangle(50, 50, 30, 42, COLOR_OFF);
For color displays (e.g. TFT displays), you can use the Color class.
.. figure:: images/display_rendering_colors.png
:align: center
.. code-block:: yaml
display:
- platform: ...
# ...
lambda: |-
auto black = Color(0, 0, 0);
auto red = Color(255, 0, 0);
auto green = Color(0, 255, 0);
auto blue = Color(0, 0, 255);
auto white = Color(255, 255, 255);
it.rectangle(20, 50, 30, 30, white);
it.rectangle(25, 55, 30, 30, red);
it.rectangle(30, 60, 30, 30, green);
it.rectangle(35, 65, 30, 30, blue);
it.filled_circle(20, 32, 15, black);
it.filled_circle(40, 32, 15, red);
it.filled_circle(60, 32, 15, green);
it.filled_circle(80, 32, 15, blue);
it.filled_circle(100, 32, 15, white);
Additionally, you have access to two helper methods which will fetch the width and height of the display:
@ -156,6 +163,8 @@ Additionally, you have access to two helper methods which will fetch the width a
// Draw a circle in the middle of the display
it.filled_circle(it.get_width() / 2, it.get_height() / 2, 20);
// Turn off bottom half of the screen
it.filled_rectangle(0, it.get_height()/2, it.get_width(), it.get_height()/2, COLOR_OFF);
You can view the full API documentation for the rendering engine in the "API Reference" in the See Also section.
@ -218,6 +227,10 @@ In case of fonts rendered at higher bit depths, the background color has to be s
// Syntax is always: it.print(<x>, <y>, <font>, [color=COLOR_ON], [align], <text>, [color=COLOR_OFF]);
it.print(0, 0, id(my_font_with_icons), COLOR_ON, TextAlign::CENTER, "Just\U000f05d4here. Already\U000F02D1this.", COLOR_OFF);
.. figure:: images/display_rendering_text.png
:align: center
.. _display-printf:
Formatted Text
@ -457,13 +470,8 @@ memory at the time the sensor updates and will be lost when the device reboots.
Examples:
.. figure:: images/graph_screen.png
.. figure:: images/display_rendering_graph.png
:align: center
:width: 60.0%
.. figure:: images/graph_dualtrace.png
:align: center
:width: 60.0%
Graph component with options for grids, border and line-types.
@ -602,6 +610,12 @@ To draw the QR-code, call the ``it.qr_code`` function from your render lambda:
// Draw the QR-code at position [x=50,y=0] with white color and a 2x scale
it.qr_code(50, 0, id(homepage_qr), Color(255,255,255), 2);
// Draw the QR-code in the center of the screen with white color and a 2x scale
auto size = id(homepage_qr).get_size() * 2; // Multiply by scale
auto x = (it.get_width() / 2) - (size / 2);
auto y = (it.get_height() / 2) - (size / 2);
it.qr_code(x, y, id(homepage_qr), Color(255,255,255), 2);
.. _display-image:
@ -921,49 +935,30 @@ Additionally the old page will be given as the variable ``from`` and the new one
Troubleshooting
---------------
Color Test Pattern
------------------
Using the Color Test Card
-------------------------
If you're experiencing issues with your color display, the script below can help you to identify what might be wrong.
It will show 3 color bars in **RED**, **GREEN** and **BLUE**. To help the graphics display team determine
the best way to help you, **a picture of the result of this script is very helpful.**
If you're experiencing issues with your color display, the ``show_test_card: true`` option can help you to identify what might be wrong.
- It will show bars for Red, Green and Blue, graduating to black and white.
- Together with that it will show the letters "**R**", "**G**" and "**B**" to validate the display geometry.
- There will be a rectangle around the corners of the display with a marker at the 0,0 corner which should be at the top left of the screen.
.. figure:: images/test_card.jpg
:align: center
:width: 50.0%
When all points above are shown correctly then the display is working as expected.
To help the graphics display team determine the best way to help you, **a picture of the result of this option is very helpful.**
Should you `create an issue <https://github.com/esphome/issues/issues>`__ in GitHub regarding your display, please
be sure to **include a link to where you purchased it** so that we can validate the configuration you've used.
be sure to **include a link to where you purchased the display** so that we can validate the configuration you've used.
.. code-block:: yaml
.. note::
display:
- platform: ...
...
lambda: |-
int shift_x = (it.get_width()-310)/2;
int shift_y = (it.get_height()-256)/2;
for(auto i = 0; i<256; i++) {
it.horizontal_line(shift_x+ 0,i+shift_y,50, my_red.fade_to_white(i));
it.horizontal_line(shift_x+ 50,i+shift_y,50, my_red.fade_to_black(i));
it.horizontal_line(shift_x+105,i+shift_y,50, my_green.fade_to_white(i));
it.horizontal_line(shift_x+155,i+shift_y,50, my_green.fade_to_black(i));
it.horizontal_line(shift_x+210,i+shift_y,50, my_blue.fade_to_white(i));
it.horizontal_line(shift_x+260,i+shift_y,50, my_blue.fade_to_black(i));
}
it.rectangle(shift_x+ 0, 0+shift_y, shift_x+ 310, 256+shift_y, my_yellow);
color:
- id: my_blue
blue: 100%
- id: my_red
red: 100%
- id: my_green
green: 100%
- id: my_white
red: 100%
blue: 100%
green: 100%
- id: my_yellow
hex: ffff00
For displays in 8 bit mode you will see distinct color blocks rather than a smooth gradient.
See Also
--------

View File

@ -2,12 +2,12 @@ Character-Based LCD Display
===========================
.. seo::
:description: Instructions for setting up character-based HD44780 LCD displays.
:description: Instructions for setting up character-based HD44780 LCDs.
:image: lcd.jpg
The ``lcd_pcf8574`` and ``lcd_gpio`` display components allow you to use HD44780-compatible, character-based LCD displays
with ESPHome. This integration is only for LCD displays that display individual characters on a screen
(usually 8-40 columns and 2-4 rows), and not for LCD displays that can control each pixel individually.
The ``lcd_pcf8574`` and ``lcd_gpio`` display components allow you to use HD44780-compatible, character-based LCDs
with ESPHome. This component is only for LCDs that display individual characters on a screen
(usually 8-40 columns and 2-4 rows), and not for LCDs that can control each pixel individually.
.. figure:: images/lcd-hello_world.jpg
:align: center
@ -15,12 +15,12 @@ with ESPHome. This integration is only for LCD displays that display individual
.. note::
Multiple versions of the display exist, supporting different character sets:
Multiple versions of the display exist, supporting different character sets:
- HD44780UA00 English-Japanese which includes katakana characters, some Greek letters and mathematical symbols
- HD44780UA02 English-European which includes Greek, Cyrillic and Western European characters (with some diacritics)
- HD44780UBxx custom, manufacturer-specific character sets
It is also possible to add eight user-defined characters.
.. _lcd-pcf8574:
@ -28,7 +28,7 @@ with ESPHome. This integration is only for LCD displays that display individual
lcd_pcf8574 Component
---------------------
``lcd_pcf8574`` is for LCD displays with a PCF8574 GPIO expander module connected to all the data pins. This has the
``lcd_pcf8574`` is for LCD displays with a PCF8574 GPIO expander module connected to all the data pins. This has the
benefit that you only need to connect two data wires to the ESP instead of the six or ten as with the :ref:`lcd-gpio`.
The communication happens via :ref:`I²C Bus <i2c>`, you need to have an ``i2c:`` section in your configuration.
@ -65,7 +65,7 @@ Configuration variables:
.. note::
If you're not seeing anything on the display, try turning the contrast potentiometer around on the
If you're not seeing anything on the display, try turning the contrast potentiometer around on the
PCF8574 board.
.. _lcd-gpio:
@ -74,7 +74,7 @@ lcd_gpio Component
------------------
The ``lcd_gpio`` version of this component addresses the screen directly and does not employ a GPIO expander module.
Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers
Each of the data pins of the LCD needs a dedicated GPIO pin on the ESP. Connecting the screen this way offers
faster refresh, especially in conjunction with an :ref:`LCD Menu <lcd_menu>`.
.. figure:: images/lcd_gpio.svg
@ -90,12 +90,12 @@ faster refresh, especially in conjunction with an :ref:`LCD Menu <lcd_menu>`.
- platform: lcd_gpio
dimensions: 20x4
data_pins:
- GPIO32
- GPIO33
- GPIO5
- GPIO17
enable_pin: D4
rs_pin: D5
- GPIOXX
- GPIOXX
- GPIOXX
- GPIOXX
enable_pin: GPIOXX
rs_pin: GPIOXX
lambda: |-
it.print("Hello World!");
@ -105,8 +105,8 @@ Configuration variables:
- **dimensions** (**Required**, string): The dimensions of the display with ``COLUMNSxROWS``. If you're not
sure, power the display on, turn contrast high up and just count them.
- **data_pins** (**Required**, list of :ref:`pins <config-pin_schema>`): A list of the data pins you
have hooked up to the LCD. The list can either be 4 items long (operating in 4-bit mode with
either the first 4 data pins connected or the last 4 data pins connected), or 8 items long (when you have
have hooked up to the LCD. The list can either be 4 items long (operating in 4-bit mode with
either the first 4 data pins connected or the last 4 data pins connected), or 8 items long (when you have
connected all 8 data pins).
- **enable_pin** (**Required**, :ref:`pin <config-pin_schema>`): The pin you have ``E`` (``06``) hooked up to.
- **rs_pin** (**Required**, :ref:`pin <config-pin_schema>`): The pin you have ``RS`` (``04``) hooked up to.
@ -118,7 +118,7 @@ Configuration variables:
.. note::
If you're not seeing anything on the display, make sure you apply ``3.3V`` to the ``VEE`` (``03``) contrast control
If you're not seeing anything on the display, make sure you apply ``3.3V`` to the ``VEE`` (``03``) contrast control
pin of the board. You can use a potentiometer to make it adjustable.
@ -177,7 +177,7 @@ The LCD display has the possibility to define up to eight user defined character
``0`` to ``7`` and mirrored at ``8`` to ``15`` (i.e. ``\x08`` can be used instead of the ``\0`` that can
be problematic in strings). Each character has eight lines of five bits, with the first line on the top
and the most significant bit on the left, meaning that ``0b10000`` followed by six zeros and a ``0b00001``
defines a dot at the upper left and lower right of the character.
defines a dot at the upper left and lower right of the character.
.. code-block:: yaml
@ -221,7 +221,7 @@ Keep in mind that the display lambda runs for every ``update_interval``, so if t
it cannot be overridden from other parts.
With the ``lcd_gpio``, the backlight is lit by applying ``Vcc`` to the ``BLA`` (``15``) pin and connect ``BLK`` (``16``)
pin to ``GND``. The backlight can draw more power than the microcontroller output pins can supply, so it is advisable
pin to ``GND``. The backlight can draw more power than the microcontroller output pins can supply, so it is advisable
to use a transistor as a switch to control the power for the backlight pins.
Below an example for a typical use-case where the backlight is turned on when a motion sensor activates and

View File

@ -8,7 +8,7 @@ MAX7219 7-Segment Display
The ``max7219`` display platform allows you to use MAX7219 7-segment display drivers (
`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf>`__,
`hobbycomponents <https://hobbycomponents.com/displays/597-max7219-8-digit-seven-segment-display-module>`__)
with ESPHome. Please note that this integration is *only* for 7-segment display, not matrix configurations.
with ESPHome. Please note that this component is *only* for 7-segment display, not matrix configurations.
.. figure:: images/max7219-full.jpg
:align: center
@ -16,7 +16,7 @@ with ESPHome. Please note that this integration is *only* for 7-segment display,
MAX7219 7-Segment Display.
As the communication with the MAX7219 is done using SPI for this integration, you need
As the communication with the MAX7219 is done using SPI for this component, you need
to have an :ref:`SPI bus <spi>` in your configuration with both the **mosi_pin** set (miso_pin is not required).
Connect VCC to 3.3V (the manufacturer recommends 4+ V, but 3.3V seems to work fine), DIN to your ``mosi_pin`` and
CS to your set ``cs_pin`` and finally GND to GND.

View File

@ -5,7 +5,7 @@ MAX7219 Digit Display
:description: Instructions for setting up MAX7219 Digit displays.
:image: max7219digit.jpg
The ``max7219`` display platform allows you to use MAX7219 digit with ESPHome. Please note that this integration
The ``max7219`` display platform allows you to use MAX7219 digit with ESPHome. Please note that this component
is *only* for the digit "matrix" display, for the 7 segment display see :doc:`max7219`.
.. figure:: images/max7219digit.png
@ -14,7 +14,7 @@ is *only* for the digit "matrix" display, for the 7 segment display see :doc:`ma
MAX7219 Digit Display.
As the communication with the MAX7219 Digit is done using SPI for this integration, you need
As the communication with the MAX7219 Digit is done using SPI for this component, you need
to have an :ref:`SPI bus <spi>` in your configuration with both the **mosi_pin** set (miso_pin is not required).
Connect VCC to 3.3V (the manufacturer recommends 4+ V, but 3.3V seems to work fine), DIN to your ``mosi_pin`` and
CS to your set ``cs_pin`` and finally GND to GND.

View File

@ -18,15 +18,15 @@ with ESPHome.
As the communication with the Nextion LCD display is done using UART, you need to have an :ref:`UART bus <uart>`
in your configuration with ``rx_pin`` both the ``tx_pin`` set to the respective pins on the display.
The Nextion uses a baud rate of 9600 by default. It may be configured to use a faster speed by adding (for
example)
example)
.. code-block:: c++
baud=115200 // Sets the baud rate to 115200
bkcmd=0 // Tells the Nextion to not send responses on commands. This is the current default but can be set just in case
to the ``program.s`` source file (in the Nextion Editor) before the ``page`` line.
This permits faster communication with the Nextion display and it is highly recommended when using :ref:`uart-hardware_uarts`. Without a hardware uart make sure to set the baud rate to 9600.
@ -36,17 +36,9 @@ The below example configures a UART for the Nextion display to use
.. code-block:: yaml
# Example configuration entry
uart:
id: uart_2
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 115200
display:
- platform: nextion
id: nextion1
uart_id: uart_2
lambda: |-
it.set_component_value("gauge", 50);
it.set_component_text("textview", "Hello World!");
@ -73,7 +65,7 @@ Configuration variables:
- **on_wake** (*Optional*, :ref:`Action <config-action>`): An action to be performed when the Nextion wakes up. See :ref:`Nextion Automation <nextion-on_sleep>`.
- **on_page** (*Optional*, :ref:`Action <config-action>`): An action to be performed after a page change. See :ref:`Nextion Automation <nextion-on_page>`.
- **on_touch** (*Optional*, :ref:`Action <config-action>`): An action to be performed after a touch event (press or release). See :ref:`Nextion Automation <nextion-on_touch>`.
.. _display-nextion_lambda:
Rendering Lambda
@ -113,7 +105,7 @@ Lambda Calls
************
Several methods are available for use within :ref:`lambdas <config-lambda>`; these permit advanced functionality beyond simple
display updates. See the full :apiref:`nextion/nextion.h` for more info.
display updates. See the full :apiref:`nextion/nextion.h` for more info.
.. _nextion_upload_tft:
@ -126,7 +118,7 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
services:
- service: update_nextion
then:
- lambda: 'id(nextion1)->upload_tft();'
- lambda: 'id(nextion1)->upload_tft();'
.. _nextion_update_all_components:
@ -178,7 +170,7 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
.. _nextion_queue_types:
Queue Types:
Queue Types:
- SENSOR 0
- BINARY_SENSOR 1
- SWITCH 2
@ -291,7 +283,7 @@ The following arguments will be available:
Uploading A TFT File
--------------------
This will download the file from the tft_url and will transfer it over the UART to the Nextion.
Once completed both the ESP and Nextion will reboot. During the upload process esphome will be
Once completed both the ESP and Nextion will reboot. During the upload process esphome will be
unresponsive and no logging will take place. This uses the same protocol as the Nextion editor and
only updates the changes of the TFT file. If HTTPS/SSL is enabled it will be about 1kB/sec.
@ -304,7 +296,7 @@ To host the TFT file you can use Home Assistant itself or any other web server.
Home Assistant
**************
To host the TFT file from Home Assistant, create a www directory if it doesn't exist in your config
To host the TFT file from Home Assistant, create a www directory if it doesn't exist in your config
directory. You can create a subdirectory for those files as well.
For example if the file is located
@ -321,8 +313,8 @@ The below NGINX example configuration will serve files out of the /var/www/nexti
.. code-block:: nginx
server {
listen 80;
access_log /var/log/nginx/nextion_access.log;
listen 80;
access_log /var/log/nginx/nextion_access.log;
error_log /var/log/nginx/nextion_error.log;
root /var/www/nextion;
}

View File

@ -0,0 +1,186 @@
Quad SPI AMOLED Displays
========================
.. seo::
:description: Instructions for setting up quad SPI AMOLED displays.
:image: t4-s3.jpg
.. _qspi_amoled:
Models
------
This display driver supports AMOLED displays with quad SPI interfaces.
This driver has been tested with the following displays:
- Lilygo T4-S3
- Lilygo T-Display S3 AMOLED
Usage
-----
This component requires an ESP32 and the use of
ESP-IDF. PSRAM is a requirement due to the size of the display buffer. A :ref:`quad SPI bus <spi>` interface must be configured.
.. figure:: images/t4-s3.jpg
:align: center
:width: 75.0%
Lilygo T4-S3
.. figure:: images/t-display-amoled.jpg
:align: center
:width: 75.0%
Lilygo T-Display S3 AMOLED
.. code-block:: yaml
# Example minimal configuration entry
display:
- platform: qspi_amoled
model: RM690B0
data_rate: 80MHz
spi_mode: mode0
dimensions:
width: 450
height: 600
offset_width: 16
color_order: rgb
invert_colors: false
brightness: 255
cs_pin: GPIOXX
reset_pin: GPIOXX
enable_pin: GPIOXX
Configuration variables:
************************
- **model** (**Required**): One of ``RM67162`` or ``RM690B0``.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The chip select pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **enable_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The display enable pin.
- **brightness** (*Optional*, int): A brightness value in the range 0-255
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **auto_clear_enabled** (*Optional*, boolean): Whether to automatically clear the display in each loop (''true'', default),
or to keep the existing display content (must overwrite explicitly, e.g., only on data change).
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **color_order** (*Optional*): Should be one of ``rgb`` (default) or ``bgr``.
- **dimensions** (**Required**): Dimensions of the screen, specified either as *width* **x** *height* (e.g ``320x240``) or with separate config keys.
- **height** (**Required**, int): Specifies height of display in pixels.
- **width** (**Required**, int): Specifies width of display.
- **offset_width** (*Optional*, int): Specify an offset for the x-direction of the display, typically used when a display is smaller than the maximum supported by the driver chip. Default is 0
- **offset_height** (*Optional*, int): Specify an offset for the y-direction of the display. Default is 0.
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ````, ``90°``, ``180°``, or ``270°``.
- **transform** (*Optional*): Transform the display presentation using hardware. All defaults are ``false``. This option cannot be used with ``rotation``.
- **swap_xy** (*Optional*, boolean): If true, exchange the x and y axes.
- **mirror_x** (*Optional*, boolean): If true, mirror the x axis.
- **mirror_y** (*Optional*, boolean): If true, mirror the y axis.
- **data_rate** (*Optional*): Set the data rate of the SPI interface to the display. One of ``80MHz``, ``40MHz``, ``20MHz``, ``10MHz`` (default), ``5MHz``, ``2MHz`` or ``1MHz``.
- **spi_mode** (*Optional*): Set the mode for the SPI interface to the display. Default is ``MODE0``.
- **invert_colors** (*Optional*): With this boolean option you can invert the display colors.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
Example configurations
----------------------
Lilygo T4-S3
************
.. code-block:: yaml
spi:
id: quad_spi
type: quad
clk_pin: 15
data_pins: [14, 10, 16, 12]
i2c:
sda: 6
scl: 7
touchscreen:
- platform: cst226
id: my_touchscreen
interrupt_pin: 8
reset_pin: 17
display:
- platform: qspi_amoled
model: RM690B0
data_rate: 80MHz
spi_mode: mode0
dimensions:
width: 450
height: 600
offset_width: 16
color_order: rgb
invert_colors: false
brightness: 255
cs_pin: 11
reset_pin: 13
enable_pin: 9
update_interval: never
auto_clear_enabled: false
psram:
mode: octal
speed: 80MHz
Lilygo T-Display S3 AMOLED
**************************
.. code-block:: yaml
spi:
id: quad_spi
type: quad
clk_pin: 47
data_pins:
- 18
- 7
- 48
- 5
i2c:
sda: 3
scl: 2
touchscreen:
- platform: cst816
id: my_touchscreen
interrupt_pin:
number: 21
display:
- platform: qspi_amoled
model: RM67162
id: main_lcd
dimensions:
height: 240
width: 536
transform:
mirror_x: true
swap_xy: true
color_order: rgb
brightness: 255
cs_pin: 6
reset_pin: 17
enable_pin: 38
See Also
--------
- :doc:`index`
- :apiref:`qspi_amoled/qspi_amoled.h`
- :ghedit:`Edit`

View File

@ -40,17 +40,13 @@ to an ESP module.
.. code-block:: yaml
# Example minimal configuration entry
spi:
clk_pin: GPIO18
mosi_pin: GPIO19
display:
- platform: st7789v
model: TTGO TDisplay 135x240
backlight_pin: GPIO4
cs_pin: GPIO5
dc_pin: GPIO16
reset_pin: GPIO23
backlight_pin: GPIOXX
cs_pin: GPIOXX
dc_pin: GPIOXX
reset_pin: GPIOXX
lambda: |-
it.print(0, 0, id(font), "Hello World!");
@ -191,7 +187,7 @@ Items marked RQ are hardware dependent but required and not preset. Items marked
- 22
- 23
- 4
-
-
- 18
- 19
* - Custom

View File

@ -22,10 +22,10 @@ The LCD have four signal, ``cs`` for chip select, ``data`` for data signal, ``re
display:
platform: tm1621
id: tm1621_display
cs_pin: GPIO17
data_pin: GPIO5
read_pin: GPIO23
write_pin: GPIO18
cs_pin: GPIOXX
data_pin: GPIOXX
read_pin: GPIOXX
write_pin: GPIOXX
lambda: |-
it.printf(0, "%.1f", id(my_sensor1).state);
it.display_celsius(true);
@ -82,7 +82,7 @@ Also we have five function to display or not some unites:
- °F on the first line : ``display_fahrenheit(bool)``
- %HR on the second line : ``display_humidity(bool)``
- V on the first line and A on the second line : ``display_voltage(bool)``
- kW/h on the first line and W on the second line : ``display_kwh(bool)``
- kW/h on the first line and W on the second line : ``display_kwh(bool)``
See Also
--------

View File

@ -23,9 +23,9 @@ The module can be powered with 5v DC. To display the colon punctuation use the
display:
platform: tm1638
id: tm1638_display
stb_pin: 5
clk_pin: 18
dio_pin: 23
stb_pin: GPIOXX
clk_pin: GPIOXX
dio_pin: GPIOXX
intensity: 5
update_interval: 5s
lambda: |-
@ -113,9 +113,9 @@ The following example creates a typical digital clock with the ``:`` colon flash
display:
platform: tm1638
clk_pin: 18
dio_pin: 23
stb_pin: 5
clk_pin: GPIOXX
dio_pin: GPIOXX
stb_pin: GPIOXX
update_interval: 500ms
lambda: |-
static int i = 0;
@ -132,16 +132,16 @@ The TM1638 7 Segment Display Keypad & LED Module has 8 LED lights across the top
.. code-block:: yaml
switch:
switch:
- platform: tm1638
id: TM1638Led1
led: 0
output:
- platform: tm1638
id: TM1638Led2
led: 1
Buttons
@ -163,7 +163,7 @@ The TM1638 7 Segment Display Keypad & LED Module has 8 buttons across the top or
on_release:
then:
- switch.turn_off: TM1638Led1
- platform: tm1638
name: "TM1638 Button 2"
id: TM1638Button2

View File

@ -23,7 +23,7 @@ single-color E-Ink displays are implemented and of those only a few modules.
Waveshare E-Paper 2.9 Inch E-Paper Display.
The communication ESPHome has chosen to use for this integration is 4-wire :ref:`SPI <spi>`, as it's the most stable
The communication ESPHome has chosen to use for this component is 4-wire :ref:`SPI <spi>`, as it's the most stable
and high-speed. So you need to make sure your board is set to the 4-wire SPI mode and have an ``spi:`` section in your
configuration.
@ -96,6 +96,7 @@ Configuration variables:
- ``2.70in-b`` - Black/White/Red
- ``2.70in-bv2`` - Black/White/Red
- ``2.90in``
- ``2.90in-dke``
- ``2.90inv2``
- ``2.90inv2-r2`` - 2.9in V2 display, but with different initialization and full/partial display refresh management than ``2.90inv2``
- ``2.90in-b`` - B/W rendering only

View File

@ -12,14 +12,14 @@ on graphical displays. This offers the user an interactive method to display
labels, control entities like ``switch``, ``select``, ``number`` available locally on the
ESPHome node, without the requirement of a network connection.
.. figure:: images/graphical_display_menu.jpg
.. figure:: images/graphical_display_menu.png
:align: center
:width: 60.0%
Overview
--------
The integration implements the :ref:`Display Menu <display_menu>` integration providing
The component implements the :ref:`Display Menu <display_menu>` component providing
a hierarchical menu primarily intended to be controlled either by a rotary encoder
with a button or a five-button joystick controller.
@ -34,7 +34,7 @@ engine such as :doc:`E-Paper displays </components/display/waveshare_epaper>` or
display: my_display_component
on_redraw:
then:
component.update: my_dispay_component
component.update: my_display_component
active: false
mode: rotary
items:
@ -194,7 +194,7 @@ The below example is a more complete example showing how you might use a rotary
display: my_display_component
on_redraw:
then:
component.update: my_dispay_component
component.update: my_display_component
active: false
mode: rotary
items:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -7,7 +7,7 @@ Display Menu
.. _display_menu:
The integration provides a menu primarily intended to be controlled either by a rotary encoder
The component provides a menu primarily intended to be controlled either by a rotary encoder
with a button or a five-button joystick controller. It allows to navigate a hierarchy of items
and submenus with the ability to change the values and execute commands. The menu can
be activated and deactivated on demand, allowing alternating between using the screen for
@ -17,8 +17,8 @@ Overview
--------
This document describes the configuration and automations common for the components implementing
this integration. At the moment the character based LCD displays are supported using
the :ref:`lcd_menu <lcd_menu>` integration and an instance of this is used in the configuration
this component. At the moment the character based LCD displays are supported using
the :ref:`lcd_menu <lcd_menu>` component and an instance of this is used in the configuration
examples.

View File

@ -19,7 +19,7 @@ ESPHome node, without the requirement of a network connection.
Overview
--------
The integration implements the :ref:`Display Menu <display_menu>` integration providing
The component implements the :ref:`Display Menu <display_menu>` component providing
a hierarchical menu primarily intended to be controlled either by a rotary encoder
with a button or a five-button joystick controller.

View File

@ -14,16 +14,16 @@ directly integrate into Home Assistant through the native API.
esp32_camera:
name: My Camera
external_clock:
pin: GPIO27
pin: GPIOXX
frequency: 20MHz
i2c_pins:
sda: GPIO25
scl: GPIO23
data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
vsync_pin: GPIO22
href_pin: GPIO26
pixel_clock_pin: GPIO21
reset_pin: GPIO15
sda: GPIOXX
scl: GPIOXX
data_pins: [GPIOXX, GPIOXX, GPIOXX, GPIOXX, GPIOXX, GPIOXX, GPIOXX, GPIOXX]
vsync_pin: GPIOXX
href_pin: GPIOXX
pixel_clock_pin: GPIOXX
reset_pin: GPIOXX
resolution: 640x480
jpeg_quality: 10
@ -37,10 +37,10 @@ Configuration variables:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
Connection Options:
@ -179,7 +179,7 @@ Configuration for Ai-Thinker Camera
.. warning::
GPIO16 on this board (and possibly other boards below) is connected to onboard PSRAM.
GPIO16 on this board (and possibly other boards below) is connected to onboard PSRAM.
Using this GPIO for other purposes (eg as a button) will trigger the watchdog.
Further information on pin notes can be found here: https://github.com/raphaelbs/esp32-cam-ai-thinker/blob/master/docs/esp32cam-pin-notes.md

View File

@ -17,8 +17,8 @@ This component and the Wi-Fi component may **not** be used simultaneously, even
# Example configuration entry for RMII chips
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
mdc_pin: GPIOXX
mdio_pin: GPIOXX
clk_mode: GPIO0_IN
phy_addr: 0
@ -33,12 +33,12 @@ This component and the Wi-Fi component may **not** be used simultaneously, even
# Example configuration entry for SPI chips
ethernet:
type: W5500
clk_pin: GPIO19
mosi_pin: GPIO21
miso_pin: GPIO23
cs_pin: GPIO18
interrupt_pin: GPIO36
reset_pin: GPIO22
clk_pin: GPIOXX
mosi_pin: GPIOXX
miso_pin: GPIOXX
cs_pin: GPIOXX
interrupt_pin: GPIOXX
reset_pin: GPIOXX
Configuration variables:
------------------------
@ -264,7 +264,7 @@ Configuration examples
clk_mode: GPIO17_OUT
phy_addr: 1
**LILYGO T-ETH-Lite**:
**LILYGO T-ETH-Lite ESP32**:
.. code-block:: yaml

147
components/event/index.rst Normal file
View File

@ -0,0 +1,147 @@
Event Component
===============
.. seo::
:description: Instructions for setting up event components in ESPHome.
:image: folder-open.svg
ESPHome supports the creation of event entities in Home Assistant.
These entities allow for the triggering of custom events within the Home Assistant ecosystem,
enabling complex automations and integrations. An event entity is represented as a stateless
entity associated with a device that has a pre-defined set of event types which can be
triggered in Home Assistant via automations.
.. note::
Events in ESPHome are designed to trigger an action in Home Assistant, and have a unidirectional flow from ESPHome to Home Assistant.
Home Assistant event entities are different from events on event bus. If you just want to trigger an event on the
Home Assistant event bus, you should use a :ref:`Home Assistant event <api-homeassistant_event_action>` instead.
.. note::
Home Assistant Core 2024.5 or higher is required for ESPHome event entities to work.
.. _config-event:
Base Event Configuration
------------------------
Each event in ESPHome needs to be configured with a list of event types it can trigger and an optional device class.
.. code-block:: yaml
# Example event configuration
event:
- platform: ...
name: Motion Detected Event
id: my_event
# Optional variables:
icon: "mdi:motion-sensor"
device_class: "motion"
on_event:
then:
- logger.log: "Event triggered"
Configuration variables:
One of ``id`` or ``name`` is required.
- **id** (**Required**, :ref:`config-id`): Manually specify the ID used for code generation, allowing for further customization or interaction with this event within ESPHome scripts or lambda functions.
- **name** (**Required**, string): The name for the event.
.. note::
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
you want the event to use that name, you can set ``name: None``.
- **icon** (*Optional*, icon): Manually set the icon to use for the event in the frontend.
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Set to ``""`` to remove the default entity category.
- **device_class** (*Optional*, string): The device class for the event. The following device classes are supported by event entities:
- None: Generic event. This is the default and doesn't need to be set.
- ``button``: For remote control buttons.
- ``doorbell``: Specifically for buttons that are used as a doorbell.
- ``motion``: For motion events detected by a motion sensor.
See https://www.home-assistant.io/integrations/event/#device-class
for a list of available options.
Automations:
- **on_event** (*Optional*, :ref:`Automation <automation>`): An automation to perform when an event is triggered.
MQTT options:
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
Event Automation
----------------
.. _event-on_event:
``on_event``
************
This automation will be triggered when an event of the specified types is triggered.
.. code-block:: yaml
event:
- platform: template
# ...
on_event:
then:
- logger.log: "Event Triggered"
Configuration variables: see :ref:`Automation <automation>`.
``event.trigger`` Action
************************
This action allows for the triggering of an event from within an automation.
.. code-block:: yaml
- event.trigger:
id: my_event
event_type: "custom_event"
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the event.
- **event_type** (**Required**, string): The type of event to trigger.
.. _event-lambda_calls:
lambda Calls
************
From :ref:`lambdas <config-lambda>`, you can trigger an event.
- ``trigger(std::string event_type)``: Trigger an event with the specified type.
.. code-block:: cpp
// Within lambda, trigger the event.
id(my_event).trigger("custom_event");
See Also
--------
- :apiref:`event/event.h`
- :ghedit:`Edit`
.. toctree::
:maxdepth: 1
:glob:
*

View File

@ -0,0 +1,31 @@
Template Event
==============
.. seo::
:description: Instructions for setting up template events that can trigger arbitrary automations when an event occurs.
:image: description.svg
The ``template`` event platform enables you to define events that trigger specific automations or actions within Home Assistant. These custom events can be utilized to orchestrate complex behaviors across your smart home ecosystem based on conditions or sequences defined in your ESPHome configuration.
.. code-block:: yaml
# Example configuration entry
event:
- platform: template
name: "Template Event"
event_types:
- "custom_event_1"
- "custom_event_2"
Configuration variables:
------------------------
- **event_types** (**Required**, list): A list of custom event identifiers that this template event is capable of triggering. These identifiers can be used in Home Assistant automations or ESPHome scripts to perform actions when the event occurs.
- All other options from :ref:`Event <config-event>`.
See Also
--------
- :doc:`/guides/automations`
- :doc:`/components/event/index`
- :ghedit:`Edit`

View File

@ -52,7 +52,7 @@ minute, the indicator will be on.
switch:
- platform: gpio
pin: GPIO22
pin: GPIOXX
id: led
script:

View File

@ -46,6 +46,7 @@ Configuration variables:
- **ref** (*Optional*, string): Git ref (branch or tag). If not specified the default branch is used.
- **username** (*Optional*, string): Username for the Git server, if one is required
- **password** (*Optional*, string): Password for the Git server, if one is required
- **path** (*Optional*, string): Path inside the repo, if different from ``components`` or ``esphome/components``
local options:

View File

@ -14,18 +14,13 @@ The ``binary`` fan platform lets you represent any binary :ref:`output` as a fan
.. code-block:: yaml
# Example configuration entry
output:
- id: fan_output
platform: gpio
pin: GPIO16
fan:
- platform: binary
output: fan_output
name: "Living Room Fan"
Configuration variables:
------------------------

View File

@ -23,14 +23,6 @@ The ``hbridge`` fan platform allows you to use a compatible *h-bridge* (L298N, D
.. code-block:: yaml
# Example configuration entry
output:
- platform: ...
id: motor_forward_pin
pin: GPIO5
- platform: ...
id: motor_reverse_pin
pin: GPIO4
fan:
- platform: hbridge
id: my_fan

View File

@ -49,10 +49,10 @@ Configuration variables:
a ``name`` will implicitly set this to true.
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.
for a list of available options.
Set to ``""`` to remove the default entity category.
MQTT options:

View File

@ -2,7 +2,7 @@ Grow Fingerprint Reader
=======================
.. seo::
:description: Instructions for setting up Grow Fingerprint Reader integration in ESPHome.
:description: Instructions for setting up Grow Fingerprint Reader component in ESPHome.
:image: fingerprint.svg
The ``fingerprint_grow`` component allows you to use your R307, R503, R503-RGB, ZFM-20, ... fingerprint sensors with ESPHome.
@ -30,16 +30,10 @@ If available on your reader model, it's recommended to connect 3.3VT (touch indu
.. code-block:: yaml
# Example configuration entry
uart:
rx_pin: GPIO13
tx_pin: GPIO15
baud_rate: 57600
# Declare Grow Fingerprint Reader
fingerprint_grow:
sensing_pin: GPIO12
sensing_pin: GPIOXX
sensor_power_pin:
number: GPIO18
number: GPIOXX
inverted: true
idle_period_to_sleep: 5s
@ -93,46 +87,27 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Optional Sensor Configuration:
Sensor
------
- **fingerprint_count**: The number of enrolled fingerprints stored on the reader.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **last_finger_id**: The last matched enrolled fingerprint as set by :ref:`fingerprint_grow-on_finger_scan_matched`.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **last_confidence**: The last matched confidence as set by :ref:`fingerprint_grow-on_finger_scan_matched`.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **status**: The integer representation of the internal status register of the reader.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **capacity**: The fingerprint storage capacity of the reader.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **security_level**: The integer representation of the currently configured security level of the reader. Higher security levels reduce the false acceptance rate (FAR) at the expense of increasing the false rejection rate (FRR). Range is 1 (lowest) to 5 (highest).
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
.. _fingerprint_grow-sleep_mode:
@ -150,14 +125,14 @@ This is a wiring example for the R503 and below you can find the respective conf
.. code-block:: yaml
uart:
rx_pin: GPIO16
tx_pin: GPIO17
rx_pin: GPIOXX
tx_pin: GPIOXX
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO4
sensing_pin: GPIOXX
sensor_power_pin:
number: GPIO18
number: GPIOXX
inverted: true
idle_period_to_sleep: 5s
@ -191,7 +166,7 @@ The ``new_password:`` configuration option is meant to be compiled, flashed to t
``on_finger_scan_start`` Trigger
------------------------------------
With this configuration option, you can trigger an automation when a finger is detected touching the sensor. Very useful to indicate to the user via AuraLed that the sensor has detected the finger touch and will perform the scan. This trigger will **only** activate if your fingerprint sensor is configured with the ``sensing_pin`` option.
With this configuration option, you can trigger an automation when a finger is detected touching the sensor. Very useful to indicate to the user via AuraLed that the sensor has detected the finger touch and will perform the scan. This trigger will **only** activate if your fingerprint sensor is configured with the ``sensing_pin`` option.
.. code-block:: yaml
@ -513,12 +488,12 @@ Sample code
.. code-block:: yaml
uart:
rx_pin: GPIO13
tx_pin: GPIO15
rx_pin: GPIOXX
tx_pin: GPIOXX
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO12
sensing_pin: GPIOXX
on_finger_scan_invalid:
- homeassistant.event:
event: esphome.test_node_finger_scan_invalid

View File

@ -2,7 +2,7 @@ GPS Component
=============
.. seo::
:description: Instructions for setting up GPS integration in ESPHome.
:description: Instructions for setting up GPS component in ESPHome.
:image: crosshairs-gps.svg
The ``gps`` component allows you to connect GPS modules to your ESPHome project.
@ -16,15 +16,12 @@ Any GPS module that uses the standardized NMEA communication protocol will work.
.. _Adafruit: https://www.adafruit.com/product/746
For this integration to work you need to have set up a :ref:`UART bus <uart>`
For this component to work you need to have set up a :ref:`UART bus <uart>`
in your configuration - only the RX pin should be necessary.
.. code-block:: yaml
# Example configuration entry
uart:
rx_pin: D7
baud_rate: 9600
# Declare GPS module
gps:

View File

@ -20,8 +20,8 @@ connecting the wires from each device back to the two I²C pins on the ESP.
# Example configuration entry for ESP32
i2c:
sda: 21
scl: 22
sda: GPIOXX
scl: GPIOXX
scan: true
id: bus_a
@ -37,6 +37,9 @@ Configuration variables:
Defaults to ``true``.
- **frequency** (*Optional*, float): Set the frequency the I²C bus should operate on.
Defaults to ``50kHz``. Values are ``10kHz``, ``50kHz``, ``100kHz``, ``200kHz``, ... ``800kHz``
- **timeout** (*Optional*, :ref:`config-time`): Set the I²C bus timeout.
Defaults to the framework defaults (``100us`` on ``esp32`` with ``esp-idf``, ``50ms`` on ``esp32`` with ``Arduino``,
``1s`` on ``esp8266`` and ``1s`` on ``rp2040``). Maximum on ``esp-idf`` is 13ms.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this I²C bus if you need multiple I²C buses.
.. note::
@ -48,12 +51,12 @@ Configuration variables:
# Example configuration entry
i2c:
- id: bus_a
sda: 13
scl: 16
sda: GPIOXX
scl: GPIOXX
scan: true
- id: bus_b
sda: 14
scl: 15
sda: GPIOXX
scl: GPIOXX
scan: true
# Sensors should be specified as follows
- platform: bme680

View File

@ -14,8 +14,8 @@ This component only works on ESP32 based chips.
# Example configuration entry
i2s_audio:
i2s_lrclk_pin: GPIO33
i2s_bclk_pin: GPIO19
i2s_lrclk_pin: GPIOXX
i2s_bclk_pin: GPIOXX
Configuration variables:
------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 KiB

After

Width:  |  Height:  |  Size: 727 KiB

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