2
Doxygen
@ -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.4.2
|
||||
PROJECT_NUMBER = 2024.5.0
|
||||
|
||||
# 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
|
||||
|
2
Makefile
@ -1,5 +1,5 @@
|
||||
ESPHOME_PATH = ../esphome
|
||||
ESPHOME_REF = 2024.4.2
|
||||
ESPHOME_REF = 2024.5.0
|
||||
|
||||
.PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify
|
||||
|
||||
|
BIN
_static/changelog-2024.5.0.png
Normal file
After Width: | Height: | Size: 127 KiB |
@ -1 +1 @@
|
||||
2024.4.2
|
||||
2024.5.0
|
277
changelog/2024.5.0.rst
Normal file
@ -0,0 +1,277 @@
|
||||
ESPHome 2024.5.0 - 15th May 2024
|
||||
================================
|
||||
|
||||
.. seo::
|
||||
:description: Changelog for ESPHome 2024.5.0.
|
||||
:image: /_static/changelog-2024.5.0.png
|
||||
:author: Jesse Hills
|
||||
:author_twitter: @jesserockz
|
||||
|
||||
.. imgtable::
|
||||
:columns: 3
|
||||
|
||||
|
||||
Valve Core, components/valve/index, folder-open.svg, dark-invert
|
||||
Template Valve, components/valve/template, description.svg, dark-invert
|
||||
Event Core, components/event/index, folder-open.svg, dark-invert
|
||||
Template Event, components/event/template, description.svg, dark-invert
|
||||
Template Time, components/datetime/template, description.svg, dark-invert
|
||||
Template Datetime, components/datetime/template, description.svg, dark-invert
|
||||
WeiKai SPI/I²C UART/IO Expander, components/weikai, wk2168.jpg
|
||||
|
||||
Valves, Events, and More
|
||||
------------------------
|
||||
|
||||
This release brings a new ``Valve`` component, which can be used to control valves.
|
||||
A ``Valve`` can be opened, closed, or a specific position set if supported.
|
||||
|
||||
``Event`` entities were added to Home Assistant in `2023.8 <https://www.home-assistant.io/blog/2023/08/02/release-20238/#introducing-the-event-entity>`__.
|
||||
They allow better structure and also history and logging of the events sent from ESPHome to Home Assistant compared to just using publishing events onto the
|
||||
Home Assistant event bus with the ``homeassistant.event`` action.
|
||||
|
||||
ESP32 ADC Attenuation
|
||||
---------------------
|
||||
|
||||
The attenuation configuration option for ESP32 ``adc`` sensors has had a deprecation in the underlying ESP-IDF framework with the ``11dB`` option.
|
||||
The value to replace ``11dB`` with is ``12dB``. There are no functionality changes otherwise. There will be a warning in the logs when installing if you
|
||||
are using ``11dB`` and it will be removed in **2024.8.0**.
|
||||
|
||||
Full list of changes
|
||||
--------------------
|
||||
|
||||
New Components
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
- Add valve component :esphomepr:`6447` by :ghuser:`kbx81` (new-integration)
|
||||
- Add the WeiKai SPI/I2C UART/IO Expander components to esphome :esphomepr:`5218` by :ghuser:`DrCoolzic` (new-integration)
|
||||
- Event entity support :esphomepr:`6451` by :ghuser:`nohat` (new-integration)
|
||||
- SPI and I2C for BMP390 and BMP380 :esphomepr:`6652` by :ghuser:`latonita` (new-integration) (breaking-change)
|
||||
|
||||
Breaking Changes
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
- Add DNS sensor and simplify format :esphomepr:`6450` by :ghuser:`HeMan` (breaking-change)
|
||||
- SM2135 - Use standard channel ordering. :esphomepr:`6573` by :ghuser:`Cossid` (breaking-change)
|
||||
- [sn74hc595] Enforce type field to distinguish gpio vs spi mode :esphomepr:`6609` by :ghuser:`jesserockz` (breaking-change)
|
||||
- Add datetime entities :esphomepr:`6513` by :ghuser:`jesserockz` (breaking-change)
|
||||
- SPI and I2C for BMP390 and BMP380 :esphomepr:`6652` by :ghuser:`latonita` (new-integration) (breaking-change)
|
||||
|
||||
Beta Changes
|
||||
^^^^^^^^^^^^
|
||||
|
||||
- [github] Upgrade to actions/[upload,download]-artifact v4 :esphomepr:`6698` by :ghuser:`jesserockz`
|
||||
- [nextion] Replace flags to ``USE_ARDUINO`` :esphomepr:`6700` by :ghuser:`edwardtfn`
|
||||
- [remote_receiver, remote_transmitter] Improve error messages on the ESP32 :esphomepr:`6701` by :ghuser:`Mat931`
|
||||
- [ethernet] Use constexpr instead of inline define for KSZ80XX_PC2R_REG_ADDR :esphomepr:`6705` by :ghuser:`jesserockz`
|
||||
- Add PHY register writes to enable external clock on Ethernet with RTL8201 :esphomepr:`6704` by :ghuser:`heythisisnate`
|
||||
- Bump recommended ESP-IDF to 4.4.7 :esphomepr:`6703` by :ghuser:`bdraco`
|
||||
- [core] Ensure that a generated ID name is distinct from its type. :esphomepr:`6706` by :ghuser:`clydebarrow`
|
||||
- [color] Fix crash when hex color parses as int, improve error reporting. :esphomepr:`6707` by :ghuser:`clydebarrow`
|
||||
- [github] Fix digest artifact name :esphomepr:`6710` by :ghuser:`jesserockz`
|
||||
- fix(ltr390): stuck ALS values when configured for ALS+UV readings :esphomepr:`6723` by :ghuser:`CodeInPolish`
|
||||
- Set FEATURE_API_AUDIO flag also if the speaker component is not used :esphomepr:`6712` by :ghuser:`gnumpi`
|
||||
- Bump platformio from 6.1.13 to 6.1.15 :esphomepr:`6634` by :ghuser:`dependabot[bot]`
|
||||
- Fix ESPHOME_PROJECT_VERSION_30 :esphomepr:`6731` by :ghuser:`jesserockz`
|
||||
- Voice-Assistant: Start-order change for VAD disabled: start va-pipeline when microphon… :esphomepr:`6391` by :ghuser:`gnumpi`
|
||||
- Add ANNOUNCING state to media_player. :esphomepr:`6691` by :ghuser:`gnumpi`
|
||||
- [adc] Fix 11db deprecation warning :esphomepr:`6749` by :ghuser:`jesserockz` (notable-change)
|
||||
|
||||
Notable Changes
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
- [adc] Fix 11db deprecation warning :esphomepr:`6749` by :ghuser:`jesserockz` (notable-change)
|
||||
|
||||
All changes
|
||||
^^^^^^^^^^^
|
||||
|
||||
- Add some components to the new testing framework (H) :esphomepr:`6179` by :ghuser:`kbx81`
|
||||
- Added Htu21d model option :esphomepr:`6511` by :ghuser:`MRemy2`
|
||||
- Add bk72xx base test file :esphomepr:`6522` by :ghuser:`jesserockz`
|
||||
- Add "log" alias for "logs" command :esphomepr:`6519` by :ghuser:`pzich`
|
||||
- Add DNS sensor and simplify format :esphomepr:`6450` by :ghuser:`HeMan` (breaking-change)
|
||||
- Add all missing ``remote_receiver`` ``on_...`` tests :esphomepr:`6524` by :ghuser:`kbx81`
|
||||
- Add actions to http_request tests :esphomepr:`6529` by :ghuser:`kbx81`
|
||||
- Update homeassistant component tests with actions :esphomepr:`6528` by :ghuser:`kbx81`
|
||||
- Define ``USE_PSRAM`` :esphomepr:`6526` by :ghuser:`edwardtfn`
|
||||
- Bump black from 24.2.0 to 24.4.0 :esphomepr:`6539` by :ghuser:`dependabot[bot]`
|
||||
- Bump peter-evans/create-pull-request from 6.0.2 to 6.0.3 :esphomepr:`6525` by :ghuser:`dependabot[bot]`
|
||||
- Bump python version in sync-device-classes workflow to 3.12 for HA :esphomepr:`6541` by :ghuser:`jesserockz`
|
||||
- Bump pylint from 3.0.3 to 3.1.0 :esphomepr:`6287` by :ghuser:`dependabot[bot]`
|
||||
- Bump aioesphomeapi from 23.2.0 to 24.0.0 :esphomepr:`6544` by :ghuser:`dependabot[bot]`
|
||||
- Bump pyupgrade from 3.15.1 to 3.15.2 :esphomepr:`6543` by :ghuser:`dependabot[bot]`
|
||||
- Add enum option to typed_schema :esphomepr:`6546` by :ghuser:`jesserockz`
|
||||
- Move esphome-fork startup script to main repo. :esphomepr:`6523` by :ghuser:`jesserockz`
|
||||
- Call workflow for addon with dev version :esphomepr:`6549` by :ghuser:`jesserockz`
|
||||
- Use trusted publishing token for pypi :esphomepr:`6545` by :ghuser:`jesserockz`
|
||||
- Fix uart to work with new enum definition in esp-idf-v5.2.1 :esphomepr:`6487` by :ghuser:`luar123`
|
||||
- Housecleaning: Use walrus operator in datetime :esphomepr:`6552` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in text :esphomepr:`6560` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in light :esphomepr:`6556` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in select :esphomepr:`6557` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in number :esphomepr:`6561` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in cover :esphomepr:`6562` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in climate :esphomepr:`6551` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in fan :esphomepr:`6555` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in text_sensor :esphomepr:`6559` by :ghuser:`jesserockz`
|
||||
- Bump zeroconf to 0.132.2 :esphomepr:`6548` by :ghuser:`bdraco`
|
||||
- Housecleaning: Use walrus operator in switch :esphomepr:`6558` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in lock :esphomepr:`6554` by :ghuser:`jesserockz`
|
||||
- Housecleaning: Use walrus operator in sensor :esphomepr:`6553` by :ghuser:`jesserockz`
|
||||
- Bump pytest-mock from 3.12.0 to 3.14.0 :esphomepr:`6572` by :ghuser:`dependabot[bot]`
|
||||
- Bump peter-evans/create-pull-request from 6.0.3 to 6.0.4 :esphomepr:`6569` by :ghuser:`dependabot[bot]`
|
||||
- Nextion - Review set_protocol_reparse_mode() :esphomepr:`6567` by :ghuser:`edwardtfn`
|
||||
- Allow component final_validate :esphomepr:`6475` by :ghuser:`kbx81`
|
||||
- SM2135 - Use standard channel ordering. :esphomepr:`6573` by :ghuser:`Cossid` (breaking-change)
|
||||
- Nextion - Do not refresh sensors while updating :esphomepr:`6566` by :ghuser:`edwardtfn`
|
||||
- Nextion - Review types :esphomepr:`6565` by :ghuser:`edwardtfn`
|
||||
- On failure, dump the output of preceding jobs in CI status :esphomepr:`6564` by :ghuser:`clydebarrow`
|
||||
- Nextion ``send_command`` method :esphomepr:`6540` by :ghuser:`edwardtfn`
|
||||
- Fix some printf formats for size_t. :esphomepr:`6542` by :ghuser:`clydebarrow`
|
||||
- remove delay from tmp102 :esphomepr:`6577` by :ghuser:`ssieb`
|
||||
- Create ``component_dir`` substitution for local files to be included in… :esphomepr:`6575` by :ghuser:`jesserockz`
|
||||
- Define ``USE_ESP32_BLE`` :esphomepr:`6585` by :ghuser:`edwardtfn`
|
||||
- Bump aioesphomeapi from 24.0.0 to 24.3.0 :esphomepr:`6602` by :ghuser:`dependabot[bot]`
|
||||
- Add yamllint and clang-format to pre-commit hooks :esphomepr:`6578` by :ghuser:`clydebarrow`
|
||||
- Use clang-format version from requirements_dev file :esphomepr:`6606` by :ghuser:`jesserockz`
|
||||
- Add some components to the new testing framework (P) :esphomepr:`6213` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (M part 1) :esphomepr:`6207` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (M part 2) :esphomepr:`6208` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (O) :esphomepr:`6211` by :ghuser:`kbx81`
|
||||
- [mopeka_std_check] Fix test file indentation :esphomepr:`6610` by :ghuser:`jesserockz`
|
||||
- Add valve component :esphomepr:`6447` by :ghuser:`kbx81` (new-integration)
|
||||
- Add some components to the new testing framework (R) :esphomepr:`6219` by :ghuser:`kbx81`
|
||||
- [sn74hc595] Enforce type field to distinguish gpio vs spi mode :esphomepr:`6609` by :ghuser:`jesserockz` (breaking-change)
|
||||
- [tests] Run yaml tests in groups if over 100 to run :esphomepr:`6612` by :ghuser:`jesserockz`
|
||||
- Add some components to the new testing framework (I) :esphomepr:`6185` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (T) :esphomepr:`6229` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (S part 1) :esphomepr:`6224` by :ghuser:`kbx81`
|
||||
- Add some components to the new testing framework (S part 2) :esphomepr:`6227` by :ghuser:`kbx81`
|
||||
- ``graphical_display_menu`` requires a Display, not DisplayBuffer :esphomepr:`6614` by :ghuser:`clydebarrow`
|
||||
- Add null GPIO pin :esphomepr:`6611` by :ghuser:`clydebarrow`
|
||||
- Allow UART to be AUTO LOADed :esphomepr:`6617` by :ghuser:`jesserockz`
|
||||
- Add the WeiKai SPI/I2C UART/IO Expander components to esphome :esphomepr:`5218` by :ghuser:`DrCoolzic` (new-integration)
|
||||
- Sort mqtt_const alphabetically :esphomepr:`6619` by :ghuser:`jesserockz`
|
||||
- Limit Rx wait loop time to 3 seconds. :esphomepr:`6594` by :ghuser:`descipher`
|
||||
- Event entity support :esphomepr:`6451` by :ghuser:`nohat` (new-integration)
|
||||
- Only check c/c++ files with clang-format :esphomepr:`6620` by :ghuser:`jesserockz`
|
||||
- Added base64 helper :esphomepr:`4866` by :ghuser:`freekode`
|
||||
- Add Roomba IR protocol :esphomepr:`4595` by :ghuser:`rforro`
|
||||
- Fix issue when setting cw/ww brightness via temperature :esphomepr:`5976` by :ghuser:`patagonaa`
|
||||
- Add get/set color temperature functions in Kelvin :esphomepr:`5006` by :ghuser:`danielkent-net`
|
||||
- Move CONF_PLATFORM_VERSION to global const.py :esphomepr:`6629` by :ghuser:`tomaszduda23`
|
||||
- Ble client fixes for proxy :esphomepr:`6596` by :ghuser:`elupus`
|
||||
- Fix for #6614- use background_color, improve anti-aliasing :esphomepr:`6618` by :ghuser:`clydebarrow`
|
||||
- Fix graph hangs when y <= 0 :esphomepr:`6593` by :ghuser:`chiahsing`
|
||||
- Feature add last_operation to time based cover :esphomepr:`6084` by :ghuser:`xprofiler`
|
||||
- Add ``event``, ``text_sensor`` and ``valve`` device classes to sync script :esphomepr:`6624` by :ghuser:`kbx81`
|
||||
- Add datetime entities :esphomepr:`6513` by :ghuser:`jesserockz` (breaking-change)
|
||||
- Multiple Daly-BMS support :esphomepr:`6615` by :ghuser:`latonita`
|
||||
- Remove text_sensor from sync-device-class job :esphomepr:`6637` by :ghuser:`kbx81`
|
||||
- Synchronise Device Classes from Home Assistant :esphomepr:`6638` by :ghuser:`esphomebot`
|
||||
- Display: add diagnostic test_card option :esphomepr:`6608` by :ghuser:`nielsnl68`
|
||||
- waveshare_epaper: Add 2.90in-dke :esphomepr:`6492` by :ghuser:`polyfloyd`
|
||||
- Extract core comments from #6241 :esphomepr:`6643` by :ghuser:`javawizard`
|
||||
- [hm3301] Updated the AQI based on the airnow document :esphomepr:`6004` by :ghuser:`optimusprimespace`
|
||||
- Fix command line substitutions without any yaml substitutions :esphomepr:`6644` by :ghuser:`jesserockz`
|
||||
- Allow platform dependencies :esphomepr:`6623` by :ghuser:`kbx81`
|
||||
- [light] Add transition_length to strobe effect. :esphomepr:`6595` by :ghuser:`lhartmann`
|
||||
- Fixed the issue that graph draws out of the boundary. :esphomepr:`6651` by :ghuser:`chiahsing`
|
||||
- Fix upload command. MQTT user and password is missing from configuration. #5093 :esphomepr:`5766` by :ghuser:`dylan09`
|
||||
- patch esphome cli to skip mqtt based device discovery if --device option is specified :esphomepr:`6371` by :ghuser:`quigleymd`
|
||||
- Fix for #4866 - inconsistent arguments :esphomepr:`6639` by :ghuser:`clydebarrow`
|
||||
- [template/text] Fix lambda config :esphomepr:`6655` by :ghuser:`asergunov`
|
||||
- web_server: Add support for v3 local server_index :esphomepr:`6563` by :ghuser:`pzich`
|
||||
- Update webserver local assets to 20240429-211523 :esphomepr:`6657` by :ghuser:`esphomebot`
|
||||
- [nextion] Exit reparse before update TFT :esphomepr:`6589` by :ghuser:`edwardtfn`
|
||||
- [nextion] Set alternative TFT update baud rate :esphomepr:`6587` by :ghuser:`edwardtfn`
|
||||
- [TM1637] Let turn off the display :esphomepr:`6656` by :ghuser:`asergunov`
|
||||
- [nextion] Use persistent http connection for TFT upload (Arduino) :esphomepr:`6582` by :ghuser:`edwardtfn`
|
||||
- Extend MQTT tests :esphomepr:`6648` by :ghuser:`kbx81`
|
||||
- Extend and consolidate ``script`` tests :esphomepr:`6663` by :ghuser:`kbx81`
|
||||
- [nextion] Use persistent http connection for TFT upload (ESP-IDF) :esphomepr:`6576` by :ghuser:`edwardtfn`
|
||||
- Add a function to return the loop_interval :esphomepr:`6666` by :ghuser:`tronikos`
|
||||
- Remote receiver improvements :esphomepr:`4642` by :ghuser:`Mat931`
|
||||
- Make fast update intervals in qmc5883l work :esphomepr:`6647` by :ghuser:`tronikos`
|
||||
- SPI and I2C for BMP390 and BMP380 :esphomepr:`6652` by :ghuser:`latonita` (new-integration) (breaking-change)
|
||||
- Set ``CONF_`` CI counter to fail on 3 or more definitions :esphomepr:`6668` by :ghuser:`jesserockz`
|
||||
- [core] Rename ALWAYS_INLINE to ESPHOME_ALWAYS_INLINE :esphomepr:`6636` by :ghuser:`tomaszduda23`
|
||||
- print task name if logger is called from other than main thread :esphomepr:`6630` by :ghuser:`tomaszduda23`
|
||||
- Fix recent definitions into `defines.h` :esphomepr:`6667` by :ghuser:`edwardtfn`
|
||||
- Add fast update to HMC5883L :esphomepr:`6669` by :ghuser:`mkmer`
|
||||
- Minor tidy up of BME280 code :esphomepr:`6672` by :ghuser:`latonita`
|
||||
- External components: optional configurable path for git source :esphomepr:`6677` by :ghuser:`twasilczyk`
|
||||
- Use clang-apply-replacements when clang-apply-replacements-14 does not exist :esphomepr:`6684` by :ghuser:`Links2004`
|
||||
- fix conflict with EMPTY macro in zephyr :esphomepr:`6679` by :ghuser:`tomaszduda23`
|
||||
- Bump actions/checkout from 4.1.1 to 4.1.5 :esphomepr:`6685` by :ghuser:`dependabot[bot]`
|
||||
- Fix Datetime-Datetime compiler error :esphomepr:`6686` by :ghuser:`RFDarter`
|
||||
- Bump esphome/ESPAsyncWebServer-esphome to 3.2.0 :esphomepr:`6687` by :ghuser:`jesserockz`
|
||||
- fix date_time validation :esphomepr:`6688` by :ghuser:`RFDarter`
|
||||
- proceed if AP mode is set up :esphomepr:`6631` by :ghuser:`ssieb`
|
||||
- Migrate some constants to core code :esphomepr:`6692` by :ghuser:`clydebarrow`
|
||||
- Consolidate test files where all tests are identical :esphomepr:`6690` by :ghuser:`kbx81`
|
||||
- Make ``pulse_meter`` PULSE filter report the pulse as soon as it can :esphomepr:`6014` by :ghuser:`TrentHouliston`
|
||||
- Update webserver local assets to 20240507-231331 :esphomepr:`6696` by :ghuser:`esphomebot`
|
||||
- [github] Upgrade to actions/[upload,download]-artifact v4 :esphomepr:`6698` by :ghuser:`jesserockz`
|
||||
- [nextion] Replace flags to ``USE_ARDUINO`` :esphomepr:`6700` by :ghuser:`edwardtfn`
|
||||
- [remote_receiver, remote_transmitter] Improve error messages on the ESP32 :esphomepr:`6701` by :ghuser:`Mat931`
|
||||
- [ethernet] Use constexpr instead of inline define for KSZ80XX_PC2R_REG_ADDR :esphomepr:`6705` by :ghuser:`jesserockz`
|
||||
- Add PHY register writes to enable external clock on Ethernet with RTL8201 :esphomepr:`6704` by :ghuser:`heythisisnate`
|
||||
- Bump recommended ESP-IDF to 4.4.7 :esphomepr:`6703` by :ghuser:`bdraco`
|
||||
- [core] Ensure that a generated ID name is distinct from its type. :esphomepr:`6706` by :ghuser:`clydebarrow`
|
||||
- [color] Fix crash when hex color parses as int, improve error reporting. :esphomepr:`6707` by :ghuser:`clydebarrow`
|
||||
- [github] Fix digest artifact name :esphomepr:`6710` by :ghuser:`jesserockz`
|
||||
- fix(ltr390): stuck ALS values when configured for ALS+UV readings :esphomepr:`6723` by :ghuser:`CodeInPolish`
|
||||
- Set FEATURE_API_AUDIO flag also if the speaker component is not used :esphomepr:`6712` by :ghuser:`gnumpi`
|
||||
- Bump platformio from 6.1.13 to 6.1.15 :esphomepr:`6634` by :ghuser:`dependabot[bot]`
|
||||
- Fix ESPHOME_PROJECT_VERSION_30 :esphomepr:`6731` by :ghuser:`jesserockz`
|
||||
- Voice-Assistant: Start-order change for VAD disabled: start va-pipeline when microphon… :esphomepr:`6391` by :ghuser:`gnumpi`
|
||||
- Add ANNOUNCING state to media_player. :esphomepr:`6691` by :ghuser:`gnumpi`
|
||||
- [adc] Fix 11db deprecation warning :esphomepr:`6749` by :ghuser:`jesserockz` (notable-change)
|
||||
|
||||
Past Changelogs
|
||||
---------------
|
||||
|
||||
- :doc:`2024.4.0`
|
||||
- :doc:`2024.3.0`
|
||||
- :doc:`2024.2.0`
|
||||
- :doc:`2023.12.0`
|
||||
- :doc:`2023.11.0`
|
||||
- :doc:`2023.10.0`
|
||||
- :doc:`2023.9.0`
|
||||
- :doc:`2023.8.0`
|
||||
- :doc:`2023.7.0`
|
||||
- :doc:`2023.6.0`
|
||||
- :doc:`2023.5.0`
|
||||
- :doc:`2023.4.0`
|
||||
- :doc:`2023.3.0`
|
||||
- :doc:`2023.2.0`
|
||||
- :doc:`2022.12.0`
|
||||
- :doc:`2022.11.0`
|
||||
- :doc:`2022.10.0`
|
||||
- :doc:`2022.9.0`
|
||||
- :doc:`2022.8.0`
|
||||
- :doc:`2022.6.0`
|
||||
- :doc:`2022.5.0`
|
||||
- :doc:`2022.4.0`
|
||||
- :doc:`2022.3.0`
|
||||
- :doc:`2022.2.0`
|
||||
- :doc:`2022.1.0`
|
||||
- :doc:`2021.12.0`
|
||||
- :doc:`2021.11.0`
|
||||
- :doc:`2021.10.0`
|
||||
- :doc:`2021.9.0`
|
||||
- :doc:`2021.8.0`
|
||||
- :doc:`v1.20.0`
|
||||
- :doc:`v1.19.0`
|
||||
- :doc:`v1.18.0`
|
||||
- :doc:`v1.17.0`
|
||||
- :doc:`v1.16.0`
|
||||
- :doc:`v1.15.0`
|
||||
- :doc:`v1.14.0`
|
||||
- :doc:`v1.13.0`
|
||||
- :doc:`v1.12.0`
|
||||
- :doc:`v1.11.0`
|
||||
- :doc:`v1.10.0`
|
||||
- :doc:`v1.9.0`
|
||||
- :doc:`v1.8.0`
|
||||
- :doc:`v1.7.0`
|
@ -2,7 +2,7 @@ Changelog
|
||||
=========
|
||||
|
||||
.. redirect::
|
||||
:url: /changelog/2024.4.0.html
|
||||
:url: /changelog/2024.5.0.html
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
|
@ -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
|
||||
--------
|
||||
|
@ -47,17 +47,22 @@ Configuration variables:
|
||||
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>`.
|
||||
|
||||
Datetime Automation
|
||||
-------------------
|
||||
Time and DateTime Options:
|
||||
|
||||
You can access the most recent state as a string of the datetime in :ref:`lambdas <config-lambda>` using
|
||||
``id(datetime_id).state``.
|
||||
You can also access it as a ``ESPTime`` object by ``id(datetime_id).state_as_time``
|
||||
- **on_time** (*Optional*, :ref:`automation`): Automation to run when the current datetime or time matches the current state.
|
||||
Only valid on ``time`` or ``datetime`` types.
|
||||
|
||||
Automation
|
||||
----------
|
||||
|
||||
You can access the most recent state as a ``ESPTime`` object by ``id(datetime_id).state_as_esptime()``
|
||||
|
||||
.. _datetime-on_value:
|
||||
|
||||
@ -225,6 +230,84 @@ advanced stuff (see the full API Reference for more info).
|
||||
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
|
||||
--------
|
||||
|
||||
@ -233,6 +316,8 @@ See Also
|
||||
- :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::
|
||||
|
@ -29,6 +29,15 @@ using :ref:`lambdas <config-lambda>`.
|
||||
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:
|
||||
------------------------
|
||||
|
||||
@ -72,6 +81,21 @@ Configuration variables:
|
||||
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
|
||||
|
BIN
components/display/images/test_card.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
@ -935,49 +935,30 @@ Additionally the old page will be given as the variable ``from`` and the new one
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
Color Test Pattern
|
||||
------------------
|
||||
Using the Color Test Card
|
||||
-------------------------
|
||||
|
||||
If you're experiencing issues with your color display, the script below can help you to identify what might be wrong.
|
||||
It will show 3 color bars in **RED**, **GREEN** and **BLUE**. To help the graphics display team determine
|
||||
the best way to help you, **a picture of the result of this script is very helpful.**
|
||||
If you're experiencing issues with your color display, the ``show_test_card: true`` option can help you to identify what might be wrong.
|
||||
|
||||
- It will show bars for Red, Green and Blue, graduating to black and white.
|
||||
- Together with that it will show the letters "**R**", "**G**" and "**B**" to validate the display geometry.
|
||||
- There will be a rectangle around the corners of the display with a marker at the 0,0 corner which should be at the top left of the screen.
|
||||
|
||||
.. figure:: images/test_card.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
|
||||
|
||||
When all points above are shown correctly then the display is working as expected.
|
||||
To help the graphics display team determine the best way to help you, **a picture of the result of this option is very helpful.**
|
||||
|
||||
Should you `create an issue <https://github.com/esphome/issues/issues>`__ in GitHub regarding your display, please
|
||||
be sure to **include a link to where you purchased it** so that we can validate the configuration you've used.
|
||||
be sure to **include a link to where you purchased the display** so that we can validate the configuration you've used.
|
||||
|
||||
.. code-block:: yaml
|
||||
.. note::
|
||||
|
||||
display:
|
||||
- platform: ...
|
||||
...
|
||||
lambda: |-
|
||||
int shift_x = (it.get_width()-310)/2;
|
||||
int shift_y = (it.get_height()-256)/2;
|
||||
for(auto i = 0; i<256; i++) {
|
||||
it.horizontal_line(shift_x+ 0,i+shift_y,50, my_red.fade_to_white(i));
|
||||
it.horizontal_line(shift_x+ 50,i+shift_y,50, my_red.fade_to_black(i));
|
||||
|
||||
it.horizontal_line(shift_x+105,i+shift_y,50, my_green.fade_to_white(i));
|
||||
it.horizontal_line(shift_x+155,i+shift_y,50, my_green.fade_to_black(i));
|
||||
|
||||
it.horizontal_line(shift_x+210,i+shift_y,50, my_blue.fade_to_white(i));
|
||||
it.horizontal_line(shift_x+260,i+shift_y,50, my_blue.fade_to_black(i));
|
||||
}
|
||||
it.rectangle(shift_x+ 0, 0+shift_y, shift_x+ 310, 256+shift_y, my_yellow);
|
||||
|
||||
color:
|
||||
- id: my_blue
|
||||
blue: 100%
|
||||
- id: my_red
|
||||
red: 100%
|
||||
- id: my_green
|
||||
green: 100%
|
||||
- id: my_white
|
||||
red: 100%
|
||||
blue: 100%
|
||||
green: 100%
|
||||
- id: my_yellow
|
||||
hex: ffff00
|
||||
For displays in 8 bit mode you will see distinct color blocks rather than a smooth gradient.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
@ -96,6 +96,7 @@ Configuration variables:
|
||||
- ``2.70in-b`` - Black/White/Red
|
||||
- ``2.70in-bv2`` - Black/White/Red
|
||||
- ``2.90in``
|
||||
- ``2.90in-dke``
|
||||
- ``2.90inv2``
|
||||
- ``2.90inv2-r2`` - 2.9in V2 display, but with different initialization and full/partial display refresh management than ``2.90inv2``
|
||||
- ``2.90in-b`` - B/W rendering only
|
||||
|
147
components/event/index.rst
Normal 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:
|
||||
|
||||
*
|
31
components/event/template.rst
Normal 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`
|
@ -46,6 +46,7 @@ Configuration variables:
|
||||
- **ref** (*Optional*, string): Git ref (branch or tag). If not specified the default branch is used.
|
||||
- **username** (*Optional*, string): Username for the Git server, if one is required
|
||||
- **password** (*Optional*, string): Password for the Git server, if one is required
|
||||
- **path** (*Optional*, string): Path inside the repo, if different from ``components`` or ``esphome/components``
|
||||
|
||||
local options:
|
||||
|
||||
|
BIN
components/images/DFR0627.jpg
Normal file
After Width: | Height: | Size: 110 KiB |
@ -17,6 +17,7 @@ Components
|
||||
sensor/index
|
||||
switch/index
|
||||
button/index
|
||||
event/index
|
||||
display/index
|
||||
text_sensor/index
|
||||
stepper/index
|
||||
@ -29,4 +30,5 @@ Components
|
||||
time/index
|
||||
alarm_control_panel/index
|
||||
text/index
|
||||
valve/index
|
||||
*
|
||||
|
@ -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.
|
||||
|
||||
|
@ -54,13 +54,19 @@ 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.
|
||||
- **rmt_channel** (*Optional*, int): The RMT channel to use. Only on **esp32**.
|
||||
@ -74,14 +80,17 @@ Configuration variables:
|
||||
"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. Defaults to
|
||||
``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::
|
||||
|
||||
@ -165,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.
|
||||
@ -394,6 +406,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.
|
||||
|
@ -772,6 +772,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
|
||||
|
@ -62,8 +62,8 @@ ESP32 Attenuation
|
||||
-----------------
|
||||
|
||||
On the ESP32 the voltage measured with the ADC caps out at ~1.1V by default as the sensing range (attenuation of the ADC) is set to ``0db`` by default.
|
||||
Measuring higher voltages requires setting ``attenuation`` to one of the following values: ``0db``, ``2.5db``, ``6db``, ``11db``.
|
||||
There's more information `at the manufacturer's website <https://docs.espressif.com/projects/esp-idf/en/v4.4.2/esp32/api-reference/peripherals/adc.html#_CPPv425adc1_config_channel_atten14adc1_channel_t11adc_atten_t>`__.
|
||||
Measuring higher voltages requires setting ``attenuation`` to one of the following values: ``0db``, ``2.5db``, ``6db``, ``12db``.
|
||||
There's more information `at the manufacturer's website <https://docs.espressif.com/projects/esp-idf/en/v4.4.7/esp32/api-reference/peripherals/adc.html#_CPPv425adc1_config_channel_atten14adc1_channel_t11adc_atten_t>`__.
|
||||
|
||||
To simplify this, we provide the setting ``attenuation: auto`` for an automatic/seamless transition among scales. `Our implementation
|
||||
<https://github.com/esphome/esphome/blob/dev/esphome/components/adc/adc_sensor.cpp>`__ combines all available ranges to allow the best resolution without having to compromise on a specific attenuation.
|
||||
@ -117,7 +117,7 @@ For users that don't need a precise voltage reading, the "raw" output option all
|
||||
- multiply: 0.00026862 # 1.1/4095, for attenuation 0db
|
||||
- multiply: 0.00036630 # 1.5/4095, for attenuation 2.5db
|
||||
- multiply: 0.00053724 # 2.2/4095, for attenuation 6db
|
||||
- multiply: 0.00095238 # 3.9/4095, for attenuation 11db
|
||||
- multiply: 0.00095238 # 3.9/4095, for attenuation 12db
|
||||
# your existing filters would go here
|
||||
|
||||
Note we don't recommend this method as it will change between chips, and newer ESP32 modules have different ranges (i.e. 0-8191); it is better to use the new calibrated voltages and update any existing filters accordingly.
|
||||
@ -188,7 +188,7 @@ You can only use as many ADC sensors as your device can support. The ESP8266 onl
|
||||
Measuring battery voltage on the Firebeetle ESP32-E
|
||||
---------------------------------------------------
|
||||
|
||||
This board has a internal voltage divider and the battery voltage can easily be measured like this using 11dB attenuation
|
||||
This board has a internal voltage divider and the battery voltage can easily be measured like this using 12dB attenuation
|
||||
on GPIO34.
|
||||
|
||||
.. code-block:: yaml
|
||||
@ -198,7 +198,7 @@ on GPIO34.
|
||||
pin: GPIO34
|
||||
accuracy_decimals: 2
|
||||
update_interval: 60s
|
||||
attenuation: 11dB
|
||||
attenuation: 12dB
|
||||
filters:
|
||||
- multiply: 2.0 # The voltage divider requires us to multiply by 2
|
||||
|
||||
|
@ -7,8 +7,8 @@ BMP388 / BMP390 Temperature+Pressure Sensor
|
||||
:keywords: BMP388 BMP390
|
||||
|
||||
The ``bmp3xx`` sensor platform allows you to use your BMP388 or BMP390
|
||||
(`datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf>`__, `BMP390 product page <https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/>`__) temperature and pressure sensors with ESPHome. The :ref:`I²C <i2c>` bus is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
(`datasheet <https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bmp390-ds002.pdf>`__, `BMP390 product page <https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp390/>`__) temperature and pressure sensors with ESPHome.
|
||||
Either :ref:`I²C <i2c>` bus or :ref:`SPI <spi>` bus is required to be set up in your configuration for this sensor to work.
|
||||
|
||||
.. figure:: images/bmp388.jpg
|
||||
:align: center
|
||||
@ -16,11 +16,16 @@ required to be set up in your configuration for this sensor to work.
|
||||
|
||||
BMP388/BMP390 Temperature and Pressure Sensor.
|
||||
|
||||
|
||||
Over I²C
|
||||
--------
|
||||
The ``bmp3xx_i2c`` component allows you to use the device over :ref:`I²C <i2c>` interface.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
# Example configuration entry for I2C connection
|
||||
sensor:
|
||||
- platform: bmp3xx
|
||||
- platform: bmp3xx_i2c
|
||||
temperature:
|
||||
name: "Outside Temperature"
|
||||
oversampling: 16x
|
||||
@ -29,34 +34,72 @@ required to be set up in your configuration for this sensor to work.
|
||||
address: 0x77
|
||||
update_interval: 60s
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x77``.
|
||||
Another address can be ``0x76``.
|
||||
- **temperature** (*Optional*): The information for the temperature sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the temperature
|
||||
sensor.
|
||||
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
|
||||
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **pressure** (*Optional*): The information for the pressure sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the pressure sensor.
|
||||
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
|
||||
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the I²C address of
|
||||
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
|
||||
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
|
||||
``OFF``, ``2x``, ``4x``, ``16x``, ``32``, ``64x``, ``128x``. Defaults to ``OFF``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
||||
|
||||
Over SPI
|
||||
--------
|
||||
The ``bmp3xx_spi`` component allows you to use the device over :ref:`SPI <spi>` interface.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry for SPI connection
|
||||
sensor:
|
||||
- platform: bmp3xx_spi
|
||||
temperature:
|
||||
name: "Outside Temperature"
|
||||
oversampling: 16x
|
||||
pressure:
|
||||
name: "Outside Pressure"
|
||||
cs_pin: 13
|
||||
update_interval: 60s
|
||||
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Chip Select (CS) pin.
|
||||
- **temperature** (*Optional*): The information for the temperature sensor.
|
||||
|
||||
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
|
||||
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **pressure** (*Optional*): The information for the pressure sensor.
|
||||
|
||||
- **oversampling** (*Optional*): The oversampling parameter for the temperature sensor.
|
||||
See :ref:`Oversampling Options <bmp3xx-oversampling>`.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **iir_filter** (*Optional*): Set up an Infinite Impulse Response filter to increase accuracy. One of
|
||||
``OFF``, ``2x``, ``4x``, ``16x``, ``32``, ``64x``, ``128x``. Defaults to ``OFF``.
|
||||
- **address** (*Optional*, int): *I2C* only. Manually specify the I²C address of
|
||||
the sensor. Defaults to ``0x77``. Another address can be ``0x76``.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
||||
sensor. Defaults to ``60s``.
|
||||
|
||||
|
||||
.. _bmp3xx-oversampling:
|
||||
|
||||
Oversampling Options
|
||||
@ -80,7 +123,7 @@ See Also
|
||||
- :doc:`bmp280`
|
||||
- :doc:`bme680`
|
||||
- :doc:`bmp085`
|
||||
- :apiref:`bmp3xx/bmp3xx.h`
|
||||
- :apiref:`bmp3xx_base/bmp3xx_base.h`
|
||||
- `BMP3 sensor API <https://github.com/BoschSensortec/BMP3-Sensor-API>`__
|
||||
- `BMP388/BMP390 Library <https://github.com/MartinL1/BMP388_DEV>`__ by Martin Lindupp
|
||||
- :ghedit:`Edit`
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 4.5 KiB |
@ -31,6 +31,7 @@ Example sensors:
|
||||
# Example configuration entry
|
||||
sensor:
|
||||
- platform: htu21d
|
||||
model: htu21d
|
||||
temperature:
|
||||
name: "Temperature"
|
||||
humidity:
|
||||
@ -52,6 +53,8 @@ Configuration variables:
|
||||
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
||||
|
||||
- **model** (*Optional*): Possible values are HTU21D, SI7021, SHT21. Defaults to HTU21D.
|
||||
|
||||
The heater may be enabled to help correct the reading; see the datasheet for more information.
|
||||
|
||||
See Also
|
||||
|
@ -58,15 +58,6 @@ Configuration variables:
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration variables:
|
||||
****************************
|
||||
|
||||
- **sn74hc595** (**Required**, :ref:`config-id`): The id of the SN74HC595 component the pin belongs to.
|
||||
- **number** (**Required**, int): The pin number.
|
||||
- **inverted** (*Optional*, boolean): If all written values should be treated as inverted.
|
||||
Defaults to ``false``.
|
||||
|
||||
Over SPI
|
||||
--------
|
||||
|
||||
@ -75,10 +66,28 @@ Over SPI
|
||||
# Example configuration entry
|
||||
sn74hc595:
|
||||
- id: 'sn74hc595_hub'
|
||||
type: spi
|
||||
latch_pin: GPIOXX
|
||||
oe_pin: GPIOXX
|
||||
sr_count: 2
|
||||
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC595 component.
|
||||
- **spi_id** (**Required**, :ref:`SPI Bus Schema <spi>`): The SPI bus to use. This will automatically be set to the ID of the SPI bus if there is only one.
|
||||
- **type** (**Required**, string): Must be ``spi``.
|
||||
- **latch_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 RCLK (ST_CP) pin
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration
|
||||
-----------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Individual outputs
|
||||
switch:
|
||||
- platform: gpio
|
||||
@ -89,17 +98,6 @@ Over SPI
|
||||
number: 0
|
||||
inverted: false
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC595 component.
|
||||
- **latch_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 RCLK (ST_CP) pin
|
||||
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
|
||||
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up to 256. Defaults to ``1``.
|
||||
|
||||
|
||||
Pin configuration variables:
|
||||
****************************
|
||||
|
||||
- **sn74hc595** (**Required**, :ref:`config-id`): The id of the SN74HC595 component of the pin.
|
||||
- **number** (**Required**, int): The pin number.
|
||||
|
@ -25,6 +25,8 @@ via text sensors.
|
||||
name: ESP IP Address 3
|
||||
address_4:
|
||||
name: ESP IP Address 4
|
||||
dns_address:
|
||||
name: ESP DNS Address
|
||||
|
||||
|
||||
Configuration variables:
|
||||
@ -34,6 +36,8 @@ Configuration variables:
|
||||
:ref:`Text Sensor <config-text_sensor>`.
|
||||
- **address_0-address_4** (*Optional*): With dual stack (IPv4 and IPv6) the device will have at least two IP addresses -- often more. To report all addresses the configuration may have up to five sub-sensors. All options from
|
||||
:ref:`Text Sensor <config-text_sensor>`.
|
||||
- **dns_address** (*Optional*): Expose the DNS Address of the ESP as text sensor.
|
||||
:ref:`Text Sensor <config-text_sensor>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
BIN
components/valve/images/valve-ui.png
Normal file
After Width: | Height: | Size: 16 KiB |
262
components/valve/index.rst
Normal file
@ -0,0 +1,262 @@
|
||||
Valve Component
|
||||
===============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up base valves in ESPHome.
|
||||
:image: folder-open.svg
|
||||
|
||||
The ``valve`` component is a generic representation of valves in ESPHome. A valve can (currently) either be *closed* or
|
||||
*open* and supports three commands: *open*, *close* and *stop*.
|
||||
|
||||
.. note::
|
||||
|
||||
To use a valve in Home Assistant requires Home Assistant 2024.5 or later.
|
||||
|
||||
.. figure:: images/valve-ui.png
|
||||
:align: center
|
||||
|
||||
.. _config-valve:
|
||||
|
||||
Base Valve Configuration
|
||||
------------------------
|
||||
|
||||
All valve config schemas inherit from this schema - you can set these keys for valves.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
valve:
|
||||
- platform: ...
|
||||
device_class: water
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the valve.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and you want the valve
|
||||
to use that name, you can set ``name: None``.
|
||||
|
||||
- **device_class** (*Optional*, string): The device class for the sensor. See
|
||||
https://www.home-assistant.io/components/valve/ for a list of available options.
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the valve in the frontend.
|
||||
|
||||
Advanced options:
|
||||
|
||||
- **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, 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.
|
||||
|
||||
MQTT options:
|
||||
|
||||
- **position_state_topic** (*Optional*, string): The topic to publish valve position changes to.
|
||||
- **position_command_topic** (*Optional*, string): The topic to receive valve position commands on.
|
||||
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
|
||||
|
||||
|
||||
.. _valve-open_action:
|
||||
|
||||
``valve.open`` Action
|
||||
---------------------
|
||||
|
||||
This :ref:`action <config-action>` opens the valve with the given ID when executed.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- valve.open: valve_1
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be expressed in :ref:`lambdas <config-lambda>`:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto call = id(valve_1).make_call();
|
||||
call.set_command_open();
|
||||
call.perform();
|
||||
|
||||
.. _valve-close_action:
|
||||
|
||||
``valve.close`` Action
|
||||
----------------------
|
||||
|
||||
This :ref:`action <config-action>` closes the valve with the given ID when executed.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- valve.close: valve_1
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be expressed in :ref:`lambdas <config-lambda>`:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto call = id(valve_1).make_call();
|
||||
call.set_command_close();
|
||||
call.perform();
|
||||
|
||||
.. _valve-stop_action:
|
||||
|
||||
``valve.stop`` Action
|
||||
---------------------
|
||||
|
||||
This :ref:`action <config-action>` stops the valve with the given ID when executed.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- valve.stop: valve_1
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be expressed in :ref:`lambdas <config-lambda>`:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto call = id(valve_1).make_call();
|
||||
call.set_command_stop();
|
||||
call.perform();
|
||||
|
||||
.. _valve-toggle_action:
|
||||
|
||||
``valve.toggle`` Action
|
||||
-----------------------
|
||||
|
||||
This :ref:`action <config-action>` toggles the valve with the given ID when executed, cycling through the states
|
||||
close/stop/open/stop... This allows the valve to be controlled by a single push button.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- valve.toggle: valve_1
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be expressed in :ref:`lambdas <config-lambda>`:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto call = id(valve_1).make_call();
|
||||
call.set_command_toggle();
|
||||
call.perform();
|
||||
|
||||
.. _valve-control_action:
|
||||
|
||||
``valve.control`` Action
|
||||
------------------------
|
||||
|
||||
This :ref:`action <config-action>` is a more generic version of the other valve actions and allows all valve attributes
|
||||
to be set.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- valve.control:
|
||||
id: valve_1
|
||||
position: 50%
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The valve to control.
|
||||
- **stop** (*Optional*, boolean): Whether to stop the valve.
|
||||
- **state** (*Optional*, string): The state to set the valve to - one of ``OPEN`` or ``CLOSE``.
|
||||
- **position** (*Optional*, float): The valve position to set.
|
||||
|
||||
- ``0.0`` = ``0%`` = ``CLOSED``
|
||||
- ``1.0`` = ``100%`` = ``OPEN``
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be expressed in :ref:`lambdas <config-lambda>`:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto call = id(valve_1).make_call();
|
||||
// set attributes
|
||||
call.set_position(0.5);
|
||||
call.perform();
|
||||
|
||||
.. _valve-lambda_calls:
|
||||
|
||||
Lambdas
|
||||
-------
|
||||
|
||||
From :ref:`lambdas <config-lambda>`, you can access the current state of the valve (note that these fields are
|
||||
read-only, if you want to act on the valve, use the ``make_call()`` method as shown above).
|
||||
|
||||
- ``position``: Retrieve the current position of the valve, as a value between ``0.0`` (closed) and ``1.0`` (open).
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
if (id(my_valve).position == VALVE_OPEN) {
|
||||
// Valve is open
|
||||
} else if (id(my_valve).position == VALVE_CLOSED) {
|
||||
// Valve is closed
|
||||
} else {
|
||||
// Valve is in-between open and closed
|
||||
}
|
||||
|
||||
- ``current_operation``: The operation the valve is currently performing:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
if (id(my_valve).current_operation == ValveOperation::VALVE_OPERATION_IDLE) {
|
||||
// Valve is idle
|
||||
} else if (id(my_valve).current_operation == ValveOperation::VALVE_OPERATION_OPENING) {
|
||||
// Valve is currently opening
|
||||
} else if (id(my_valve).current_operation == ValveOperation::VALVE_OPERATION_CLOSING) {
|
||||
// Valve is currently closing
|
||||
}
|
||||
|
||||
.. _valve-on_open_trigger:
|
||||
|
||||
``valve.on_open`` Trigger
|
||||
*************************
|
||||
|
||||
This trigger is activated each time the valve reaches a fully open state.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
valve:
|
||||
- platform: template # or any other platform
|
||||
# ...
|
||||
on_open:
|
||||
- logger.log: "Valve is Open!"
|
||||
|
||||
.. _valve-on_closed_trigger:
|
||||
|
||||
``valve.on_closed`` Trigger
|
||||
***************************
|
||||
|
||||
This trigger is activated each time the valve reaches a fully closed state.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
valve:
|
||||
- platform: template # or any other platform
|
||||
# ...
|
||||
on_closed:
|
||||
- logger.log: "Valve is Closed!"
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :apiref:`valve/valve.h`
|
||||
- :ghedit:`Edit`
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
*
|
118
components/valve/template.rst
Normal file
@ -0,0 +1,118 @@
|
||||
Template Valve
|
||||
==============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up template valves in ESPHome.
|
||||
:image: description.svg
|
||||
|
||||
The ``template`` valve platform allows you to create simple valves out of just a few actions and a value lambda. Once
|
||||
defined, it will automatically appear in Home Assistant as a valve and can be controlled through the frontend.
|
||||
|
||||
.. figure:: images/valve-ui.png
|
||||
:align: center
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
valve:
|
||||
- platform: template
|
||||
name: "Template Valve"
|
||||
lambda: |-
|
||||
if (id(top_end_stop).state) {
|
||||
return VALVE_OPEN;
|
||||
} else {
|
||||
return VALVE_CLOSED;
|
||||
}
|
||||
open_action:
|
||||
- switch.turn_on: open_valve_switch
|
||||
close_action:
|
||||
- switch.turn_on: close_valve_switch
|
||||
stop_action:
|
||||
- switch.turn_on: stop_valve_switch
|
||||
optimistic: true
|
||||
|
||||
|
||||
Possible return values for the optional lambda:
|
||||
|
||||
- ``return VALVE_OPEN;`` if the valve should be reported as OPEN.
|
||||
- ``return VALVE_CLOSED;`` if the valve should be reported as CLOSED.
|
||||
- ``return {};`` if the last state should be repeated.
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name of the valve.
|
||||
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`):
|
||||
Lambda to be evaluated repeatedly to get the current state of the valve.
|
||||
- **open_action** (*Optional*, :ref:`Action <config-action>`): The action that should be performed when the remote
|
||||
(like Home Assistant's frontend) requests the valve to be opened.
|
||||
- **close_action** (*Optional*, :ref:`Action <config-action>`): The action that should be performed when the remote
|
||||
requests the valve to be closed.
|
||||
- **stop_action** (*Optional*, :ref:`Action <config-action>`): The action that should be performed when the remote
|
||||
requests the valve to be stopped.
|
||||
- **optimistic** (*Optional*, boolean): Whether to operate in optimistic mode - when in this mode, any command sent to
|
||||
the template valve will immediately update the reported state and no lambda needs to be used. Defaults to ``false``.
|
||||
- **assumed_state** (*Optional*, boolean): Whether the true state of the valve is not known. This will make the Home
|
||||
Assistant frontend show buttons for both OPEN and CLOSE actions, instead of hiding one of them. Defaults to ``false``.
|
||||
- **has_position** (*Optional*, boolean): Whether this valve will publish its position as a floating point number.
|
||||
By default (``false``), the valve only publishes OPEN/CLOSED position.
|
||||
- **position_action** (*Optional*, :ref:`Action <config-action>`): The action that should be performed when the remote
|
||||
(like Home Assistant's frontend) requests the valve be set to a specific position. The desired position is available
|
||||
in the lambda in the ``pos`` variable. Requires ``has_position`` (above) to be set to ``true``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Valve <config-valve>`.
|
||||
|
||||
.. _valve-template-publish_action:
|
||||
|
||||
``valve.template.publish`` Action
|
||||
---------------------------------
|
||||
|
||||
You can also publish a state to a template valve from elsewhere in your YAML filewith the ``valve.template.publish`` action.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
valve:
|
||||
- platform: template
|
||||
name: "Template Valve"
|
||||
id: my_template_valve
|
||||
|
||||
# in some trigger
|
||||
on_...:
|
||||
- valve.template.publish:
|
||||
id: my_template_valve
|
||||
state: OPEN
|
||||
|
||||
# Templated
|
||||
- valve.template.publish:
|
||||
id: my_template_valve
|
||||
state: !lambda 'return VALVE_OPEN;'
|
||||
|
||||
Configuration options:
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The ID of the template valve.
|
||||
- **state** (*Optional*, :ref:`templatable <config-templatable>`):
|
||||
The state to publish. One of ``OPEN``, ``CLOSED``. If using a lambda, use ``VALVE_OPEN`` or ``VALVE_CLOSED``.
|
||||
- **position** (*Optional*, :ref:`templatable <config-templatable>`, float):
|
||||
The position to publish, from 0 (CLOSED) to 1.0 (OPEN)
|
||||
- **current_operation** (*Optional*, :ref:`templatable <config-templatable>`, string):
|
||||
The current operation mode to publish. One of ``IDLE``, ``OPENING`` and ``CLOSING``. If using a lambda, use
|
||||
``VALVE_OPERATION_IDLE``, ``VALVE_OPERATION_OPENING``, and ``VALVE_OPERATION_CLOSING``.
|
||||
|
||||
.. note::
|
||||
|
||||
This action can also be written in lambdas:
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
id(my_template_valve).position = VALVE_OPEN;
|
||||
id(my_template_valve).publish_state();
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/valve/index`
|
||||
- :ref:`automation`
|
||||
- :doc:`/cookbook/garage-door`
|
||||
- :apiref:`template/valve/template_valve.h`
|
||||
- :ghedit:`Edit`
|
340
components/weikai.rst
Normal file
@ -0,0 +1,340 @@
|
||||
WeiKai SPI/I²C UART/IO Expander
|
||||
===============================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up WeiKai SPI/I²C to UART Expanders in ESPHome.
|
||||
:image: wk2168.jpg
|
||||
:keywords: UART, SPI, I²C, WK2132, WK2168, WK2204, WK2212, wk2124
|
||||
|
||||
**WeiKai Microelectronics** provides a family of UART & GPIO expansion chips
|
||||
that interfaces to a micro-controller through SPI or I²C bus.
|
||||
|
||||
The ESPHome ``WeiKai`` component supports the following WeiKai chips:
|
||||
|
||||
- `WK2168-IQPG <https://jlcpcb.com/partdetail/WEIKAI-WK2168IQPG/C401041>`__
|
||||
- `WK2132-ISSG <https://jlcpcb.com/partdetail/WeiKai-WK2132ISSG/C401039>`__
|
||||
- `WK2124-ISSG <https://jlcpcb.com/partdetail/WeiKai-WK2124ISSG/C86332>`__
|
||||
- `WK2204-IQNG <https://jlcpcb.com/partdetail/WeiKai-WK2204IQNG/C401040>`__
|
||||
- `WK2212-IQNG <https://jlcpcb.com/partdetail/WeiKai-WK2212IQNG/C2987671>`__
|
||||
|
||||
It can also be used with evaluation board equipped with these chips, such as:
|
||||
|
||||
- `WK2168 Chip Development Board <https://fr.aliexpress.com/item/1005002198759633.html>`__
|
||||
- `WK2132 Chip Development Board <https://www.aliexpress.com/item/1005002018579265.html>`__
|
||||
- `DFROBOT Gravity: I²C to Dual UART Module <https://www.dfrobot.com/product-2001.html>`__
|
||||
|
||||
.. figure:: images/DFR0627.jpg
|
||||
:align: center
|
||||
|
||||
The features provided by the different WeiKai chips are described in the following table:
|
||||
|
||||
.. list-table:: WeiKai chip's features
|
||||
:header-rows: 1
|
||||
:width: 450px
|
||||
:align: center
|
||||
|
||||
* - Chip
|
||||
- Bus
|
||||
- UART
|
||||
- GPIO
|
||||
* - WK2132-ISSG
|
||||
- S/I
|
||||
- 2
|
||||
-
|
||||
* - WK2212-IQNG
|
||||
- S/I
|
||||
- 2
|
||||
- 8
|
||||
* - WK2124-ISSG
|
||||
- S
|
||||
- 4
|
||||
-
|
||||
* - WK2204-IQNG
|
||||
- S/I
|
||||
- 4
|
||||
-
|
||||
* - WK2168-IQPG
|
||||
- S/I
|
||||
- 4
|
||||
- 8
|
||||
|
||||
As you can see most of the components can interface either through an I²C bus or a SPI bus,
|
||||
they provide either 2 or 4 serial channels, and some provide 8 input/output pins.
|
||||
|
||||
Each UART channel has two independent 256-byte FIFO hardware buffers to transmit and
|
||||
receive and support data transmission rates up to 1 Mbps.
|
||||
The baud rate and parity format of each UART channel can be configured independently.
|
||||
However, the data bit length is fixed at 8.
|
||||
|
||||
Utilizing the UART channels enables you to connect your UART devices, with each channel functioning
|
||||
as a virtual UART bus for the connected component.
|
||||
|
||||
The I/O pins of the WeiKai chips can be use as any of the other GPIO pins.
|
||||
Any option accepting a :ref:`Pin Schema <config-pin_schema>` can theoretically
|
||||
be used, but some more complicated components that do communication through
|
||||
this I/O expander might not work.
|
||||
|
||||
Connecting via an SPI bus
|
||||
-------------------------
|
||||
|
||||
The ``wk2132_spi``, ``wk2212_spi``, ``wk2204_spi``, ``wk2168_spi`` components allows
|
||||
you to connect the WeiKai chip with ESPHome via a :ref:`SPI <spi>` bus.
|
||||
|
||||
You can connect several of these modules to a single SPI controller circuit effectively expanding
|
||||
the number of hardware serial ports available. Each WeiKai chip needs to be selected
|
||||
with a individual CS.
|
||||
|
||||
Here is an example of configuration entry for a wk2168_spi component. For the other components
|
||||
in the list just replace the name of the component and make sure you do not use more channels that the chip
|
||||
can support (an error message will be generated otherwise). Note that for the ``WK2124-ISSG`` chip
|
||||
you need to use ``wk2204_spi`` as the two chips are similar.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
wk2168_spi:
|
||||
- id: wk2168_bridge_spi
|
||||
cs_pin: 5
|
||||
uart:
|
||||
- id: spi_uart_0
|
||||
channel: 0
|
||||
baud_rate: 128200
|
||||
parity: even
|
||||
- id: spi_uart_1
|
||||
channel: 1
|
||||
baud_rate: 19200
|
||||
- id: spi_uart_2
|
||||
channel: 2
|
||||
baud_rate: 9600
|
||||
- id: spi_uart_3
|
||||
channel: 3
|
||||
baud_rate: 19200
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this WeiKai component.
|
||||
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
|
||||
to use multiple SPI buses.
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
|
||||
of the chip is connected to.
|
||||
- **data_rate** (*Optional*): Set the data rate of the controller. One of ``80MHz``, ``40MHz``, ``20MHz``, ``10MHz``,
|
||||
``5MHz``, ``4MHz``, ``2MHz``, ``1MHz`` (default), ``200kHz``, ``75kHz`` or ``1kHz``. A numeric value in Hz can
|
||||
alternatively be specified.
|
||||
- **crystal** (*Optional*): The frequency in Hz of the crystal connected to the chip.
|
||||
The default value is 14745600 Hz.
|
||||
- **uart** (**Required**): The UART channels.
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this UART channel.
|
||||
- **channel** (**Required**): Unique channel number of this virtual UART.
|
||||
Options: ``0`` to ``1`` or ``0`` to ``3`` depending on the model.
|
||||
- **baud_rate** (**Required**): The baud rate of the UART channel.
|
||||
- **parity** (*Optional*): The parity used on the UART channel. Options: ``NONE``, ``EVEN``,
|
||||
``ODD``. Defaults to ``NONE``.
|
||||
- **stop_bits** (*Optional*): The number of stop bits to send. Options: ``1``, ``2``.
|
||||
Defaults to ``1``.
|
||||
|
||||
Connecting via an I²C bus
|
||||
-------------------------
|
||||
|
||||
The ``wk2132_i2c`` ``wk2212_i2c`` ``wk2204_i2c`` ``wk2168_i2c`` components allows you
|
||||
to connect the WeiKai chip with ESPHome via an :ref:`I²C <i2c>` bus.
|
||||
Up to four WeiKai chips can be connected to an I²C controller board, effectively expanding the
|
||||
available hardware serial ports. The base addresses of these boards are defined by the
|
||||
positions of two switches, A0 and A1, on the board.
|
||||
|
||||
.. list-table:: WeiKai address selection
|
||||
:header-rows: 1
|
||||
:width: 350px
|
||||
:align: center
|
||||
|
||||
* - I²C address
|
||||
- A1
|
||||
- A0
|
||||
* - 0x10 - 0x17
|
||||
- 0
|
||||
- 0
|
||||
* - 0x30 - 0x37
|
||||
- 0
|
||||
- 1
|
||||
* - 0x50 - 0x57
|
||||
- 1
|
||||
- 0
|
||||
* - 0x70 - 0x77
|
||||
- 1
|
||||
- 1
|
||||
|
||||
.. important::
|
||||
|
||||
Note that the address is given as a **range** a not a number as you usually find on other I²C component.
|
||||
Indeed due to a peculiar way of addressing the different internal registers each component actually occupy
|
||||
8 consecutive addresses. For example if the component base address is 0x10, it will occupy the addresses ranging from
|
||||
0x10 to 0x17 on the I²C bus.
|
||||
|
||||
This is important to know if you want to connect other devices on the same I²C bus.
|
||||
|
||||
Here is an example of configuration entry for a ``wk2168_i2c`` component. For the other components
|
||||
just replace the name of the component and do not use more channels that the chip can
|
||||
support (an error message will be generated in this case).
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
wk2168_i2c:
|
||||
- address: 0x70
|
||||
id: wk2168_bridge_i2c
|
||||
uart:
|
||||
- id: i2c_uart_0
|
||||
channel: 0
|
||||
baud_rate: 9600
|
||||
parity: even
|
||||
- id: i2c_uart_1
|
||||
channel: 1
|
||||
baud_rate: 19200
|
||||
- id: i2c_uart_2
|
||||
channel: 2
|
||||
baud_rate: 9600
|
||||
- id: i2c_uart_3
|
||||
channel: 3
|
||||
baud_rate: 19200
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this WeiKai component.
|
||||
- **address** (*Optional*): The I²C address of this component. Defaults to ``0x10``.
|
||||
- **i2c_id** (*Optional*): The I²C Bus ID. Defaults to the default i²c bus.
|
||||
- **crystal** (*Optional*): The frequency in Hz of the crystal connected to the chip.
|
||||
The default value is 14745600 Hz.
|
||||
- **uart** (*Required*): The UART channels.
|
||||
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this UART channel.
|
||||
- **channel** (**Required**): Unique channel number of this virtual UART.
|
||||
Options: ``0`` to ``1`` or ``0`` to ``3`` depending on the model.
|
||||
- **baud_rate** (**Required**): The baud rate of the UART channel.
|
||||
- **parity** (*Optional*): The parity used on the UART channel. Options: ``NONE``, ``EVEN``,
|
||||
``ODD``. Defaults to ``NONE``.
|
||||
- **stop_bits** (*Optional*): The number of stop bits to send. Options: ``1``, ``2``.
|
||||
Defaults to ``1``.
|
||||
|
||||
Using the GPIO pins
|
||||
-------------------
|
||||
|
||||
For the ``WK2212``, and ``WK2168`` it is possible to use the chip I/O pins as any of the other GPIO pins.
|
||||
For example for a wk2168_spi chip:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# individual binary_sensor inputs
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "pin_0"
|
||||
pin:
|
||||
wk2168_spi: wk2168_bridge_spi
|
||||
number: 0
|
||||
mode:
|
||||
input: true
|
||||
- platform: gpio
|
||||
name: "pin_1"
|
||||
pin:
|
||||
wk2168_spi: wk2168_bridge_spi
|
||||
number: 1
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
|
||||
# Individual binary outputs
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "pin_2"
|
||||
pin:
|
||||
wk2168_spi: wk2168_bridge_spi
|
||||
number: 2
|
||||
mode:
|
||||
output: true
|
||||
- platform: gpio
|
||||
name: "pin_3"
|
||||
pin:
|
||||
wk2168_spi: wk2168_bridge_spi
|
||||
number: 3
|
||||
mode:
|
||||
output: true
|
||||
inverted: true
|
||||
|
||||
Pin configuration variables:
|
||||
****************************
|
||||
|
||||
- **wkxxxx_xxx** (**Required**, :ref:`config-id`): The id of the ``wkxxxx_xxx`` component for the pin. For
|
||||
example ``wk2212_i2c: wk2168_bridge_spi``
|
||||
- **number** (**Required**): The pin number (``0`` to ``7``)
|
||||
- **inverted** (*Optional*): If all read and written values should be treated as inverted. Defaults to ``false``.
|
||||
- **mode** (*Optional*): A pin mode to set for the pin at. One of ``INPUT`` or ``OUTPUT``. Default to ``INPUT``
|
||||
|
||||
Performance considerations:
|
||||
---------------------------
|
||||
|
||||
Bus speed
|
||||
*********
|
||||
|
||||
Please be aware that the communication between the WeiKai chips and the processor occurs on an external bus,
|
||||
with a relatively low operating frequency. Therefore tasks such as checking the status of the chip's
|
||||
registers or transferring bytes from the internal FIFOs to the processor may take time.
|
||||
|
||||
To improve this situation, it is strongly recommended to increase the default bus frequency.
|
||||
|
||||
- With a SPI bus this can be done on the WeiKai component by specifying ``data_rate``. For example:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
wk2168_spi:
|
||||
- id: wk2168_bridge_spi
|
||||
spi_id: spi_bus_id
|
||||
cs_pin: 5
|
||||
data_rate: 4MHz
|
||||
|
||||
- With an I²C bus this needs to be done on the ``i2c`` declaration and therefore this frequency will
|
||||
apply to all components connected to this bus.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
i2c:
|
||||
sda: 21
|
||||
scl: 22
|
||||
scan: true
|
||||
id: bus_i2c
|
||||
frequency: 800kHz
|
||||
|
||||
Maximum Baud rate
|
||||
*****************
|
||||
|
||||
The maximum baud_rate is proportional to the crystal frequency. The following table
|
||||
gives the maximum baud_rate at usual system clock:
|
||||
|
||||
.. list-table:: maximum baud rate
|
||||
:header-rows: 1
|
||||
:width: 300px
|
||||
:align: center
|
||||
|
||||
* - Clock
|
||||
- Max Bd
|
||||
* - 14,745,600 Hz
|
||||
- 921,600 Bd
|
||||
* - 11,059,200 Hz
|
||||
- 691,200 Bd
|
||||
* - 7,372,800 Hz
|
||||
- 460,800 Bd
|
||||
* - 3,686,400 Hz
|
||||
- 230,400 Bd
|
||||
* - 1,843,200 Hz
|
||||
- 115,200 Bd
|
||||
|
||||
If you try to use a baud rate superior to the maximum baud_rate an error will be displayed in the
|
||||
log file and the baud rate will automatically be decreased.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :ref:`i2c`
|
||||
- :ref:`spi`
|
||||
- :doc:`switch/gpio`
|
||||
- :doc:`binary_sensor/gpio`
|
||||
- :apiref:`weika/weika.h`
|
||||
- :ghedit:`Edit`
|
4
conf.py
@ -67,9 +67,9 @@ author = "ESPHome"
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = "2024.4"
|
||||
version = "2024.5"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = "2024.4.2"
|
||||
release = "2024.5.0"
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -239,6 +239,7 @@ Contributors
|
||||
- `Carlos Ortega (@carlosV2) <https://github.com/carlosV2>`__
|
||||
- `carlywarly (@carlywarly) <https://github.com/carlywarly>`__
|
||||
- `Carson Full (@CarsonF) <https://github.com/CarsonF>`__
|
||||
- `Carsten Grohmann (@CarstenGrohmann) <https://github.com/CarstenGrohmann>`__
|
||||
- `carstenschroeder (@carstenschroeder) <https://github.com/carstenschroeder>`__
|
||||
- `Christian Anders Schwarzgruber (@casch-at) <https://github.com/casch-at>`__
|
||||
- `Valentin Ochs (@Cat-Ion) <https://github.com/Cat-Ion>`__
|
||||
@ -258,9 +259,11 @@ Contributors
|
||||
- `Chris Feenstra (@cfeenstra1024) <https://github.com/cfeenstra1024>`__
|
||||
- `Filipe Mendonça (@cfilipem) <https://github.com/cfilipem>`__
|
||||
- `cg089 (@cg089) <https://github.com/cg089>`__
|
||||
- `chbmuc (@chbmuc) <https://github.com/chbmuc>`__
|
||||
- `Audric Schiltknecht (@chemicalstorm) <https://github.com/chemicalstorm>`__
|
||||
- `Charles Johnson (@ChemicalXandco) <https://github.com/ChemicalXandco>`__
|
||||
- `chiahsing (@chiahsing) <https://github.com/chiahsing>`__
|
||||
- `Paweł Dembicki (@CHKDSK88) <https://github.com/CHKDSK88>`__
|
||||
- `chris-jennings (@chris-jennings) <https://github.com/chris-jennings>`__
|
||||
- `Chris (@chrismaki) <https://github.com/chrismaki>`__
|
||||
- `Christoph Wagner (@Christoph-Wagner) <https://github.com/Christoph-Wagner>`__
|
||||
@ -279,6 +282,7 @@ Contributors
|
||||
- `Colin McCambridge (@cmccambridge) <https://github.com/cmccambridge>`__
|
||||
- `Clifford Roche (@cmroche) <https://github.com/cmroche>`__
|
||||
- `Casey Burnett (@codeangler) <https://github.com/codeangler>`__
|
||||
- `Marcin Krasowski (@CodeInPolish) <https://github.com/CodeInPolish>`__
|
||||
- `CODeRUS (@CODeRUS) <https://github.com/CODeRUS>`__
|
||||
- `Alex Miller (@Codex-) <https://github.com/Codex->`__
|
||||
- `Ricardo Salinas (@codingric) <https://github.com/codingric>`__
|
||||
@ -374,7 +378,6 @@ Contributors
|
||||
- `Mike La Spina (@descipher) <https://github.com/descipher>`__
|
||||
- `Stephan Martin (@designer2k2) <https://github.com/designer2k2>`__
|
||||
- `Destix (@Destix) <https://github.com/Destix>`__
|
||||
- `Deun Lee (@deunlee) <https://github.com/deunlee>`__
|
||||
- `Develo (@devyte) <https://github.com/devyte>`__
|
||||
- `Dewet Diener (@dewet22) <https://github.com/dewet22>`__
|
||||
- `dexn (@dexn) <https://github.com/dexn>`__
|
||||
@ -529,6 +532,7 @@ Contributors
|
||||
- `Alex Hermann (@gaaf) <https://github.com/gaaf>`__
|
||||
- `Gabe Cook (@gabe565) <https://github.com/gabe565>`__
|
||||
- `Gábor Poczkodi (@gabest11) <https://github.com/gabest11>`__
|
||||
- `Matthew (@Gaff) <https://github.com/Gaff>`__
|
||||
- `gazoodle (@gazoodle) <https://github.com/gazoodle>`__
|
||||
- `gcopeland (@gcopeland) <https://github.com/gcopeland>`__
|
||||
- `Greg Cormier (@gcormier) <https://github.com/gcormier>`__
|
||||
@ -549,6 +553,7 @@ Contributors
|
||||
- `Germán Martín (@gmag11) <https://github.com/gmag11>`__
|
||||
- `Garret Buell (@gmbuell) <https://github.com/gmbuell>`__
|
||||
- `gnicolasb (@gnicolasb) <https://github.com/gnicolasb>`__
|
||||
- `Mischa Siekmann (@gnumpi) <https://github.com/gnumpi>`__
|
||||
- `Go0oSer (@Go0oSer) <https://github.com/Go0oSer>`__
|
||||
- `Dario Gogliandolo (@godario) <https://github.com/godario>`__
|
||||
- `Gonzalo Paniagua Javier (@gonzalop) <https://github.com/gonzalop>`__
|
||||
@ -590,6 +595,7 @@ Contributors
|
||||
- `HengYongChao (@HengYongChao) <https://github.com/HengYongChao>`__
|
||||
- `Hermann Kraus (@herm) <https://github.com/herm>`__
|
||||
- `Herr Frei (@herrfrei) <https://github.com/herrfrei>`__
|
||||
- `Nate Clark (@heythisisnate) <https://github.com/heythisisnate>`__
|
||||
- `highground88 (@highground88) <https://github.com/highground88>`__
|
||||
- `hindenbugbite (@hindenbugbite) <https://github.com/hindenbugbite>`__
|
||||
- `Hobby Components (@HobbyComponents) <https://github.com/HobbyComponents>`__
|
||||
@ -663,6 +669,7 @@ Contributors
|
||||
- `jerome992 (@jerome992) <https://github.com/jerome992>`__
|
||||
- `Jesse Hills (@jesserockz) <https://github.com/jesserockz>`__
|
||||
- `Jessica Hamilton (@jessicah) <https://github.com/jessicah>`__
|
||||
- `J.G.Aguado (@JGAguado) <https://github.com/JGAguado>`__
|
||||
- `Yuval Brik (@jhamhader) <https://github.com/jhamhader>`__
|
||||
- `Joe (@jhansche) <https://github.com/jhansche>`__
|
||||
- `jimtng (@jimtng) <https://github.com/jimtng>`__
|
||||
@ -680,6 +687,7 @@ Contributors
|
||||
- `JMoratelli (@JMoratelli) <https://github.com/JMoratelli>`__
|
||||
- `Jonathas Barbosa (@jnthas) <https://github.com/jnthas>`__
|
||||
- `jochenvg (@jochenvg) <https://github.com/jochenvg>`__
|
||||
- `joederpoliveira (@joederpoliveira) <https://github.com/joederpoliveira>`__
|
||||
- `Johboh (@Johboh) <https://github.com/Johboh>`__
|
||||
- `John Moxley (@johnmoxley) <https://github.com/johnmoxley>`__
|
||||
- `John White (@johnpwhite) <https://github.com/johnpwhite>`__
|
||||
@ -827,8 +835,10 @@ Contributors
|
||||
- `Matjah Sonneveld (@matjahs) <https://github.com/matjahs>`__
|
||||
- `Michel Marti (@matoxp) <https://github.com/matoxp>`__
|
||||
- `matt123p (@matt123p) <https://github.com/matt123p>`__
|
||||
- `Matteo Franceschini (@matteofranceschini) <https://github.com/matteofranceschini>`__
|
||||
- `matthias882 (@matthias882) <https://github.com/matthias882>`__
|
||||
- `Mattia Baldani (@mattibal) <https://github.com/mattibal>`__
|
||||
- `mattsgreen (@mattsgreen) <https://github.com/mattsgreen>`__
|
||||
- `Matus Ivanecky (@maty535) <https://github.com/maty535>`__
|
||||
- `matzman666 (@matzman666) <https://github.com/matzman666>`__
|
||||
- `Christian (@max246) <https://github.com/max246>`__
|
||||
@ -1020,6 +1030,7 @@ Contributors
|
||||
- `Plácido Revilla (@placidorevilla) <https://github.com/placidorevilla>`__
|
||||
- `PlainTechEnthusiast (@PlainTechEnthusiast) <https://github.com/PlainTechEnthusiast>`__
|
||||
- `Jan Pluskal (@pluskal) <https://github.com/pluskal>`__
|
||||
- `Peter (@pmannk) <https://github.com/pmannk>`__
|
||||
- `DK (@poldim) <https://github.com/poldim>`__
|
||||
- `poloswiss (@poloswiss) <https://github.com/poloswiss>`__
|
||||
- `polyfloyd (@polyfloyd) <https://github.com/polyfloyd>`__
|
||||
@ -1126,6 +1137,7 @@ Contributors
|
||||
- `scamiv (@scamiv) <https://github.com/scamiv>`__
|
||||
- `Nils Schulte (@Schnilz) <https://github.com/Schnilz>`__
|
||||
- `Wolle (@schreibfaul1) <https://github.com/schreibfaul1>`__
|
||||
- `MSchwarzbach (@schwarzbach) <https://github.com/schwarzbach>`__
|
||||
- `Scobber (@Scobber) <https://github.com/Scobber>`__
|
||||
- `Ville Skyttä (@scop) <https://github.com/scop>`__
|
||||
- `Dan (@ScrewLooseDan) <https://github.com/ScrewLooseDan>`__
|
||||
@ -1155,7 +1167,6 @@ Contributors
|
||||
- `Maximilian Ertl (@Sirs0ri) <https://github.com/Sirs0ri>`__
|
||||
- `Derek Hageman (@Sizurka) <https://github.com/Sizurka>`__
|
||||
- `Stephen Tierney (@sjtrny) <https://github.com/sjtrny>`__
|
||||
- `Dominik Skalník (@skaldo) <https://github.com/skaldo>`__
|
||||
- `Niklas Wagner (@Skaronator) <https://github.com/Skaronator>`__
|
||||
- `Brian Slesinsky (@skybrian) <https://github.com/skybrian>`__
|
||||
- `Jordan W. Cobb (@skykingjwc) <https://github.com/skykingjwc>`__
|
||||
@ -1204,6 +1215,7 @@ Contributors
|
||||
- `tantive (@tantive) <https://github.com/tantive>`__
|
||||
- `Aiden (@tarontop) <https://github.com/tarontop>`__
|
||||
- `Hawawa McTaru (@TaruDesigns) <https://github.com/TaruDesigns>`__
|
||||
- `Jake Kromer (@techwithjake) <https://github.com/techwithjake>`__
|
||||
- `Ryan Hoffman (@tekmaven) <https://github.com/tekmaven>`__
|
||||
- `testbughub (@testbughub) <https://github.com/testbughub>`__
|
||||
- `Tudor Sandu (@tetele) <https://github.com/tetele>`__
|
||||
@ -1278,6 +1290,7 @@ Contributors
|
||||
- `Alexey Vlasov (@turbulator) <https://github.com/turbulator>`__
|
||||
- `tvan0076 (@tvan0076) <https://github.com/tvan0076>`__
|
||||
- `Thorsten von Eicken (@tve) <https://github.com/tve>`__
|
||||
- `Tomek Wasilczyk (@twasilczyk) <https://github.com/twasilczyk>`__
|
||||
- `Simon Hulme (@uberjew666) <https://github.com/uberjew666>`__
|
||||
- `Ubi de Feo (@ubidefeo) <https://github.com/ubidefeo>`__
|
||||
- `ulic75 (@ulic75) <https://github.com/ulic75>`__
|
||||
@ -1299,6 +1312,7 @@ Contributors
|
||||
- `VitaliyKurokhtin (@VitaliyKurokhtin) <https://github.com/VitaliyKurokhtin>`__
|
||||
- `voed (@voed) <https://github.com/voed>`__
|
||||
- `Xuming Feng (@voicevon) <https://github.com/voicevon>`__
|
||||
- `Manuel Bichler (@votacom) <https://github.com/votacom>`__
|
||||
- `vozvivan (@vozvivan) <https://github.com/vozvivan>`__
|
||||
- `vt-vaio (@vt-vaio) <https://github.com/vt-vaio>`__
|
||||
- `vtechun (@vtechun) <https://github.com/vtechun>`__
|
||||
@ -1352,4 +1366,4 @@ Contributors
|
||||
- `Christian Zufferey (@zuzu59) <https://github.com/zuzu59>`__
|
||||
- `Zynth-dev (@Zynth-dev) <https://github.com/Zynth-dev>`__
|
||||
|
||||
*This page was last updated April 30, 2024.*
|
||||
*This page was last updated May 15, 2024.*
|
||||
|
BIN
images/wk2168.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
17
index.rst
@ -226,6 +226,7 @@ I/O Expanders/Multiplexers
|
||||
SN74HC595, components/sn74hc595, sn74hc595.jpg
|
||||
SX1509, components/sx1509, sx1509.jpg
|
||||
TCA9548A I²C Multiplexer, components/tca9548a, tca9548a.jpg
|
||||
WeiKai SPI/I²C UART/IO Expander, components/weikai, wk2168.jpg
|
||||
XL9535, components/xl9535, xl9535.svg
|
||||
|
||||
Sensor Components
|
||||
@ -718,6 +719,14 @@ Button Components
|
||||
UART Button, components/button/uart, uart.svg
|
||||
Wake-on-LAN, components/button/wake_on_lan, power_settings.svg, dark-invert
|
||||
|
||||
Event Components
|
||||
-----------------
|
||||
|
||||
.. imgtable::
|
||||
|
||||
Event Core, components/event/index, folder-open.svg, dark-invert
|
||||
Template Event, components/event/template, description.svg, dark-invert
|
||||
|
||||
Fan Components
|
||||
--------------
|
||||
|
||||
@ -820,6 +829,14 @@ Text Components
|
||||
Text Core, components/text/index, folder-open.svg, dark-invert
|
||||
Template Text, components/text/template, description.svg, dark-invert
|
||||
|
||||
Valve Components
|
||||
----------------
|
||||
|
||||
.. imgtable::
|
||||
|
||||
Valve Core, components/valve/index, folder-open.svg, dark-invert
|
||||
Template Valve, components/valve/template, description.svg, dark-invert
|
||||
|
||||
Text Sensor Components
|
||||
----------------------
|
||||
|
||||
|
@ -85,6 +85,7 @@ PLATFORMS_TITLES = {
|
||||
"Microphone": "microphone",
|
||||
"Speaker": "speaker",
|
||||
"Alarm Control Panel": "alarm_control_panel",
|
||||
"Event": "event",
|
||||
}
|
||||
|
||||
CUSTOM_DOCS = {
|
||||
|
@ -182,7 +182,7 @@ creating a POST request at ``/light/<id>/turn_on?brightness=128&transition=2`` w
|
||||
- **flash**: Flash the color provided by the other properties for a duration in seconds.
|
||||
- **transition**: Transition to the specified color values in this duration in seconds.
|
||||
- **effect**: Set an effect for the light.
|
||||
- ***color_temp***: Set the color temperature of the light, in mireds.
|
||||
- **color_temp**: Set the color temperature of the light, in mireds.
|
||||
|
||||
``turn_off`` optional URL parameters:
|
||||
|
||||
@ -239,9 +239,10 @@ stopped midway. An example GET request for ``/cover/front_window_blinds`` might
|
||||
|
||||
- **id**: The ID of the cover, prefixed with ``cover-``.
|
||||
- **state**: ``OPEN`` or ``CLOSED``. Any position other than 0.0 is considered open.
|
||||
- **value**: Current cover position as a float number.
|
||||
- **value**: Current cover position as a float number. If the cover component does not support cover position reporting, then this will either be 1.0 when open or 0.0 when closed.
|
||||
- **current_operation**: ``OPENING``, ``CLOSING`` or ``IDLE``.
|
||||
- **tilt**: (only if supported by this cover component) tilt angle from 0.0 to 1.0.
|
||||
- **position**: (only if supported by this cover component) Current cover position as a float number.
|
||||
|
||||
POST requests on the other hand allow performing actions on the cover, the available
|
||||
methods being ``open``, ``close``, ``stop``, ``toggle`` and ``set``. The following parameters
|
||||
|