Merge branch 'next' into subsitutions-for-more-types

This commit is contained in:
H. Árkosi Róbert 2024-05-05 05:24:00 +02:00 committed by GitHub
commit 13711bfaa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
262 changed files with 6025 additions and 3373 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,24 @@ 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
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.1
# 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.1
.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

@ -1 +1 @@
2024.3.0-dev
2024.4.1

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

@ -53,6 +53,28 @@ with the time period you were using for the update interval (the default is 60s)
sensor. The example in the sensor doc page has been updated to show this.
Release 2024.2.1 - February 26
------------------------------
- Add missing timeout to "async_request" :esphomepr:`6267` by :ghuser:`jesserockz`
- Bump zeroconf timeout to 3000 :esphomepr:`6270` by :ghuser:`jesserockz`
- web_server: Add a position property for cover entities that have the supports position trait :esphomepr:`6269` by :ghuser:`DanielBaulig`
- allow multiple emc2101 :esphomepr:`6272` by :ghuser:`ssieb`
- Fix RP2040 SPI pin validation :esphomepr:`6277` by :ghuser:`kbx81`
- dashboard: move storage json update to a background task in edit save :esphomepr:`6280` by :ghuser:`bdraco`
- make output optional for speed fan :esphomepr:`6274` by :ghuser:`ssieb`
- 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`

222
changelog/2024.4.0.rst Normal file
View File

@ -0,0 +1,222 @@
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`
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

194
components/at581x.rst Normal file
View File

@ -0,0 +1,194 @@
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
binary_sensor:
- platform: gpio
pin: GPIO21
name: "Radar motion"
switch:
# Switch to turn on/off RF emission
- platform: at581x
at581x_id: "Radar"
name: "Enable Radar"
.. _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: GPIO21
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,10 +30,15 @@ The ``ble_presence`` binary sensor platform lets you track the presence of a Blu
mac_address: AC:37:43:77:5F:4C
name: "ESP32 BLE Tracker Google Home Mini"
min_rssi: -80dB
# Presence based on Identity Resolving Key (IRK)
- platform: ble_presence
irk: 1234567890abcdef1234567890abcdef
name: "ESP32 BLE Tracker iPhone"
# Presence based on BLE Service UUID
- platform: ble_presence
service_uuid: '11aa'
name: "ESP32 BLE Tracker Test Service 16 bit"
timeout: 45s
# Presence based on iBeacon UUID
- platform: ble_presence
ibeacon_uuid: '68586f1e-89c2-11eb-8dcd-0242ac130003'
@ -51,14 +56,17 @@ Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
binary sensor. Note that exactly one of ``mac_address``, ``service_uuid`` or ``ibeacon_uuid``
binary sensor. Note that exactly one of ``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid``
must be present.
- **irk** (*Optional*, 16 byte hex string): The Identity Resolving Key (IRK) to track for this
binary sensor. Note that exactly one of ``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid``
must be present.
- **service_uuid** (*Optional*, string): 16 bit, 32 bit, or 128 bit BLE Service UUID
which can be tracked if the device randomizes the MAC address. Note that exactly one of
``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
``mac_address``, ``irk``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
- **ibeacon_uuid** (*Optional*, string): The `universally unique identifier <https://en.wikipedia.org/wiki/Universally_unique_identifier>`__
to identify the beacon that needs to be tracked. Note that exactly one of ``mac_address``,
``service_uuid`` or ``ibeacon_uuid`` must be present.
``irk``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
- **ibeacon_major** (*Optional*, int): The iBeacon major identifier of the beacon that needs
to be tracked. Usually used to group beacons, for example for grouping all beacons in the
same building.
@ -67,6 +75,8 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify
the ID used for code generation.
- **min_rssi** (*Optional*, int): at which minimum RSSI level would the component report the device be present.
- **timeout** (*Optional*, :ref:`config-time`): The delay after last detecting the device before publishing not present state.
The default is 5 minutes.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
.. _esp32_ble_tracker-setting_up_devices:
@ -105,8 +115,15 @@ iBeacon major and minor identifiers, BLE manufacturer data, RSSI and other data
debugging purposes. Note that this is useful only during set-up and a less verbose log level
should be specified afterwards.
Please note that devices that show a ``RANDOM`` address type in the logs cannot be used for
MAC address based tracking, since their MAC-address periodically changes. Instead you can:
Please note that devices that show a ``RANDOM`` address type in the logs probably use a privacy
feature called Resolvable Private Addresses to avoid BLE tracking. Since their MAC-address periodically
changes, they can't be tracked by the MAC address. However, if you know the devices "Identity Resolving
Key" (IRK), you can check if the generated private MAC address belongs to the device with the IRK.
There is no support to obtain the key with ESPHome. For now you will have to use one of the options
described in the ESPresense project: https://espresense.com/beacons
Alternatively you can:
- Create a BLE beacon, set a unique 16 bit, 32 bit or 128 bit Service UUID and track your device
based on that. Make sure you don't pick a `GATT Service UUID

View File

@ -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: GPIO4
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

@ -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>`.

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

@ -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

@ -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`` | |
@ -42,7 +46,7 @@ submit a feature request (see FAQ).
+---------------------------------------+---------------------+----------------------+
| Midea | ``midea_ir`` | yes |
+---------------------------------------+---------------------+----------------------+
| Mitsubishi | ``mitsubishi`` | |
| :ref:`Mitsubishi<mitsubishi>` | ``mitsubishi`` | yes |
+---------------------------------------+---------------------+----------------------+
| Noblex | ``noblex`` | yes |
+---------------------------------------+---------------------+----------------------+
@ -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
@ -253,6 +272,48 @@ Known working with:
- Delonghi PAC WE 120HP
.. _mitsubishi:
``mitsubishi`` Climate
------------------------
Additonal configurations available for this platform.
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``.
- ``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]
- **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``.
- 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``.
- Options are: ``down``, ``middle-down``, ``middle``, ``middle-up``, ``up``, ``auto``
.. note::
- This climate IR component is also known to work with some Stiebel Eltron Units. It has been tested with Stiebel Eltron IR-Remote ``KM07F`` and unit ``ACW 25 i``
.. code-block:: yaml
# Example configuration entry
climate:
- platform: mitsubishi
name: "Heatpump"
set_fan_mode: "quiet_4levels"
supports_dry: "true"
supports_fan_only: "true"
horizontal_default: "left"
vertical_default: "down"
.. _toshiba:
@ -284,7 +345,7 @@ Configuration variables:
``update_interval`` must be less than seven minutes or the ``RAC-PT1411HWRU`` will revert to using its own
internal temperature sensor; a value of 30 seconds seems to work well. See :doc:`/components/sensor/index`
for more information.
- This climate IR component is also known to work with Midea model MAP14HS1TBL and may work with other similar
models, as well. (Midea acquired Toshiba's product line and re-branded it.)

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

@ -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>`.

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

@ -0,0 +1,327 @@
Datetime Component
==================
.. seo::
:description: Instructions for setting up datetime components in ESPHome.
:image: folder-open.svg
ESPHome has support for components to create a datetime entity. A datetime entity
currently represents a date that can be set by the user/frontend.
.. note::
Requires Home Assistant 2024.4 or newer.
.. _config-datetime:
Base Datetime Configuration
---------------------------
All datetime in ESPHome have a name and an optional icon.
.. code-block:: yaml
# Example datetime configuration
name: Date to check
# Optional variables:
icon: "mdi:calendar-alert"
Configuration variables:
- **name** (**Required**, string): The name for the datetime.
.. note::
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
you want the datetime to use that name, you can set ``name: None``.
- **icon** (*Optional*, icon): Manually set the icon to use for the datetime 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).
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.
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>`.
Time and DateTime Options:
- **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:
``on_value``
************
This automation will be triggered when a new value is published. In :ref:`Lambdas <config-lambda>`
you can get the value as a ESPTime object from the trigger with ``x``.
.. code-block:: yaml
datetime:
- platform: template
# ...
on_value:
then:
- lambda: |-
if(x.hour >= 12) {
ESP_LOGD("main", "Updated hour is later or equal to 12");
} else {
ESP_LOGD("main", "Updated hour is earlier than 12");
}
Configuration variables: See :ref:`Automation <automation>`.
Date Automation
---------------
.. _datetime-date_set_action:
``datetime.date.set`` Action
****************************
This is an :ref:`Action <config-action>` for setting a datetime date state.
The ``date`` provided can be in one of 3 formats:
.. code-block:: yaml
# String date
- datetime.date.set:
id: my_date
date: "2023-12-04"
# Individual date parts
- datetime.date.set:
id: my_date
date:
year: 2023
month: 12
day: 4
# Using a lambda
- datetime.date.set:
id: my_date
date: !lambda |-
// Return an ESPTime struct
return {.day_of_month: 4, .month: 12, .year: 2023};
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the datetime to set.
- **date** (**Required**, string, date parts, :ref:`templatable <config-templatable>`):
The value to set the datetime to.
.. _datetime-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 date to 2024-02-25
auto call = id(my_date).make_call();
call.set_date("2024-02-25");
call.perform();
Check the API reference for information on the methods that are available for
the ``DateCall`` object.
- ``.year``: Retrieve the current year of the ``date``. It will be ``0`` if no value has been set.
- ``.month``: Retrieve the current month of the ``date``. It will be ``0`` if no value has been set.
- ``.day``: Retrieve the current day of the ``date``. 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", 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::
:maxdepth: 1
:glob:
*

View File

@ -0,0 +1,106 @@
Template Datetime
=================
.. seo::
:description: Instructions for setting up template datetime with ESPHome.
:image: description.svg
The ``template`` datetime platform allows you to create a datetime with templated values
using :ref:`lambdas <config-lambda>`.
.. code-block:: yaml
datetime:
# Example Date
- platform: template
id: my_date
type: date
name: Pick a Date
optimistic: yes
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 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
be performed when the remote (like Home Assistant's frontend) requests to set the
dateime value. The new value is available to lambdas in the ``x`` variable.
- **update_interval** (*Optional*, :ref:`config-time`): The interval on which to update the datetime
by executing the ``lambda``. Defaults to ``60s``.
- **optimistic** (*Optional*, boolean): Whether to operate in optimistic mode - when in this mode,
any command sent to the template datetime will immediately update the reported state.
Cannot be used with ``lambda``. Defaults to ``false``.
- **restore_value** (*Optional*, boolean): Saves and loads the state to RTC/Flash.
Cannot be used with ``lambda``. Defaults to ``false``.
- **initial_value** (*Optional*, string): The value to set the state to on setup if not
restored with ``restore_value``. Can be one of:
- For ``type: date``:
- A string in the format ``%Y-%m-%d`` , eg: ``"2023-12-04"``.
- An object including ``year``, ``month``, ``day``.
.. 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>`.
See Also
--------
- :ref:`automation`
- :apiref:`template/datetime/template_date.h`
- :ghedit:`Edit`

View File

@ -21,7 +21,9 @@ to wake up on any RTC pin (``GPIO0``, ``GPIO2``, ``GPIO4``, ``GPIO12``, ``GPIO13
``GPIO15``, ``GPIO25``, ``GPIO26``, ``GPIO27``, ``GPIO32``, ``GPIO39``).
While in deep sleep mode, the node will not do any work and not respond to any network traffic,
even Over The Air updates.
even Over The Air updates. If the device's entities are appearing as **Unavailable** while your device is actively
sleeping, this component was likely added after the device was added to Home Assistant. To prevent this behavior,
you can remove and re-add the device in Home Assistant.
.. code-block:: yaml
@ -32,8 +34,8 @@ even Over The Air updates.
.. note::
Some ESP8266s have an onboard USB chip (e.g. D1 mini) on the chips' control line that is connected to the RST pin. This enables the flasher to reboot the ESP when required. This may interfere with deep sleep on some devices and prevent the ESP from waking when it's powered through its USB connector. Powering the ESP from a separate 3.3V source connected to the 3.3V pin and GND will solve this issue. In these cases, using a USB to TTL adapter will allow you to log ESP activity.
Some ESP8266s have an onboard USB chip (e.g. D1 mini) on the chips' control line that is connected to the RST pin. This enables the flasher to reboot the ESP when required. This may interfere with deep sleep on some devices and prevent the ESP from waking when it's powered through its USB connector. Powering the ESP from a separate 3.3V source connected to the 3.3V pin and GND will solve this issue. In these cases, using a USB to TTL adapter will allow you to log ESP activity.
Configuration variables:
------------------------
@ -85,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

@ -0,0 +1,160 @@
.. _display-fonts:
Font Renderer Component
=======================
.. seo::
: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.
These fonts can be used in ESPHome's :ref:`own rendering engine <display-engine>`.
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:
.. code-block:: yaml
# Various ways to configure fonts
font:
- file: "fonts/Comic Sans MS.ttf"
id: my_font
size: 20
bpp: 2
- file: "fonts/tom-thumb.bdf"
id: tomthumb
# gfonts://family[@weight]
- file: "gfonts://Roboto"
id: roboto_20
size: 20
- file:
type: gfonts
family: Roboto
weight: 900
id: roboto_16
size: 16
- file: "gfonts://Material+Symbols+Outlined"
id: icons_50
size: 50
glyphs: ["\U0000e425"] # mdi-timer
- file: "fonts/RobotoCondensed-Regular.ttf"
id: roboto_special_28
size: 28
bpp: 4
glyphs: [
a,A,á,Á,e,E,é,É,
(,),+,-,_,.,°,•,µ,
"\u0020", #space
"\u0021", #!
"\u0022", #"
"\u0027", #'
]
- file: "fonts/RobotoCondensed-Regular.ttf"
id: my_font_with_icons
size: 20
bpp: 4
extras:
- file: "fonts/materialdesignicons-webfont.ttf"
glyphs: [
"\U000F02D1", # mdi-heart
"\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:
# ...
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``, ``gfonts`` or ``web``.
**Local Fonts**:
- **path** (**Required**, string): The path (relative to where the .yaml file is) of the OpenType/TrueType or bitmap font file.
**Google Fonts**:
Each Google Font will be downloaded once and cached for future use. This can also be used to download Material
Symbols or Icons as in the example above.
- **family** (**Required**, string): The name of the Google Font family.
- **italic** (*Optional*, boolean): Whether the font should be italic.
- **weight** (*Optional*, enum): The weight of the font. Can be either the text name or the integer value:
- **thin**: 100
- **extra-light**: 200
- **light**: 300
- **regular**: 400 (**default**)
- **medium**: 500
- **semi-bold**: 600
- **bold**: 700
- **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!).
If you want to use the same font in different sizes, create two font objects. Note: *size* is ignored
by bitmap fonts. Defaults to ``20``.
- **bpp** (*Optional*, int): The bit depth of the rendered font from OpenType/TrueType, for anti-aliasing. Can be ``1``, ``2``, ``4``, ``8``. Defaults to ``1``.
- **glyphs** (*Optional*, list): A list of characters you plan to use. Only the characters you specify
here will be compiled into the binary. Adjust this if you need some special characters or want to
reduce the size of the binary if you don't plan to use some glyphs. You can also specify glyphs by their codepoint (see below). Defaults to ``!"%()+=,-_.:°/?0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz``.
- **extras** (*Optional*, enum): A list of font glyph configurations you'd like to include within this font, from other OpenType/TrueType files (eg. icons from other font, but at the same size as the main font):
- **file** (**Required**, string): The path of the font file with the extra glyphs.
- **glyphs** (**Required**, list): A list of glyphs you want to include. Can't repeat the same glyph codepoint if it was declared in the level above.
.. 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.
- 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``.
Many font sizes with multiple glyphs at high bit depths will increase the binary size considerably. Make your choices carefully.
.. note::
To use fonts you will need to have the python ``pillow`` package installed, as ESPHome uses that package
to translate the OpenType/TrueType and bitmap font files into an internal format. If you're running this as a Home Assistant add-on or with the official ESPHome docker image, it should already be installed. Otherwise you need
to install it using ``pip install "pillow==10.2.0"``.
See Also
--------
- :apiref:`display/display_buffer.h`
- :ref:`display-engine`
- `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

@ -10,6 +10,7 @@ ILI9xxx TFT LCD Series
Models
------
With this display driver you can control the following displays:
- GC9A01A
- ILI9341
- ILI9342
- ILI9481
@ -69,6 +70,7 @@ Configuration variables:
- ``ILI9341``, ``ILI9342``, ``ILI9486``, ``ILI9488``, ``ILI9488_A`` (alternative gamma configuration for ILI9488)
- ``ILI9481``, ``ILI9481-18`` (18 bit mode)
- ``ST7789V``, ``ST7796``
- ``GC9A01A``
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
@ -94,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``.
@ -105,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
**********************
@ -130,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.

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.

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.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -9,10 +9,10 @@ The ``display`` component houses ESPHome's powerful rendering and display
engine. Fundamentally, there are these types of displays:
- Text based displays like :doc:`7-Segment displays <max7219>` or
:doc:`some LCD displays <lcd_display>`.
- Displays like the :doc:`nextion` that have their own processors for rendering.
- Binary displays which can toggle ON/OFF any pixel, like :doc:`E-Paper displays <waveshare_epaper>` or
:doc:`OLED displays <ssd1306>`.
:doc:`LCD displays <lcd_display>`.
- Graphical serial displays like :doc:`nextion` that have their own processors for rendering.
- Graphical binary displays which can toggle ON/OFF any pixel, like :doc:`E-Paper <waveshare_epaper>`,
:doc:`OLED <ssd1306>` or :doc:`TFT <ili9xxx>` displays.
For the last type, ESPHome has a powerful rendering engine that can do
many things like draw some basic shapes, print text with any font you want, or even show images.
@ -24,11 +24,6 @@ using an API that is designed to
- be simple and to be used without programming experience
- but also be flexible enough to work with more complex tasks like displaying an analog clock.
.. note::
Display hardware is complex and sometimes doesn't behave as expected. If you're having trouble with your display,
please see :ref:`troubleshooting` below.
.. _display-engine:
Display Rendering Engine
@ -38,6 +33,11 @@ In this section we will be discussing how to use ESPHome's display rendering eng
and some basic commands. Please note that this only applies to displays that can control each pixel
individually.
.. note::
Display hardware is complex and sometimes doesn't behave as expected. If you're having trouble with your display,
please see :ref:`troubleshooting` below.
So, first a few basics: When setting up a display platform in ESPHome there will be a configuration
option called ``lambda:`` which will be called every time ESPHome wants to re-render the display.
In each cycle, the display is automatically cleared before the lambda is executed. You can disable
@ -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:
@ -72,10 +75,12 @@ x always represents the horizontal axis (width) and y the vertical axis (height)
the rendering engine is always first specify the ``x`` coordinate and then the ``y`` coordinate.
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,113 +163,19 @@ 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.
.. _display-fonts:
Fonts
*****
The rendering engine also has a powerful font drawer which integrates seamlessly into ESPHome.
Whereas in most Arduino display projects you have to use one of a few pre-defined fonts in very
specific sizes, with ESPHome you have the option to use **any** TrueType (``.ttf``) 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! Granted the reason for it is
actually not having to worry about the licensing of font files :)
To use fonts you first have to define a font object in your ESPHome configuration file. Just grab
a ``.ttf``, ``.pcf``, or ``.bdf`` file from somewhere on the internet and place it, for example,
inside a ``fonts`` folder next to your configuration file.
Next, create a ``font:`` section in your configuration:
.. code-block:: yaml
font:
- file: "fonts/Comic Sans MS.ttf"
id: my_font
size: 20
# gfonts://family[@weight]
- file: "gfonts://Roboto"
id: roboto
size: 20
- file:
type: gfonts
family: Roboto
weight: 900
id: font2
size: 16
- file: "fonts/tom-thumb.bdf"
id: tomthumb
- file: 'gfonts://Material+Symbols+Outlined'
id: icon_font_50
size: 50
glyphs: ["\U0000e425"] # mdi-timer
display:
# ...
Configuration variables:
- **file** (**Required**): The path (relative to where the .yaml file is) of the font
file. You can use the ``gfonts://`` short form to use Google Fonts, or use the below structure:
- **type** (**Required**, string): Can be ``gfonts`` or ``local``.
**Google Fonts**:
Each Google Font will be downloaded once and cached for future use. This can also be used to download Material
Symbols or Icons as in the example above.
- **family** (**Required**, string): The name of the Google Font family.
- **weight** (*Optional*, enum): The weight of the font. Can be either the text name or the integer value:
- **thin**: 100
- **extra-light**: 200
- **light**: 300
- **regular**: 400 (**default**)
- **medium**: 500
- **semi-bold**: 600
- **bold**: 700
- **extra-bold**: 800
- **black**: 900
- **italic** (*Optional*, boolean): Whether the font should be italic.
**Local Fonts**:
- **path** (**Required**, string): The path (relative to where the .yaml file is) 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!).
If you want to use the same font in different sizes, create two font objects. Note: *size* is ignored
by bitmap fonts. Defaults to ``20``.
- **glyphs** (*Optional*, list): A list of characters you plan to use. Only the characters you specify
here will be compiled into the binary. Adjust this if you need some special characters or want to
reduce the size of the binary if you don't plan to use some glyphs. The items in the list can also
be more than one character long if you for example want to use font ligatures. Defaults to
``!"%()+=,-_.:°/?0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz``.
.. note::
To use fonts you will need to have the python ``pillow`` package installed, as ESPHome uses that package
to translate the TrueType and bitmap font files into an internal format. If you're running this as a Home Assistant
add-on or with the official ESPHome docker image, it should already be installed. Otherwise you need
to install it using
``pip install "pillow==10.1.0"``.
.. _display-static_text:
Drawing Static Text
*******************
-------------------
In your display code, you can render static text by referencing the font and just entering your string:
To be able to display text, you need to prepare some fonts. ESPHome's :ref:`font renderer <display-fonts>` allows you to use OpenType/TrueType/Bitmap fonts for your texts. This is very flexiblle because you can prepare various sets of fonts at different sizes with a different number of glyphs which is extremely convenient when we're talking about flash space.
In your display code, you can render static text by referencing the font and just entering your string enclosed in double quotes:
.. code-block:: yaml
@ -303,11 +216,25 @@ As with basic shapes, you can also specify a color for the text:
// Syntax is always: it.print(<x>, <y>, <font>, [color=COLOR_ON], [align=TextAlign::TOP_LEFT], <text>);
it.print(0, 0, id(my_font), COLOR_ON, "Left aligned");
In case of fonts rendered at higher bit depths, the background color has to be specified after the text in order for antialiasing to work:
.. code-block:: yaml
display:
- platform: ...
# ...
lambda: |-
// 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
**************
--------------
Static text by itself is not too impressive. What we really want is to display *dynamic* content like sensor values
on the display!. That's where ``printf`` comes in. ``printf`` is a formatting engine from the C era and ESPHome
@ -357,7 +284,7 @@ Another interesting format string is ``%7.2f``, which would become the right-jus
- ``.2`` - round the decimal number to ``2`` digits after the decimal point.
- ``f`` - specifier: f(loat).
You can even have as many format strings as you want in a single printf call. Just make sure the put the
You can even have as many formatted items as you want in a single printf call. Just make sure the put the
arguments after the format string in the right order.
.. code-block:: yaml
@ -379,6 +306,19 @@ To display a text string from a ``text_sensor``, append ``.c_str()`` to the end
lambda: |-
it.printf(0, 0, id(my_font), "Text to follow: %s", id(template_text).state.c_str());
When using anti-aliased fonts you will probably need to specify the color to draw the characters, and the background
color to mix in for anti-aliasing. This requires the full version of `printf`, e.g.:
.. code-block:: yaml
display:
- platform: ...
# ...
lambda: |-
it.printf(10, 100, id(roboto), Color(0x123456), COLOR_OFF, display::TextAlign::BASELINE, "%f", id(heap_free).state);
The last printf tip for use in displays I will discuss here is how to display binary sensor values. You
*could* of course just check the state with an ``if`` statement as the first few lines in the example below, but if
you want to be efficient you can use an *inline if* too. With the ``%s`` print specifier you can tell it to
@ -411,14 +351,14 @@ use any string you pass it, like ``"ON"`` or ``"OFF"``.
.. _display-strftime:
Displaying Time
***************
---------------
You can display current time using a time component. Please see the example :ref:`here <strftime>`.
.. _clipping:
Screen Clipping
***************
---------------
Screen clipping is a new set of methods since version 2023.2.0 of esphome. It could be useful when you just want to show
a part of an image or make sure that what you draw on the screen does not go outside a specific region on the screen.
@ -470,12 +410,10 @@ With ``get_clipping();`` you get a ``Rect`` object back with the latest set clip
With ``is_clipping();`` tells you if clipping is activated.
.. _config-color:
Color
*****
-----
When using RGB-capable displays in ESPHome you may wish to use custom colors.
A ``color`` component exists for just this purpose:
@ -525,20 +463,15 @@ RGB displays use red, green, and blue, while grayscale displays may use white.
.. _display-graphs:
Graph Component
***************
---------------
You can display a graph of a sensor value(s) using this component. The states used for the graph are stored in
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.
@ -638,8 +571,11 @@ And then later in code:
- Axis labels are currently not possible without manually placing them.
- The grid and border color is set with it.graph(), while the traces are defined separately.
.. _display-qrcode:
QR Code Component
*****************
-----------------
Use this component to generate a QR-code containing a string on the device, which can then be drawn on compatible displays.
@ -674,8 +610,17 @@ 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:
Images
******
------
Use this component to store graphical images on the device, you can then draw the images on compatible displays.
@ -790,7 +735,7 @@ You can also use this to invert images in two colors display, use ``COLOR_OFF``
as the additional parameters.
Animation
*********
---------
Allows to use animated images on displays. Animation inherits all options from the image component.
It adds additional lambda methods: ``next_frame()``, ``prev_frame()`` and ``set_frame()`` to change the shown picture of a gif.
@ -990,54 +935,36 @@ 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
--------
- :apiref:`display/display_buffer.h`
- :ref:`Fonts <display-fonts>`
- :ghedit:`Edit`
.. toctree::

View File

@ -10,7 +10,7 @@ All-in-one e-paper display ``Inkplate 6``, ``Inkplate 10`` and ``Inkplate 6 Plus
The Inkplate 6, 10 and 6 Plus are powerful, Wi-Fi enabled ESP32 based six-inch e-paper displays -
recycled from a Kindle e-reader. Its main feature is simplicity.
Learn more at `Inkplate's website <https://inkplate.io/>`__
Learn more at `Inkplate's documentation website <https://inkplate.readthedocs.io/en/stable/>`__
.. figure:: images/inkplate6.jpg
:align: center

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: 11
reset_pin: 13
enable_pin: 9
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

@ -0,0 +1,213 @@
RPI_DPI_RGB Display Driver
===========================
.. seo::
:description: Instructions for setting up 16 bit "RPI_DPI_RGB" parallel displays
:image: waveshare_touch-s3.jpg
.. _rpi_dpi_rgb:
Models
------
This display driver supports displays with 16 bit parallel interfaces, often referred to as "RPI_DPI_RGB" type.
These have a parallel interface but no SPI interface and require no configuration of the driver chip.
This driver has been tested with the following displays:
- Waveshare ESP32-S3-Touch-LCD-4.3
- Makerfabs 4.3" display (Sunton)
Usage
-----
This component requires an ESP32 (usually an ESP32-S3 because of the number of GPIO pins required) and the use of
ESP-IDF. PSRAM is a requirement due to the size of the display buffer.
.. figure:: images/waveshare_touch-s3.jpg
:align: center
:width: 75.0%
Waveshare ESP32-S3 Touch 4.3
.. code-block:: yaml
# Example minimal configuration entry
display:
- platform: rpi_dpi_rgb
id: rpi_disp
dimensions:
width: 800
height: 480
de_pin: REPLACE_ME
hsync_pin: REPLACE_ME
vsync_pin: REPLACE_ME
pclk_pin: REPLACE_ME
data_pins:
red:
- XX #r1
- XX #r2
- XX #r3
- XX #r4
- XX #r5
green:
- XX #g0
- XX #g1
- XX #g2
- XX #g3
- XX #g4
- XX #g5
blue:
- XX #b1
- XX #b2
- XX #b3
- XX #b4
- XX #b5
Configuration variables:
************************
- **data_pins** (**Required**) A list of pins used for the databus. Specified in 3 groups:
- **red**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 5 pin numbers for the red databits, listed from least to most significant bit.
- **green**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 6 pin numbers for the green databits, listed from least to most significant bit.
- **blue**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 5 pin numbers for the blue databits, listed from least to most significant bit.
- **de_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DE pin
- **pclk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The PCLK pin.
- **hsync_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Horizontal sync pin.
- **vsync_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Vertical sync pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **hsync_pulse_width** (*Optional*, int): The horizontal sync pulse width.
- **hsync_front_porch** (*Optional*, int): The horizontal front porch length.
- **hsync_back_porch** (*Optional*, int): The horizontal back porch length.
- **vsync_pulse_width** (*Optional*, int): The vertical sync pulse width.
- **vsync_front_porch** (*Optional*, int): The vertical front porch length.
- **vsync_back_porch** (*Optional*, int): The vertical back porch length.
- **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 ``bgr`` (default) or ``rgb``.
- **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 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.
- **pclk_frequency** (*Optional*): Set the pixel clock speed. Default is 16MHz.
- **pclk_inverted** (*Optional* bool): If the pclk is active negative (default is True)
- **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.
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ````, ``90°``, ``180°``, or ``270°``.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
The horizontal and vertical ``pulse_width``, ``front_porch`` and ``back_porch`` values are optional, but may require
changing for a specific display. Refer to the manufacturer's sample code for suitable values. These specify timing
requirements for the display.
Example configurations
----------------------
Waveshare ESP32-S3 Touch 4.3
****************************
.. code-block:: yaml
display:
- platform: rpi_dpi_rgb
auto_clear_enabled: false
color_order: RGB
pclk_frequency: 16MHz
dimensions:
width: 800
height: 480
de_pin:
number: 5
hsync_pin:
number: 46
ignore_strapping_warning: true
vsync_pin:
number: 3
ignore_strapping_warning: true
pclk_pin: 7
hsync_back_porch: 30
hsync_front_porch: 210
hsync_pulse_width: 30
vsync_back_porch: 4
vsync_front_porch: 4
vsync_pulse_width: 4
data_pins:
red:
- 1 #r3
- 2 #r4
- 42 #r5
- 41 #r6
- 40 #r7
blue:
- 14 #b3
- 38 #b4
- 18 #b5
- 17 #b6
- 10 #b7
green:
- 39 #g2
- 0 #g3
- 45 #g4
- 48 #g5
- 47 #g6
- 21 #g7
Makerfabs 4.3" 800x480 display
******************************
.. code-block:: yaml
display:
- platform: rpi_dpi_rgb
update_interval: never
auto_clear_enabled: false
id: rpi_display
color_order: RGB
rotation: 90
dimensions:
width: 800
height: 480
de_pin:
number: 40
hsync_pin: 39
vsync_pin: 41
pclk_pin: 42
data_pins:
red:
- 45 #r1
- 48 #r2
- 47 #r3
- 21 #r4
- 14 #r5
green:
- 5 #g0
- 6 #g1
- 7 #g2
- 15 #g3
- 16 #g4
- 4 #g5
blue:
- 8 #b1
- 3 #b2
- 46 #b3
- 9 #b4
- 1 #b5
See Also
--------
- :doc:`index`
- :apiref:`rpi_dpi_rgb/rpi_dpi_rgb.h`
- :ghedit:`Edit`

View File

@ -0,0 +1,199 @@
ST7701S Display Driver
======================
.. seo::
:description: Instructions for setting up ST7701S 16 bit "RGB" parallel displays
:image: indicator.jpg
.. _st7701s:
Models
------
This display driver supports displays with 16 bit parallel interfaces, often referred to as "RGB". It currently
supports the ST7701S chip.
This driver has been tested with the following displays:
- Seeed Sensecap Indicator
- Makerfabs 4" display
Usage
-----
This component requires an ESP32 (usually an ESP32-S3 because of the number of GPIO pins required) and the use of
ESP-IDF. PSRAM is a requirement due to the size of the display buffer.
.. figure:: images/indicator.jpg
:align: center
:width: 75.0%
Sensecap Indicator display
.. code-block:: yaml
# Example minimal configuration entry
display:
- platform: st7701s
dimensions:
width: 480
height: 480
cs_pin: REPLACE_ME
reset_pin: REPLACE_ME
de_pin: REPLACE_ME
hsync_pin: REPLACE_ME
vsync_pin: REPLACE_ME
pclk_pin: REPLACE_ME
# Replace XX with the correct pin number
data_pins:
red:
- XX #r1
- XX #r2
- XX #r3
- XX #r4
- XX #r5
green:
- XX #g0
- XX #g1
- XX #g2
- XX #g3
- XX #g4
- XX #g5
blue:
- XX #b1
- XX #b2
- XX #b3
- XX #b4
- XX #b5
Configuration variables:
************************
- **init_sequence** (*Optional*, A list of byte arrays): Specifies the init sequence for the display
- **data_pins** (**Required**): A list of pins used for the databus. Specified in 3 groups.
- **red**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 5 pin numbers for the red databits, listed from least to most significant bit.
- **green**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 6 pin numbers for the green databits, listed from least to most significant bit.
- **blue**: (**Required**, :ref:`Pin Schema <config-pin_schema>`) Exactly 5 pin numbers for the blue databits, listed from least to most significant bit.
- **de_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DE pin.
- **dc_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **pclk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The PCLK pin.
- **hsync_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Horizontal sync pin.
- **vsync_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Vertical sync pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **hsync_pulse_width** (*Optional*, int): The horizontal sync pulse width.
- **hsync_front_porch** (*Optional*, int): The horizontal front porch length.
- **hsync_back_porch** (*Optional*, int): The horizontal back porch length.
- **vsync_pulse_width** (*Optional*, int): The vertical sync pulse width.
- **vsync_front_porch** (*Optional*, int): The vertical front porch length.
- **vsync_back_porch** (*Optional*, int): The vertical back porch length.
- **pclk_frequency** (*Optional*): Set the pixel clock speed. Default is 8MHz.
- **pclk_inverted** (*Optional* bool): If the pclk is active negative (default is True)
- **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 ``bgr`` (default) or ``rgb``.
- **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 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``,
``20MHz``, ``10MHz``, ``5MHz``, ``2MHz``, ``1MHz`` (default), ``200kHz``, ``75kHz`` or ``1kHz``.
- **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.
- **rotation** (*Optional*): Rotate the display presentation in software. Choose one of ````, ``90°``, ``180°``, or ``270°``. This option cannot be used with ``transform``.
- **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.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
**Note:** 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``
The horizontal and vertical ``pulse_width``, ``front_porch`` and ``back_porch`` values are optional, but may require
changing for a specific display. Refer to the manufacturer's sample code for suitable values. These specify timing
requirements for the display.
The ``init_sequence`` requires a list of elements, one of which may be a single integer selecting a canned init
sequence (the default and currently the only sequence is 1), the remainder must be byte arrays providing additional
init commands, each consisting of a command byte followed by zero or more data bytes.
These will be collected and sent to the display via SPI during initialisation.
Example configurations
----------------------
Seeed Sensecap Indicator
************************
.. code-block:: yaml
display:
- platform: st7701s
auto_clear_enabled: false
update_interval: never
spi_mode: MODE3
color_order: RGB
dimensions:
width: 480
height: 480
invert_colors: true
transform:
mirror_x: true
mirror_y: true
cs_pin:
pca9554: p_c_a
number: 4
reset_pin:
pca9554: p_c_a
number: 5
de_pin: 18
hsync_pin: 16
vsync_pin: 17
pclk_pin: 21
init_sequence:
- 1 # select canned init sequence number 1
- [ 0xE0, 0x1F ] # Set sunlight readable enhancement
data_pins:
red:
- 4 #r1
- 3 #r2
- 2 #r3
- 1 #r4
- 0 #r5
green:
- 10 #g0
- 9 #g1
- 8 #g2
- 7 #g3
- 6 #g4
- 5 #g5
blue:
- 15 #b1
- 14 #b2
- 13 #b3
- 12 #b4
- 11 #b5
lambda: |-
it.fill(COLOR_BLACK);
it.print(0, 0, id(my_font), id(my_red), TextAlign::TOP_LEFT, "Hello World!");
See Also
--------
- :doc:`index`
- :apiref:`st7701s/st7701s.h`
- :ghedit:`Edit`

View File

@ -7,8 +7,9 @@ Waveshare E-Paper Display
The ``waveshare_epaper`` display platform allows you to use
some E-Paper displays sold by `Waveshare <https://www.waveshare.com/product/displays/e-paper.htm>`__
with ESPHome. The 2.13" `TTGO module <https://github.com/lewisxhe/TTGO-EPaper-Series>`__ with an ESP32 on the board
is supported as well. Depending on your specific revision of the board you might need to try out the ``-b73`` or ``-b1``
with ESPHome. The 2.13" `TTGO module <https://github.com/lewisxhe/TTGO-EPaper-Series>`__ and the
`Waveshare Cloud Module <https://www.waveshare.com/wiki/2.13inch_e-Paper_Cloud_Module>`__ with an ESP32
on the board are supported as well. Depending on your specific revision of the TTGO board you might need to try out the ``-b73`` or ``-b1``
version (see below).
The 1.54" `Good Display gdew0154m09 <https://www.good-display.com/product/206.html>`__
as used in the `M5Stack Core Ink <https://shop.m5stack.com/products/m5stack-esp32-core-ink-development-kit1-54-elnk-display>`__
@ -88,14 +89,16 @@ Configuration variables:
- ``2.13in-ttgo-b74`` - T5_V2.3.1 with B74 display tested
- ``2.13in-ttgo-b1`` - T5_V2.3 with B1 display tested
- ``2.13in-ttgo-dke`` - T5_V2.3 with DKE group display (DEPG0213BN) tested
- ``2.13inv2`` - 2.13in V2 display (Pico e-Paper 2.13v2 and Cloud Module)
- ``2.13inv3`` - 2.13in V3 display (Pico e-Paper 2.13v3)
- ``2.70in`` - currently not working with the HAT Rev 2.1 version
- ``2.70inv2``
- ``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 dislplay, but with different initialization and full/partial display refresh management than ``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
- ``2.90in-bV3`` - B/W rendering only
- ``4.20in``
@ -120,13 +123,13 @@ Configuration variables:
- **busy_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The BUSY pin. Defaults to not connected.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin. Defaults to not connected.
Make sure you pull this pin high (by connecting it to 3.3V with a resistor) if not connected to a GPIO pin.
The B74 display variant requires the reset pin.
The 2.13" B74 and V2 display variants require the reset pin.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **full_update_every** (*Optional*, int): E-Paper displays have two modes of switching to the next image: A partial
update that only changes the pixels that have changed and a full update mode that first clears the entire display
and then re-draws the image. The former is much quicker and nicer, but every so often a full update needs to happen
because artifacts accumulate. On the ``1.54in``, ``1.54inv2``, ``2.13in``, ``2.90in`` and ``2.90inv2`` models you have the option to switch only
because artifacts accumulate. On the ``1.54in``, ``1.54inv2``, ``2.13in``, ``2.13inv2``, ``2.90in`` and ``2.90inv2`` models, you have the option to only
do a full-redraw every x-th time using this option. Defaults to ``30`` on the described models and a full update for
all other models.
- **reset_duration** (*Optional*, :ref:`config-time`): Duration for the display reset operation. Defaults to ``200ms``.

View File

@ -12,7 +12,7 @@ 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%
@ -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

@ -264,6 +264,29 @@ Stops the bluetooth scanning. It can be started again with the above start scan
on_...:
- esp32_ble_tracker.stop_scan:
Use on single-core chips
------------------------
On dual-core devices the WiFi component runs on core 1, while this component runs on core 0.
When using this component on single core chips such as the ESP32-C3 both WiFi and ``ble_tracker`` must run on
the same core, and this has been known to cause issues when connecting to WiFi. A work-around for this is to
enable the tracker only while the native API is connected. The following config will achieve this:
.. code-block:: yaml
esp32_ble_tracker:
scan_parameters:
continuous: false
api:
encryption:
key: !secret encryption_key
on_client_connected:
- esp32_ble_tracker.start_scan:
continuous: true
on_client_disconnected:
- esp32_ble_tracker.stop_scan:
See Also
--------

View File

@ -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

@ -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

@ -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:
@ -73,14 +73,20 @@ MQTT options:
Automation triggers:
- **on_state** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan state is changed. See :ref:`fan-on_state_trigger`.
- **on_turn_on** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan is turned on. See :ref:`fan-on_turn_on_off_trigger`.
- **on_turn_off** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan is turned off. See :ref:`fan-on_turn_on_off_trigger`.
- **on_direction_set** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan direction is changed. See :ref:`fan-on_direction_set_trigger`.
- **on_oscillating_set** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan oscillating state is changed. See :ref:`fan-on_oscillating_set_trigger`.
- **on_speed_set** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan speed is set/changed. See :ref:`fan-on_speed_set_trigger`.
when the fan speed is changed. See :ref:`fan-on_speed_set_trigger`.
- **on_preset_set** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the fan preset mode is set/changed. See :ref:`fan-on_preset_set_trigger`.
when the fan preset mode is changed. See :ref:`fan-on_preset_set_trigger`.
.. _fan-toggle_action:
@ -175,6 +181,24 @@ This :ref:`condition <config-condition>` passes if the given fan is on or off.
then:
- script.execute: my_script
.. _fan-on_state_trigger:
``fan.on_state`` Trigger
------------------------
This trigger is activated each time the fan state is changed. It will fire when the state is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
A pointer to the ``Fan`` is available as a variable called ``x``.
.. code-block:: yaml
fan:
- platform: speed # or any other platform
# ...
on_state:
- logger.log:
format: "Fan State changed! Fan Speed is %d!"
args: [ x->speed ]
.. _fan-on_turn_on_off_trigger:
``fan.on_turn_on`` / ``fan.on_turn_off`` Trigger
@ -193,12 +217,49 @@ if a command to turn the fan on or off already matches the current state.
on_turn_off:
- logger.log: "Fan Turned Off!"
.. _fan-on_direction_set_trigger:
``fan.on_direction_set`` Trigger
--------------------------------
This trigger is activated each time the fan direction is changed. It will fire when the direction is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
The new direction is available as a variable called ``x``. (``0`` is FORWARD, ``1`` is REVERSE)
.. code-block:: yaml
fan:
- platform: speed # or any other platform
# ...
on_direction_set:
- logger.log:
format: "Fan Direction was changed to %s!"
args: [ x == 0 ? "FORWARD" : "REVERSE" ]
.. _fan-on_oscillating_set_trigger:
``fan.on_oscillating_set`` Trigger
----------------------------------
This trigger is activated each time the fan oscillating state is changed. It will fire when the state is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
The new oscillating state is available as a variable called ``x``.
.. code-block:: yaml
fan:
- platform: speed # or any other platform
# ...
on_oscillating_set:
- logger.log:
format: "Fan Oscillating State was changed to %s!"
args: [ ONOFF(x) ]
.. _fan-on_speed_set_trigger:
``fan.on_speed_set`` Trigger
----------------------------
This trigger is activated each time the fan speed is changed. It will fire when the speed is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
The new speed is available as a variable called ``x``.
.. code-block:: yaml
@ -206,7 +267,9 @@ This trigger is activated each time the fan speed is changed. It will fire when
- platform: speed # or any other platform
# ...
on_speed_set:
- logger.log: "Fan Speed was changed!"
- logger.log:
format: "Fan Speed was changed to %d!"
args: [ x ]
.. _fan-on_preset_set_trigger:
@ -214,6 +277,7 @@ This trigger is activated each time the fan speed is changed. It will fire when
-----------------------------
This trigger is activated each time the fan preset mode is changed. It will fire when the preset mode is either set via API e.g. in Home Assistant or locally by an automation or a lambda function.
The new mode is available as a variable called ``x``.
.. code-block:: yaml
@ -221,7 +285,9 @@ This trigger is activated each time the fan preset mode is changed. It will fire
- platform: speed # or any other platform
# ...
on_preset_set:
- logger.log: "Fan preset mode was changed!"
- logger.log:
format: "Fan preset mode was changed to %s!"
args: [ x.c_str() ]
Lambda calls
------------

View File

@ -24,8 +24,7 @@ Configuration variables:
------------------------
- **name** (*Optional*, string): The name for this fan.
- **output** (*Optional*, :ref:`config-id`): The id of the
:ref:`float output <output>` to use for this fan.
- **output** (**Required**, :ref:`config-id`): The id of the :ref:`float output <output>` to use for this fan.
- **oscillation_output** (*Optional*, :ref:`config-id`): The id of the
:ref:`output <output>` to use for the oscillation state of this fan. Default is empty.
- **direction_output** (*Optional*, :ref:`config-id`): The id of the

View File

@ -0,0 +1,41 @@
Template Fan
============
.. seo::
:description: Instructions for setting up template fans.
:image: fan.svg
The ``template`` fan platform lets you create a fan interface using only triggers.
.. figure:: images/fan-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
fan:
- platform: template
name: "Virtual Fan"
on_state:
- do something
on_speed_set:
- do something
Configuration variables:
------------------------
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (*Optional*, string): The name for this fan.
- **has_direction** (*Optional*, boolean): Indicates if there should be a control for direction. Default is ``false``.
- **has_oscillating** (*Optional*, boolean): Indicates if there should be a control for oscillating. Default is ``false``.
- **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. Default is only on/off.
- **preset_modes** (*Optional*): A list of preset modes for this fan. Preset modes can be used in automations (i.e. `on_preset_set`).
- All other options from :ref:`Fan Component <config-fan>`.
See Also
--------
- :doc:`/components/fan/index`
- :apiref:`template/fan/template_fan.h`
- :ghedit:`Edit`

View File

@ -38,6 +38,11 @@ If available on your reader model, it's recommended to connect 3.3VT (touch indu
# Declare Grow Fingerprint Reader
fingerprint_grow:
sensing_pin: GPIO12
sensor_power_pin:
number: GPIO18
inverted: true
idle_period_to_sleep: 5s
on_finger_scan_start:
...
on_finger_scan_matched:
@ -66,8 +71,10 @@ Base Configuration:
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the UART hub.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **sensing_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to the reader's finger detection signal (WAKEUP) output.
- **sensor_power_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Output pin responsible for toogling the sensor power on and off.
- **password** (*Optional*, int): Password to use for authentication. Defaults to ``0x00``.
- **new_password** (*Optional*, int): Sets a new password to use for authentication. See :ref:`fingerprint_grow-set_new_password` for more information.
- **idle_period_to_sleep** (*Optional*, :ref:`config-time`): The sensor idle period to wait before powering it off (sleep). Defaults to ``5s``. See :ref:`fingerprint_grow-sleep_mode` for more information.
- **on_finger_scan_start** (*Optional*, :ref:`Automation <automation>`): An action to be performed when the finger touches the sensor. See :ref:`fingerprint_grow-on_finger_scan_start`.
- **on_finger_scan_matched** (*Optional*, :ref:`Automation <automation>`): An action to be performed when an enrolled fingerprint is scanned. See :ref:`fingerprint_grow-on_finger_scan_matched`.
- **on_finger_scan_unmatched** (*Optional*, :ref:`Automation <automation>`): An action to be performed when an unknown fingerprint is scanned. See :ref:`fingerprint_grow-on_finger_scan_unmatched`.
@ -127,6 +134,32 @@ Sensor
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
.. _fingerprint_grow-sleep_mode:
Sleep Mode
----------
The sensor idle power consumption is roughly 20mA. If you plan to keep the device running continuously, it is wise to implement the Sleep Mode, which puts the sensor to sleep (power off) a few seconds after the last communication (configurable with ``idle_period_to_sleep``). It can only be implemented along with the Touch Sensing Feature, since it uses the touch feedback to wake up the sensor.
To implement this feature, you will need one more free GPIO pin to toggle the sensor power on and off and two external components: a 10kOhms resistor and a PNP transistor (like a BC327).
This is a wiring example for the R503 and below you can find the respective configuration:
.. figure:: images/fingeprint_grow-sleep_mode_wiring.jpg
:align: center
:width: 50.0%
.. code-block:: yaml
uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO4
sensor_power_pin:
number: GPIO18
inverted: true
idle_period_to_sleep: 5s
.. _fingerprint_grow-set_new_password:

View File

@ -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::

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -11,11 +11,13 @@ Components
fan/index
light/index
number/index
datetime/index
output/index
select/index
sensor/index
switch/index
button/index
event/index
display/index
text_sensor/index
stepper/index
@ -28,4 +30,5 @@ Components
time/index
alarm_control_panel/index
text/index
valve/index
*

View File

@ -24,10 +24,14 @@ Configuration variables
- **pin** (**Required**, :ref:`config-pin`): The pin for the data line of the light.
- **num_leds** (**Required**, int): The number of LEDs in the strip.
- **rmt_channel** (**Required**, int): The RMT channel to use. If using multiple strips, you need to use different channels.
- **ESP32**: ``0`` to ``7``
- **ESP32-S2**: ``0`` to ``3``
- **ESP32-S3**: ``0`` to ``3``
- **ESP32-C3**: ``0`` or ``1``
.. csv-table::
:header: "ESP32 Variant", "Channels"
"ESP32", "0, 1, 2, 3, 4, 5, 6, 7"
"ESP32-S2", "0, 1, 2, 3"
"ESP32-S3", "0, 1, 2, 3"
"ESP32-C3", "0, 1"
- **chipset** (**Required**, enum): The chipset to apply known timings from. Not used if specifying the timings manually, see below.
- ``WS2812``

View File

@ -77,10 +77,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.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
@ -583,6 +583,7 @@ Configuration variables:
- **cold_white** (*Optional*, percentage): The cold white channel of the light, if applicable. Defaults to ``100%``.
- **warm_white** (*Optional*, percentage): The warm white channel of the light, if applicable. Defaults to ``100%``.
- **duration** (**Required**, :ref:`config-time`): The duration this color should be active.
- **transition_length** (*Optional*, :ref:`config-time`): The duration of each transition. Defaults to ``0s``.
See `light.turn_on <light-turn_on_action>` for more information on the various color fields.

View File

@ -22,8 +22,7 @@ ESP8266 side. Bi-directional symmetric request / response protocol is implemente
between ESP8266 and MCU. ``sonoff_d1`` component implements this protocol and
translates between HA light commands and serial messages.
For detailed instructions on how to replace the stock firmware with ESPHome see :doc:`/devices/sonoff_s20`.
You will need to locate GPIO0 pin and serial port. Photos below should help.
To replace the stock firmware with ESPHome you will need to locate GPIO0 pin and serial port. Photos below should help.
.. figure:: images/sonoff_d1_gpio0.jpg
:align: center

View File

@ -8,10 +8,6 @@ Lock Component
The ``lock`` domain includes all platforms that should function like a lock
with lock/unlock actions.
.. note::
ESPHome lock components requires Home Assistant 2022.3 or newer
.. _config-lock:
Base Lock Configuration

View File

@ -10,7 +10,7 @@ This repository/library allows you to create a custom wake word for your ESPHome
The training process is described on the `microWakeWord GitHub repository <https://github.com/kahrendt/microWakeWord>`__.
The ``micro_wake_word`` component requires an **ESP32-S3** to function.
The ``micro_wake_word`` component requires an **ESP32-S3 with PSRAM** to function.
.. code-block:: yaml
@ -35,6 +35,7 @@ Configuration variables:
e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/okay_nabu.json``.
- **on_wake_word_detected** (*Optional*, Automation): An automation to perform when the wake word is detected.
The ``wake_word`` phrase from the model manifest is provided as a ``std::string`` to any actions in this automation.
The below two options are provided by the JSON file, but can be overridden in YAML.
@ -100,6 +101,7 @@ Example usage
on_wake_word_detected:
then:
- voice_assistant.start:
wake_word: !lambda return wake_word;
See Also

View File

@ -353,6 +353,7 @@ MQTT can have some overrides for specific options.
name: "Component Name"
# Optional variables:
qos: 1
retain: true
availability:
topic: livingroom/status
@ -366,6 +367,7 @@ Configuration variables:
- **name** (**Required**, string): The name to use for the MQTT
Component.
- **qos** (*Optional*, int): The [Quality of Service](https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/) level for publishing. Defaults to 0.
- **retain** (*Optional*, boolean): If all MQTT state messages should
be retained. Defaults to ``true``.
- **discovery** (*Optional*, boolean): Manually enable/disable

View File

@ -22,6 +22,12 @@ Configuration variables:
- **enable_ipv6** (*Optional*, boolean): Enables IPv6 support. Defaults to ``false``.
- **min_ipv6_addr_count** (*Optional*, integer): ESPHome considers the network to be connected when it has one IPv4 address and this number of IPv6 addresses. Defaults to ``0`` so as to not hang on boot with networks where IPv6 is not enabled. ``2`` is typically a reasonable value for configurations requiring IPv6.
.. note::
The `lwIP <https://savannah.nongnu.org/projects/lwip/>`_ library used for the network component currently only implements IPv6 SLAAC according to `RFC4862 <https://datatracker.ietf.org/doc/rfc4862/>`_. The interface identifier (IID) is directly generated from the device MAC address.
This has various security and privacy implications decribed in `RFC7721 <https://datatracker.ietf.org/doc/rfc7721/>`_, as this might leak outside of the smart home network and makes the device uniquely identifiable.
Therefore, the address generation does not comply to `RFC7217 <https://datatracker.ietf.org/doc/rfc7217/>`_.
See Also
--------

View File

@ -43,16 +43,16 @@ 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.
- **unit_of_measurement** (*Optional*, string): Manually set the unit
of measurement for the number. Requires Home Assistant Core 2021.12 or newer.
of measurement for the number.
- **mode** (*Optional*, string): Defines how the number should be displayed in the frontend.
See https://developers.home-assistant.io/docs/core/entity/number/#properties
for a list of available options. Requires Home Assistant Core 2021.12 or newer.
for a list of available options.
Defaults to ``"auto"``.
- **device_class** (*Optional*, string): The device class for the number.
See https://www.home-assistant.io/integrations/number/#device-class

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

View File

@ -83,6 +83,11 @@ channel 0, 2, 4, 6 for each output. This will prevent issues that arise from aut
which chooses adjacent channels with shared timers. See
`Issue #3114 <https://github.com/esphome/issues/issues/3114>`__ for more details.
- **phase_angle** (*Optional*, float): Set a phase angle to the other channel of this timer.
Range 0-360°, defaults to 0°
Note: this variable is only available for the esp-idf framework
Recommended frequencies
-----------------------

View File

@ -97,9 +97,7 @@ Sonoff B1 configuration example
This component can be used with a Sonoff B1 smart light bulb. To flash
the Sonoff B1, open the plastic cover and connect/solder wires to the
PCB pads (3.3V, RX, TX, GND, GPIO0). If you connect GPIO0 to GND
during power up, the device enters flash mode. For more information
about flashing Sonoff devices, see:
:doc:`/devices/sonoff_s20`. All LEDs are connected to a
during power up, the device enters flash mode. All LEDs are connected to a
chain of two MY9321 chips that are connected to GPIO12 and GPIO14. A
complete configuration for a Sonoff B1 looks like:

View File

@ -68,6 +68,9 @@ Configuration variables:
- **rgb_current** (*Optional*, current): The current used for the RGB channel.
Defaults to ``20mA``.
Can be one of ``10mA``, ``15mA``, ``20mA``, ``25mA``, ``30mA``, ``35mA``, ``40mA``, ``45mA``.
- **separate_modes** (*Optional*, bool): Use separate RGB/CW modes instead of writing all 5 values as RGB.
Defaults to ``true``, keep it at ``true`` if your SM2135 chip variant does not support simultaneous CW and RGB modes (e.g. SM2135E).
Set this to ``false`` when your SM2135 chip variant supports having CW and RGB leds on at the same time (e.g. SM2135EH/SM2135EJ).
.. _sm2135-output:

View File

@ -0,0 +1,101 @@
TLC5971 LED driver
==================
.. seo::
:description: Instructions for setting up TLC5971 LED drivers in ESPHome.
:image: tlc5971.jpg
:keywords: tlc5971,
.. _tlc5971-component:
Component/Hub
-------------
.. figure:: images/tlc5971.jpg
:align: center
:width: 75.0%
Adafruit's TLC59711 board
This component represents a chain of `TLC5971 12-Channel, 16-Bit PWM LED Drivers <https://www.ti.com/lit/ds/symlink/tlc5971.pdf>`_,
which is used e.g. on this `board from Adafruit <https://www.adafruit.com/product/1455>`_.
To use the channels of this components, you first need to setup the
global ``tlc5971`` hub and give it an id, and then define the
:ref:`individual output channels <tlc5971-output>`.
.. code-block:: yaml
# Example configuration entry
tlc5971:
data_pin: GPIO12
clock_pin: GPIO14
# Individual outputs
output:
- platform: tlc5971
id: output_red
channel: 0
- platform: tlc5971
id: output_green
channel: 1
- platform: tlc5971
id: output_blue
channel: 2
Configuration variables:
************************
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin connected to DIN.
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin connected to CLK.
- **num_chips** (*Optional*, int): Number of chips in the chain. Must be
in range from 1 to 85. Defaults to 1.
- **id** (*Optional*, :ref:`config-id`): The id to use for
this ``tlc5971`` component. Use this if you have multiple TLC5971 chains
connected at the same time.
.. _tlc5971-output:
Output
------
The tlc5971 output component exposes a tlc5971 channel of a global
:ref:`tlc5971-component` as a float output.
.. code-block:: yaml
# Example configuration entry
tlc5971:
data_pin: GPIO12
clock_pin: GPIO14
# Individual outputs
output:
- platform: tlc5971
id: output_red
channel: 0
- platform: tlc5971
id: output_green
channel: 1
- platform: tlc5971
id: output_blue
channel: 2
Configuration variables:
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **channel** (**Required**, int): Chose the channel of the TLC5971 chain of
this output component.
- **tlc5971_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
:ref:`TLC5971-component`.
Use this if you have multiple TLC5971 chains you want to use at the same time.
- All other options from :ref:`Output <config-output>`.
See Also
--------
- :doc:`/components/output/index`
- :doc:`/components/light/monochromatic`
- :doc:`/components/power_supply`
- :apiref:`tlc5971/tlc5971.h`
- :ghedit:`Edit`

View File

@ -59,7 +59,7 @@ binary sensor or GPIO switch.
- platform: gpio
name: "PCF9554A Pin #0"
pin:
pca9554: pcf9554a_device
pca9554: pca9554a_device
# Use pin number 0
number: 0
# One of INPUT or OUTPUT

View File

@ -30,12 +30,14 @@ Configuration variables:
- **dump** (*Optional*, list): Decode and dump these remote codes in the logs (at log.level=DEBUG).
Set to ``all`` to dump all available codecs:
- **abbwelcome**: Decode and dump ABB-Welcome codes. Messages are sent via copper wires. See :ref:`remote_transmitter-transmit_abbwelcome`
- **aeha**: Decode and dump AEHA infrared codes.
- **byronsx**: Decode and dump Byron SX doorbell RF codes.
- **canalsat**: Decode and dump CanalSat infrared codes.
- **canalsatld**: Decode and dump CanalSatLD infrared codes.
- **coolix**: Decode and dump Coolix infrared codes.
- **dish**: Decode and dump Dish infrared codes.
- **dooya**: Decode and dump Dooya RF codes.
- **drayton**: Decode and dump Drayton Digistat RF codes.
- **jvc**: Decode and dump JVC infrared codes.
- **keeloq**: Decode and dump KeeLoq RF codes.
@ -52,23 +54,43 @@ Configuration variables:
- **rc5**: Decode and dump RC5 IR codes.
- **rc6**: Decode and dump RC6 IR codes.
- **rc_switch**: Decode and dump RCSwitch RF codes.
- **roomba**: Decode and dump Roomba infrared codes.
- **samsung**: Decode and dump Samsung infrared codes.
- **samsung36**: Decode and dump Samsung36 infrared codes.
- **sony**: Decode and dump Sony infrared codes.
- **toshiba_ac**: Decode and dump Toshiba AC infrared codes.
- **tolerance** (*Optional*, int): The percentage that the remote signal lengths can deviate in the
decoding process. Defaults to ``25%``.
- **tolerance** (*Optional*, int, :ref:`config-time` or mapping): The percentage or time that the remote signal lengths can
deviate in the decoding process. Defaults to ``25%``.
- **type** (**Required**, enum): Set the type of the tolerance. Can be ``percentage`` or ``time``.
- **value** (**Required**, int or :ref:`config-time`): The percentage or time value. Allowed values are in range ``0`` to
``100%`` or ``0`` to ``4294967295us``.
- **buffer_size** (*Optional*, int): The size of the internal buffer for storing the remote codes. Defaults to ``10kB``
on the ESP32 and ``1kB`` on the ESP8266.
- **memory_blocks** (*Optional*, int): The number of RMT memory blocks used. Only used on ESP32 platform. Defaults to
``3``.
- **rmt_channel** (*Optional*, int): The RMT channel to use. Only on **esp32**.
The following ESP32 variants have these channels available:
.. csv-table::
:header: "ESP32 Variant", "Channels"
"ESP32", "0, 1, 2, 3, 4, 5, 6, 7"
"ESP32-S2", "0, 1, 2, 3"
"ESP32-S3", "4, 5, 6, 7"
"ESP32-C3", "2, 3"
- **memory_blocks** (*Optional*, int): The number of RMT memory blocks used. Only used on ESP32 platform. The maximum
number of blocks shared by all receivers and transmitters depends on the ESP32 variant. Defaults to ``3``.
- **filter** (*Optional*, :ref:`config-time`): Filter any pulses that are shorter than this. Useful for removing
glitches from noisy signals. Defaults to ``50us``.
glitches from noisy signals. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``50us``.
- **idle** (*Optional*, :ref:`config-time`): The amount of time that a signal should remain stable (i.e. not
change) for it to be considered complete. Defaults to ``10ms``.
change) for it to be considered complete. Allowed values are in range ``0`` to ``4294967295us``. Defaults to ``10ms``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Use this if you have
multiple remote receivers.
- **clock_divider** (*Optional*, int): The clock divider used by the RMT peripheral. A clock divider of ``80`` leads to
a resolution of 1 µs per tick, ``160`` leads to 2 µs. Allowed values are in range ``1`` to ``255``. Only used on ESP32
platform. Defaults to ``80``.
.. note::
@ -79,6 +101,9 @@ Configuration variables:
Automations:
------------
- **on_abbwelcome** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
ABB-Welcome code has been decoded. A variable ``x`` of type :apiclass:`remote_base::ABBWelcomeData`
is passed to the automation for use in lambdas.
- **on_aeha** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
AEHA remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::AEHAData`
is passed to the automation for use in lambdas.
@ -98,6 +123,9 @@ Automations:
dish network remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::DishData`
is passed to the automation for use in lambdas.
Beware that Dish remotes use a different carrier frequency (57.6kHz) that many receiver hardware don't decode.
- **on_dooya** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Dooya RF remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::DooyaData`
is passed to the automation for use in lambdas.
- **on_drayton** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Drayton Digistat RF code has been decoded. A variable ``x`` of type :apistruct:`remote_base::DraytonData`
is passed to the automation for use in lambdas.
@ -146,6 +174,9 @@ Automations:
- **on_rc_switch** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
RCSwitch RF code has been decoded. A variable ``x`` of type :apistruct:`remote_base::RCSwitchData`
is passed to the automation for use in lambdas.
- **on_roomba** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Roomba remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::RoombaData`
is passed to the automation for use in lambdas.
- **on_samsung** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Samsung remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::SamsungData`
is passed to the automation for use in lambdas.
@ -207,6 +238,21 @@ Configuration variables:
Remote code selection (exactly one of these has to be included):
- **abbwelcome**: Trigger on a decoded ABB-Welcome code with the given data.
- **source_address** (**Required**, int): The source address to trigger on, see :ref:`remote_transmitter-transmit_abbwelcome`
for more info.
- **destination_address** (**Required**, int): The destination address to trigger on, see
:ref:`remote_transmitter-transmit_abbwelcome` for more info.
- **three_byte_address** (**Optional**, boolean): The length of the source and destination address. ``false`` means two bytes
and ``true`` means three bytes. Defaults to ``false``.
- **retransmission** (**Optional**, boolean): ``true`` if the message was re-transmitted. Defaults to ``false``.
- **message_type** (**Required**, int): The message type to trigger on, see :ref:`remote_transmitter-transmit_abbwelcome`
for more info.
- **message_id** (**Optional**, int): The random message ID to trigger on, see dumper output for more info. Defaults to any ID.
- **data** (**Optional**, 0-7 bytes list): The code to listen for. Usually you only need to copy this directly from the
dumper output. Defaults to ``[]``
- **aeha**: Trigger on a decoded AEHA remote code with the given data.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
@ -243,6 +289,13 @@ Remote code selection (exactly one of these has to be included):
- **address** (*Optional*, int): The number of the receiver to target, between 1 and 16 inclusive. Defaults to ``1``.
- **command** (**Required**, int): The Dish command to listen for, between 0 and 63 inclusive.
- **dooya**: Trigger on a decoded Dooya RF remote code with the given data.
- **id** (**Required**, int): The 24-bit ID code to trigger on.
- **channel** (**Required**, int): The 8-bit channel to listen for.
- **button** (**Required**, int): The 4-bit button to listen for.
- **check** (**Required**, int): The 4-bit check to listen for. Includes an indication that a button is being held down.
- **drayton**: Trigger on a decoded Drayton Digistat RF remote code with the given data.
- **address** (**Required**, int): The 16-bit ID code to trigger on, see dumper output for more info.
@ -304,6 +357,8 @@ Remote code selection (exactly one of these has to be included):
- **data** (**Required**, string): The code to listen for, see :ref:`remote_transmitter-transmit_raw`
for more info. Usually you only need to copy this directly from the dumper output.
- **delta** (**Optional**, integer): This parameter allows you to manually specify the allowed difference
between what Pronto code is specified, and what IR signal has been sent by the remote control.
- **raw**: Trigger on a raw remote code with the given code.
@ -355,6 +410,10 @@ Remote code selection (exactly one of these has to be included):
- **state** (**Required**, boolean): The on/off state to trigger on.
- **protocol** (*Optional*): The RC Switch protocol to use, see :ref:`remote_transmitter-rc_switch-protocol` for more info.
- **roomba**: Trigger on a decoded Roomba remote code with the given data.
- **data** (**Required**, int): The Roomba code to trigger on, see dumper output for more info.
- **samsung**: Trigger on a decoded Samsung remote code with the given data.
- **data** (**Required**, int): The data to trigger on, see dumper output for more info.
@ -432,3 +491,4 @@ See Also
- `IRRemoteESP8266 <https://github.com/markszabo/IRremoteESP8266/>`__ by `Mark Szabo-Simon <https://github.com/markszabo>`__
- :apiref:`remote/remote_receiver.h`
- :ghedit:`Edit`

View File

@ -43,6 +43,17 @@ Configuration variables:
- **carrier_duty_percent** (*Optional*, int): How much of the time the remote is on. For example, infrared
protocols modulate the signal using a carrier signal. Set this to ``50%`` if you're working with IR LEDs and to
``100%`` if working with other things like 433MHz transmitters.
- **rmt_channel** (*Optional*, int): The RMT channel to use. Only on **esp32**.
The following ESP32 variants have these channels available:
.. csv-table::
:header: "ESP32 Variant", "Channels"
"ESP32", "0, 1, 2, 3, 4, 5, 6, 7"
"ESP32-S2", "0, 1, 2, 3"
"ESP32-S3", "0, 1, 2, 3"
"ESP32-C3", "0, 1"
- **id** (*Optional*, :ref:`config-id`): Manually specify
the ID used for code generation. Use this if you have multiple remote transmitters.
@ -78,6 +89,56 @@ Configuration variables:
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in
Home Assistant, you'll want to set the **times** to 10 and the **wait_time** to 0s.
.. _remote_transmitter-transmit_abbwelcome:
``remote_transmitter.transmit_abbwelcome`` Action
*************************************************
This :ref:`action <config-action>` sends a ABB-Welcome message to the intercom bus. The
message type, addresses, address length and data can vary a lot between ABB-Welcome
systems. Please refer to the received messages while performing actions like ringing a
doorbell or opening a door.
.. code-block:: yaml
on_...:
- remote_transmitter.transmit_abbwelcome:
source_address: 0x1001 # your indoor station address
destination_address: 0x4001 # door address
three_byte_address: false # address length of your system
message_type: 0x0d # unlock door, on some systems 0x0e is used instead
data: [0xab, 0xcd, 0xef] # message data, see receiver dump
Configuration variables:
- **source_address** (**Required**, int):The source address to send the command from,
see received messages for more info. For indoor stations the last byte of the address
represents the apartment number set by the dials on the back of the indoor station and is
transmitted in hexadecimal format.
- **destination_address** (**Required**, int): The destination address to send the command to,
see received messages for more info.
- **three_byte_address** (**Required**, int): The destination address to send the command to,
see received messages for more info.
- **three_byte_address** (**Optional**, boolean): The length of the source and destination address. ``false``
means two bytes and ``true`` means three bytes. Please check the received messages to see which address length
is used by your system. For example, ``[XXXX > XXXX]`` appears in the receiver log for two byte addresses and
``[XXXXXX > XXXXXX]`` for three byte addresses. Defaults to ``false``.
- **retransmission** (**Optional**, boolean): Should only be ``true`` if this message has been transmitted
before with the same ``message_id``. Typically, messages are transmitted up to three times with a 1 second
interval if no reply is received. Defaults to ``false``.
- **message_type** (**Required**, int): The message type, see dumper output for more info.
The highest bit indicates a reply.
- **message_id** (**Optional**, int): The message ID, see dumper output for more info.
Defaults to a randomly generated ID if this message is not a reply or retransmission.
- **data** (**Optional**, 0-7 bytes list): The code to send.
Usually you only need to copy this directly from the dumper output. Defaults to ``[]``
.. note::
ABB-Welcome messages are sent over the two-wire bus of your intercom system.
A custom receiver and transmitter circuit is required.
`More info <https://github.com/Mat931/esp32-doorbell-bus-interface>`__
.. _remote_transmitter-transmit_aeha:
``remote_transmitter.transmit_aeha`` Action
@ -212,6 +273,30 @@ Configuration variables:
You can find a list of commands in the `LIRC project <https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/dishnet/Dish_Network.lircd.conf>`__.
.. _remote_transmitter-transmit_dooya:
``remote_transmitter.transmit_dooya`` Action
**********************************************
This :ref:`action <config-action>` sends a Dooya RF remote code to a remote transmitter.
.. code-block:: yaml
on_...:
- remote_transmitter.transmit_dooya:
id: 0x001612E5
channel: 142
button: 12
check: 3
Configuration variables:
- **id** (**Required**, int): The 24-bit ID to send. Each remote has a unique one.
- **channel** (**Required**, int): The 8-bit channel to send, between 0 and 255 inclusive.
- **button** (**Required**, int): The 4-bit button to send, between 0 and 15 inclusive.
- **check** (**Required**, int): The 4-bit check to send. Includes an indication that a button is being held down. See dumper output for more info.
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_drayton:
``remote_transmitter.transmit_drayton`` Action
@ -267,7 +352,7 @@ This :ref:`action <config-action>` sends KeeLoq RF remote code to a remote trans
code: '0xd19ef0a9'
repeat:
times: 3
wait_time: 15ms
wait_time: 15ms
Configuration variables:
@ -696,6 +781,29 @@ Configuration variables:
for more information.
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_roomba:
``remote_transmitter.transmit_roomba`` Action
*********************************************
This :ref:`action <config-action>` sends a Roomba infrared remote code to a remote transmitter.
.. code-block:: yaml
on_...:
- remote_transmitter.transmit_roomba:
data: 0x88 # clean
repeat:
times: 3
wait_time: 17ms
Configuration variables:
- **data** (**Required**, int): The Roomba code to send, see dumper output for more info.
- Note that ``repeat`` is still optional, however **Roomba vacuums require that a given code is received at least three times before they will act on it.** If your Roomba still does not respond to sent command increase this value.
- Note that ``wait_time`` is still optional; it will even work without this parameter, but Roomba Remote uses this 17 ms wait time between sent commands.
- All other options from :ref:`remote_transmitter-transmit_action`.
.. _remote_transmitter-transmit_samsung:
``remote_transmitter.transmit_samsung`` Action

View File

@ -10,6 +10,9 @@ This component contains platform-specific options for the RP2040 platform.
.. note::
Support for all aspects of ESPHome on the RP2040 is still in development.
Only the original model of Raspberry Pi Pico W board is supported, which has the Cypress **CYW43455** chip providing wireless connectivity. It can be identified by a metallic shield encapsulating the radio circuitry. Pico W boards with radio module chips like ESP8285 or similar (labelled as ``RP2040 Pico W-2023`` etc.), are not supported.
Please search for or create an `issue <https://github.com/esphome/issues/issues/new?assignees=&labels=&template=bug_report.yml>`__ if you encounter an unknown problem.
.. code-block:: yaml

View File

@ -0,0 +1,454 @@
Seeed Studio MR24HPC1 mmWave (Kit)
==================================
.. seo::
:description: Instructions for setting up MR24HPC1 mmWave (Kit).
:image: seeed-mr24hpc1.jpg
Component/Hub
-------------
The ``seeed_mr24hpc1`` platform allows you to use Seeed Studio 24GHz mmWave Sensor -
Human Static Presence Module Lite (`Product Page <https://www.seeedstudio.com/24GHz-mmWave-Sensor-Human-Static-Presence-Module-Lite-p-5524.html>`__) and
Seeed Studio mmWave Human Detection Sensor Kit (`Product Page <https://www.seeedstudio.com/mmWave-Human-Detection-Sensor-Kit-p-5773.html>`__) with ESPHome.
The :ref:`UART <uart>` is required to be set up in your configuration for this sensor to work, ``parity`` and ``stop_bits`` **must be** respectively ``NONE`` and ``1``.
You can use the ESP32 software or hardware serial to use this MR24HPC1, its default baud rate is 115200.
.. figure:: images/seeed-mr24hpc1.jpg
:align: center
:width: 50.0%
Seeed Studio 24GHz mmWave Sensor - Human Static Presence Module Lite
.. figure:: images/seeed-mr24hpc1-mmwave-kit.png
:align: center
:width: 50.0%
Seeed Studio mmWave Human Detection Sensor Kit
.. code-block:: yaml
# Example configuration entry
seeed_mr24hpc1:
Configuration variables:
************************
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this :doc:`seeed_mr24hpc1` component if you need multiple components.
Binary Sensor
-------------
The ``seeed_mr24hpc1`` binary sensor allows you to perform different measurements.
.. code-block:: yaml
binary_sensor:
- platform: seeed_mr24hpc1
has_target:
name: "Presence Information"
Configuration variables:
************************
- **has_target** (*Optional*): If true target detect either still or in movement.
All options from :ref:`Binary Sensor <config-binary_sensor>`.
Sensor
------
The ``seeed_mr24hpc1`` sensor allows you to perform different measurements.
.. code-block:: yaml
sensor:
- platform: seeed_mr24hpc1
custom_presence_of_detection:
name: "Static Distance"
movement_signs:
name: "Body Movement Parameter"
custom_motion_distance:
name: "Motion Distance"
custom_spatial_static_value:
name: "Existence Energy"
custom_spatial_motion_value:
name: "Motion Energy"
custom_motion_speed:
name: "Motion Speed"
custom_mode_num:
name: "Current Custom Mode"
.. _seeed_mr24hpc1-spatial_static:
.. _seeed_mr24hpc1-spatial_mtion:
Configuration variables:
************************
- **custom_presence_of_detection** (*Optional*, float): Valid only for :ref:`underlying open functions <seeed_mr24hpc1-open_function>`.
Radar detects human breath at a straight line distance, usually no more than 3 metres.
All options from :ref:`Sensor <config-sensor>`.
- **movement_signs** (*Optional*, int): A value calculated by a built-in algorithm to determine if someone is moving in the current environment.
When the value is 0, the radar determines that no one is present in the environment. When the value is 1,
the radar determines that someone is present in the environment and is stationary.
When the value is greater than 1, the radar determines that someone is present in the environment and is in motion.
The larger the value, the stronger the motion.
All options from :ref:`Sensor <config-sensor>`.
- **custom_motion_distance** (*Optional*, float): Valid only for :ref:`underlying open functions <seeed_mr24hpc1-open_function>`.
Distance in meters of detected moving target.
All options from :ref:`Sensor <config-sensor>`.
- **custom_spatial_static_value** (*Optional*, int): Valid only for :ref:`underlying open functions <seeed_mr24hpc1-open_function>`.
Electromagnetic waves are present in the environment, with a low change in frequency when no one is present.
The value of the overall space electromagnetic wave reflection weakly floating when there is someone breathing in the space (chest breathing micromotion).
The output range for this value is 0-250.
All options from :ref:`Sensor <config-sensor>`.
- **custom_spatial_motion_value** (*Optional*, int): Valid only for :ref:`underlying open functions <seeed_mr24hpc1-open_function>`.
Motion amplitude values, different motion amplitudes cause different electromagnetic wave frequency changes.
The output range for this value is 0-250.
All options from :ref:`Sensor <config-sensor>`.
- **custom_motion_speed** (*Optional*, float): Valid only for :ref:`underlying open functions <seeed_mr24hpc1-open_function>`.
The magnitude of the speed of the target movement is determined in real time. Approaching radar speed is positive, away is negative.
When there is no movement speed, the value is 0, and the speed gear is in 0.5m/s increments.
All options from :ref:`Sensor <config-sensor>`.
- **custom_mode_num** (*Optional*, int): The custom mode number that the radar is currently in. If it is not in custom mode, then the value is 0.
All options from :ref:`Sensor <config-sensor>`.
.. _seeed_mr24hpc1-open_function:
.. _seeed_mr24hpc1-standard_mode:
Switch
------
The ``seeed_mr24hpc1`` switch allows you to control your device.
.. code-block:: yaml
switch:
- platform: seeed_mr24hpc1
underlying_open_function:
name: Underlying Open Function Info Output Switch
Configuration variables:
************************
- **underlying_open_function** (*Optional*): Enable/disable **underlying open function**. When this switch is off, it indicates that it is currently in **standard mode**.
Defaults to off (standard mode). Turning on this feature allows you to observe more information about the environment and is recommended to use it
again in complex environments where the basic functionality is not sufficient. When this function is turned on, the stationary/motion and approach/away judgement of
the basic function will be disabled. Notice this requires more resources and is not recommended to be enabled when not necessary.
All options from :ref:`Switch <config-switch>`.
Number
------
The ``seeed_mr24hpc1`` number allows you to control the configuration.
.. code-block:: yaml
number:
- platform: seeed_mr24hpc1
sensitivity:
name: "Sensitivity"
custom_mode:
name: "Custom Mode"
existence_threshold:
name: "Existence Energy Threshold"
motion_threshold:
name: "Motion Energy Threshold"
motion_trigger:
name: "Motion Trigger Time"
motion_to_rest:
name: "Motion To Rest Time"
custom_unman_time:
name: "Time For Entering No Person State (Custom Mode)"
.. _seeed_mr24hpc1-custom_mode:
Configuration variables:
************************
- **sensitivity** (*Optional*, int): Valid only in :ref:`standard mode <seeed_mr24hpc1-standard_mode>`. Used to adjust the sensitivity of the radar.
The sensitivity setting adjusts the detection distance of the sensor for human body in static state.
There are 3 levels for sensitivity setting, with the default level being sensitivity 3.
All options from :ref:`Number <config-number>`.
.. list-table:: Sensitivity
:widths: 25 25
:header-rows: 1
* - Sensitivity
- Detection Radius (m)
* - 1
- 2.5m
* - 2
- 3m
* - 3
- 4m
- **custom_mode** (*Optional*, int): Settings and go to the Custom Mode option. Some of the function modules can only be set up in Custom Mode.
There are four storage areas for custom modes. When you finish setting and click the Setup End button, the radar applies the custom mode options you have set.
All options from :ref:`Number <config-number>`.
- **existence_threshold** (*Optional*, int): Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
This corresponds to :ref:`custom_spatial_static_value <seeed_mr24hpc1-spatial_static>`.
When the value of ``custom_spatial_static_value`` is greater than the set value, the radar will judge that someone is stationary,
otherwise it will judge that no one is.
The default value is ``33``.
All options from :ref:`Number <config-number>`.
- **motion_threshold** (*Optional*, int): Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
This corresponds to :ref:`custom_spatial_motion_value <seeed_mr24hpc1-spatial_mtion>`.
When the value of ``custom_spatial_motion_value`` is greater than the set value, the radar will judge that someone is moving,
otherwise it will judge that someone is stationary.
The default value is ``4``.
All options from :ref:`Number <config-number>`.
- **motion_trigger** (*Optional*, int): Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
Used for time accumulation of motion triggers, multiple judgement triggers to reduce false alarms.
Can be used with ``motion_threshold`` and ``motion_boundary`` for performance limitation.
The default value is ``150ms``.
All options from :ref:`Number <config-number>`.
- **motion_to_rest** (*Optional*, int): Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
Sets the time for the radar to judge from body motion to body at rest.
Can be used with ``existence_threshold`` and ``motion_threshold`` for performance limitation.
The default value is ``3000ms``.
All options from :ref:`Number <config-number>`.
- **custom_unman_time** (*Optional*, int): Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
Sets the time for the radar to judge from body presence to unoccupied state.
Can be used with ``existence_threshold`` and ``existence_boundary`` for performance limitation.
The default value is ``30s``.
All options from :ref:`Number <config-number>`.
Button
------
The ``seeed_mr24hpc1`` button allows you to perform actions.
.. code-block:: yaml
button:
- platform: seeed_mr24hpc1
restart:
name: "Module Restart"
custom_set_end:
name: "End Of Custom Mode Settings"
Configuration variables:
************************
- **restart**: Restart the device. All options from :ref:`Button <config-button>`.
- **custom_set_end**: Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
This button is used to end the current custom mode setting and enable that custom mode.
All options from :ref:`Button <config-button>`.
Text Sensor
-----------
The ``seeed_mr24hpc1`` text sensor allows you to get information about your device.
.. code-block:: yaml
text_sensor:
- platform: seeed_mr24hpc1
heart_beat:
name: "Heartbeat"
product_model:
name: "Product Model"
product_id:
name: "Product ID"
hardware_model:
name: "Hardware Model"
hardware_version:
name: "Hardware Version"
keep_away:
name: "Active Reporting Of Proximity"
motion_status:
name: "Motion Information"
custom_mode_end:
name: "Custom Mode Status"
Configuration variables:
************************
- **heart_beat** (*Optional*): Sensor operating status indicator.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **product_model** (*Optional*): The product model.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **product_id** (*Optional*): The product ID.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **hardware_model** (*Optional*): The hardware model.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **hardware_version** (*Optional*): The hardware version.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **keep_away** (*Optional*): Indicator for detecting objects approaching or moving away.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **motion_status** (*Optional*): An indicator that detects the movement or stationarity of an object.
All options from :ref:`Text Sensor <config-text_sensor>`.
- **custom_mode_end** (*Optional*): Used to indicate whether or not the current radar is in a customised mode amongst the setup functions.
There are three main statuses: "Not in custom mode", "Setup in progress..." and "Set Success!".
All options from :ref:`Text Sensor <config-text_sensor>`.
Select
-----------
The ``seeed_mr24hpc1`` select allows you to control the configuration.
.. code-block:: yaml
select:
- platform: seeed_mr24hpc1
scene_mode:
name: "Scene"
unman_time:
name: "Time For Entering No Person State (Standard Function)"
existence_boundary:
name: "Existence Boundary"
motion_boundary:
name: "Motion Boundary"
Configuration variables:
************************
- **scene_mode**: Valid only in :ref:`standard mode <seeed_mr24hpc1-standard_mode>`. Used to select a preset scene in standard mode.
The function of scene mode is to adjust the maximum detection range of the sensor to recognize human movements (Maximum detection distance of the sensor).
There are 4 modes for scene mode, with the default mode being the living room mode. The detection range values for each scene mode are in the following table.
All options from :ref:`Select <config-select>`.
.. list-table:: Scene mode
:widths: 25 25
:header-rows: 1
* - Scene mode
- Detection Radius (m)
* - Living room
- 4m - 4.5m
* - Bedroom
- 3.5m - 4m
* - Bathroom
- 2.5m - 3m
* - Area detection
- 3m - 3.5m
- **unman_time**: Valid only in :ref:`standard mode <seeed_mr24hpc1-standard_mode>`.
Same as ``custom_unman_time``, but this setting is only valid in standard mode.
All options from :ref:`Select <config-select>`.
- **existence_boundary**: Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
The distance to the farthest stationary target detected by the radar. Used to reduce radar false alarms. Reduces interference outside the detection range.
The default value is ``5m``.
All options from :ref:`Select <config-select>`.
- **motion_boundary**: Valid only in :ref:`custom mode settings <seeed_mr24hpc1-custom_mode>`.
The distance to the furthest moving target detected by the radar. Used to reduce radar false alarms.
Reduces the detection range of out-of-range doors, glass interference from moving objects outside the door.
The default value is ``5m``.
All options from :ref:`Select <config-select>`.
Home Assistant Card
-------------------
For a more intuitive view of the sensor data, you can use the customised card below.
.. code-block:: yaml
- type: horizontal-stack
cards:
- type: entities
entities:
- entity: button.{$DEVICE}_module_restart
name: Module Restart
- entity: sensor.{$DEVICE}_hardware_model
name: Hardware Model
- entity: sensor.{$DEVICE}_hardware_version
name: Hardware Version
- entity: sensor.{$DEVICE}_heartbeat
name: Heartbeat
- entity: sensor.{$DEVICE}_product_id
name: Product ID
- entity: sensor.{$DEVICE}_product_model
name: Product Model
title: {$DEVICE} Information
- type: vertical-stack
cards:
- type: entities
entities:
- entity: select.{$DEVICE}_scene
name: Scene
- entity: number.{$DEVICE}_sensitivity
name: Sensitivity
- entity: select.{$DEVICE}_time_for_entering_no_person_state_standard_function
name: Time For Entering No Person State Setting (Standard Function)
- entity: binary_sensor.{$DEVICE}_presence_information
name: Presence Information
- entity: sensor.{$DEVICE}_motion_information
name: Motion Information
- entity: sensor.{$DEVICE}_body_movement_parameter
name: Body Movement Parameter
- entity: sensor.{$DEVICE}_active_reporting_of_proximity
name: Active Reporting Of Proximity
title: Unsolicited Information
- type: horizontal-stack
cards:
- type: entities
entities:
- entity: switch.{$DEVICE}_underlying_open_function_info_output_switch
name: Underlying Open Function Info Output Switch
- entity: sensor.{$DEVICE}_existence_energy
name: Existence Energy
- entity: sensor.{$DEVICE}_motion_energy
name: Motion Energy
- entity: sensor.{$DEVICE}_static_distance
name: Static Distance
- entity: sensor.{$DEVICE}_motion_distance
name: Motion Distance
- entity: sensor.{$DEVICE}_motion_speed
name: Motion Speed
title: Underlying Open Function
- type: horizontal-stack
cards:
- type: entities
entities:
- entity: sensor.{$DEVICE}_custom_mode_status
name: Custom Mode Status
- entity: number.{$DEVICE}_custom_mode
name: Custom Mode
- entity: sensor.{$DEVICE}_current_custom_mode
name: Current Custom Mode
- entity: button.{$DEVICE}_end_of_custom_mode_settings
name: End Of Custom Mode Settings
- entity: select.{$DEVICE}_existence_boundary
name: Existence Boundary
- entity: select.{$DEVICE}_motion_boundary
name: Motion Boundary
- entity: number.{$DEVICE}_existence_energy_threshold
name: Existence Energy Threshold
- entity: number.{$DEVICE}_motion_energy_threshold
name: Motion Energy Threshold
- entity: number.{$DEVICE}_motion_trigger_time
name: Motion Trigger Time
- entity: number.{$DEVICE}_motion_to_rest_time
name: Motion To Rest Time
- entity: number.{$DEVICE}_time_for_entering_no_person_state_custom_mode
name: Time For Entering No Person State (Custom Mode)
title: Custom Settings
Then replace all instances of ``{$DEVICE}`` with your device name
The result:
.. figure:: images/seeed-mr24hpc1-card.png
:align: center
See Also
--------
- `Official Using Documents for Seeed Studio 24GHz mmWave Sensor - Human Static Presence Module Lite <https://wiki.seeedstudio.com/Radar_MR24HPC1/>`_
- `Official Using Documents for Seeed Studio mmWave Human Detection Sensor Kit <https://wiki.seeedstudio.com/mmwave_human_detection_kit/>`_
- `Product Detail Page for Seeed Studio 24GHz mmWave Sensor - Human Static Presence Module Lite <https://www.seeedstudio.com/24GHz-mmWave-Sensor-Human-Static-Presence-Module-Lite-p-5524.html>`_
- `Product Detail Page for Seeed Studio mmWave Human Detection Sensor Kit <https://www.seeedstudio.com/mmWave-Human-Detection-Sensor-Kit-p-5773.html>`_
- `Source of inspiration for implementation <https://github.com/limengdu/mmwave-kit-external-components/>`_
- :apiref:`seeed_mr24hpc1/seeed_mr24hpc1.h`
- :ghedit:`Edit`

View File

@ -43,10 +43,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.
Automations:
@ -70,7 +70,7 @@ For more information on using lambdas with select, see :ref:`select-lambda_calls
``on_value``
************
This automation will be triggered when a new value is published. In :ref:`Lambdas <config-lambda>`
This automation will be triggered whenever a value is set/published, even if the value is the same as before. In :ref:`Lambdas <config-lambda>`
you can get the value from the trigger with ``x`` and the index offset of the selected value with ``i``.
.. code-block:: yaml
@ -281,6 +281,14 @@ advanced stuff (see the full API Reference for more info).
auto state = id(my_select).state.c_str();
ESP_LOGI("main", "Option of my select: %s", state);
.. code-block:: yaml
# Check if a specific option is selected
- if:
condition:
- lambda: 'return id(my_select).state == "my_option_value";'
- ``.size()``: Retrieve the number of options in the select.
.. code-block:: cpp

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