Merge branch 'current' into current

This commit is contained in:
Jesse Hills 2022-10-19 08:11:19 +13:00 committed by GitHub
commit e5cbec1c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
140 changed files with 4436 additions and 332 deletions

7
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

View File

@ -20,18 +20,18 @@ jobs:
steps:
-
name: Checkout source code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3.1.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.1
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -39,7 +39,7 @@ jobs:
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2.6.1
uses: docker/build-push-action@v3
with:
context: .
push: true

View File

@ -19,9 +19,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies

View File

@ -16,7 +16,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v6
with:
days-before-pr-stale: 60
days-before-pr-close: 7
@ -35,7 +35,7 @@ jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v6
with:
days-before-pr-stale: -1
days-before-pr-close: -1

View File

@ -4,4 +4,4 @@ ports:
tasks:
- before: pip3 install -r requirements.txt
command: make webserver
command: make live-html

View File

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

View File

@ -1,5 +1,5 @@
ESPHOME_PATH = ../esphome
ESPHOME_REF = 2022.6.2
ESPHOME_REF = 2022.9.4
.PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -186,3 +186,7 @@ div.index-shields {
margin-left: 32px;
}
}
.breadcrumbs li {
display: inline;
}

View File

@ -1 +1 @@
2022.6.2
2022.9.4

View File

@ -27,6 +27,17 @@
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
{% endblock %}
{% block relbar_top %}
{% if parents|length > 0 %}
<ul class="breadcrumbs">
{%- for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{%- endfor %}
<li>{{title}}</li>
</ul>
{% endif %}
{% endblock %}
{% block footer %}
<div id="upgrade-footer">
A new version has been release since you last visited this page: {{ release }} 🎉

View File

@ -97,6 +97,15 @@ Release 2022.6.2 - June 23
- Media Player: added play_media action :esphomepr:`3579` by :ghuser:`dudanov`
- Fix 2 small issues in BLEClient :esphomepr:`3544` by :ghuser:`jhansche`
Release 2022.6.3 - August 8
---------------------------
- FIX: Modbus queue deduplicator deleting custom commands :esphomepr:`3650` by :ghuser:`jpeletier`
- Update inkbird_ibsth1_mini.cpp :esphomepr:`3664` by :ghuser:`ssieb`
- Add CO device class to binary_sensor :esphomepr:`3656` by :ghuser:`berg`
- Use application/json instead of text/json :esphomepr:`3671` by :ghuser:`ssieb`
- Use correct struct members. :esphomepr:`3672` by :ghuser:`ssieb`
Breaking Changes
----------------

208
changelog/2022.8.0.rst Normal file
View File

@ -0,0 +1,208 @@
ESPHome 2022.8.0 - 17th August 2022
===================================
.. seo::
:description: Changelog for ESPHome 2022.8.0.
:image: /_static/changelog-2022.8.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 3
DAC7678, components/output/dac7678, dac7678.svg
Sprinkler, components/sprinkler, sprinkler-variant.svg
Feedback Cover, components/cover/feedback, feedback_cover.svg
SMT100, components/sensor/smt100, smt100.jpg, Moisture & Temperature
Whynter IR Climate, components/climate/climate_ir, air-conditioner-ir.svg
Bluetooth Proxy, components/bluetooth_proxy, bluetooth.svg
Bluetooth Proxy
---------------
ESPHome 2022.8.2 brings a new feature that allows you to use your ESP32 devices as Bluetooth Proxies for Home Assistant.
They will forward the BLE Advertisements to Home Assistant which will then trigger a discovery and allow you to set up
an integration for the found devices. This allows you to set up multiple ESP32 Bluetooth Proxies around the area to make
sure all advertisements are received reliably.
We have created a few examples that are ready to flash directly from your browser for some specific devices:
https://esphome.github.io/bluetooth-proxies/
Sprinkler controller
--------------------
:ghuser:`kbx81` has written a beast of a sprinkler controller to help organise and schedule all of your sprinkler valves
and keep those plants and veggies thriving. Check out the docs at :doc:`/components/sprinkler`.
ST7789V
-------
The :doc:`/components/display/st7789v` display platform has had an update which adds a ``model`` configuration option.
With this comes custom width and heights to allow you to use this with any display using this driver now.
Breaking Changes
----------------
There are a few breaking changes this release, including removing ``min_save_interval`` from
the :doc:`/components/sensor/integration` and :doc:`/components/sensor/total_daily_energy`.
The BedJet climate introduced recently has also undergone a refactoring to allow different
platforms to extend the functionality available from ESPHome.
Release 2022.8.1 - September 1
------------------------------
- fix grow password setting :esphomepr:`3722` by :ghuser:`ssieb`
- Fix SPI HW selection for ESP32 variants :esphomepr:`3728` by :ghuser:`kbx81`
Release 2022.8.2 - September 6
------------------------------
- Initial bluetooth_proxy support :esphomepr:`3736` by :ghuser:`jesserockz` (new-integration)
- Ignore NaN states in the integration component :esphomepr:`3767` by :ghuser:`anatoly-savchenkov`
- Update modbus_controller.cpp :esphomepr:`3768` by :ghuser:`Avirsaam`
Release 2022.8.3 - September 6
------------------------------
- Fix HA addon auth using HA credentials :esphomepr:`3758` by :ghuser:`jesserockz`
Full list of changes
--------------------
New Components
^^^^^^^^^^^^^^
- DAC7678 support :esphomepr:`3441` by :ghuser:`NickB1` (new-integration)
- Add support for SMT100 Soil Moisture Sensor :esphomepr:`3654` by :ghuser:`piechade` (new-integration)
- Adding support for Whynter ARC-14S/SH Air Conditioners :esphomepr:`3641` by :ghuser:`aeonsablaze` (new-integration)
- Sprinkler controller component :esphomepr:`2249` by :ghuser:`kbx81` (new-integration)
- Create feedback cover component :esphomepr:`3253` by :ghuser:`ianchi` (new-integration)
Breaking Changes
^^^^^^^^^^^^^^^^
- Remove min_save_interval from intergration and total_daily_energy :esphomepr:`3498` by :ghuser:`jesserockz` (breaking-change)
- Rework NaN handling in sensor filters :esphomepr:`3610` by :ghuser:`DAVe3283` (breaking-change)
- Extend ST7789V component to support additional displays :esphomepr:`3651` by :ghuser:`kbx81` (breaking-change)
- Refactor BedJet climate into Hub component :esphomepr:`3522` by :ghuser:`jhansche` (breaking-change)
Beta Changes
^^^^^^^^^^^^
- Improve Web view for Climate components :esphomepr:`3706` by :ghuser:`anatoly-savchenkov`
- Add vector include :esphomepr:`3707` by :ghuser:`jesserockz`
- Add state_class total :esphomepr:`3608` by :ghuser:`peterg79`
- add gradient color V2.0 :esphomepr:`3709` by :ghuser:`nielsnl68`
- Webui small fixes :esphomepr:`3713` by :ghuser:`anatoly-savchenkov`
- Only trigger ble_client on_connect after discovering services :esphomepr:`3710` by :ghuser:`buxtronix`
- Fixes BLE remote address type when connecting :esphomepr:`3702` by :ghuser:`rbaron`
- Makes ble_client.ble_write's action value templatable :esphomepr:`3715` by :ghuser:`rbaron`
All changes
^^^^^^^^^^^
- Refactor vl53l0x to remove code from header. :esphomepr:`3536` by :ghuser:`RoboMagus`
- Fix modbus user-defined function handling :esphomepr:`3527` by :ghuser:`gazoodle`
- Language schema 202204 :esphomepr:`3492` by :ghuser:`glmnet`
- Fix / Reverse order shutdown :esphomepr:`3585` by :ghuser:`RoboMagus`
- RestoringGlobalsComponent: Store value on shutdown :esphomepr:`3586` by :ghuser:`RoboMagus`
- Map LOLIN C3 mini board pins :esphomepr:`3587` by :ghuser:`mateusdemboski`
- Bump platformio to 6.0.2 :esphomepr:`3566` by :ghuser:`jesserockz`
- Bump pylint from 2.13.9 to 2.14.3 :esphomepr:`3589` by :ghuser:`dependabot[bot]`
- DAC7678 support :esphomepr:`3441` by :ghuser:`NickB1` (new-integration)
- Correcting ESP32 flash save/load key calculation algorithm :esphomepr:`3416` by :ghuser:`cinadr`
- Bump aioesphomeapi from 10.8.2 to 10.10.0 :esphomepr:`3590` by :ghuser:`dependabot[bot]`
- Do two substitutions passes to allow substitutions inside substitutions :esphomepr:`3583` by :ghuser:`jesserockz`
- Update actions :esphomepr:`3592` by :ghuser:`wrt54g`
- Add github-actions to dependabot :esphomepr:`3595` by :ghuser:`jesserockz`
- Fix some typos found by codespell :esphomepr:`3598` by :ghuser:`misery`
- #3358 Correct temperature validity detection issue in some conditions of pu… :esphomepr:`3545` by :ghuser:`Benoit3`
- Remove min_save_interval from intergration and total_daily_energy :esphomepr:`3498` by :ghuser:`jesserockz` (breaking-change)
- Bump zeroconf from 0.38.4 to 0.38.7 :esphomepr:`3562` by :ghuser:`dependabot[bot]`
- fix EDict to dict mapping in helpers.py :esphomepr:`3599` by :ghuser:`jpeletier`
- Fix slow_pwm output glitch :esphomepr:`3601` by :ghuser:`marshn`
- Bump pyupgrade from 2.32.1 to 2.34.0 :esphomepr:`3591` by :ghuser:`dependabot[bot]`
- Bump black from 22.3.0 to 22.6.0 :esphomepr:`3613` by :ghuser:`dependabot[bot]`
- Bump colorama from 0.4.4 to 0.4.5 :esphomepr:`3614` by :ghuser:`dependabot[bot]`
- Bump pylint from 2.14.3 to 2.14.4 :esphomepr:`3617` by :ghuser:`dependabot[bot]`
- Bump pytest-mock from 3.7.0 to 3.8.1 :esphomepr:`3616` by :ghuser:`dependabot[bot]`
- Update dfplayer condition function name :esphomepr:`3619` by :ghuser:`dab0g`
- Added more sensor device classes :esphomepr:`3624` by :ghuser:`lal12`
- Improvement pipsolar crc :esphomepr:`3316` by :ghuser:`andreashergert1984`
- Fix configuration constants in core. :esphomepr:`3652` by :ghuser:`RoboMagus`
- FIX: NVS preferences being written even if unchanged :esphomepr:`3647` by :ghuser:`jpeletier`
- Add 'set_total_pulses' action to 'pulse_counter' sensor. :esphomepr:`3640` by :ghuser:`RoboMagus`
- add option to publish initial state of binary sensors :esphomepr:`3636` by :ghuser:`ssieb`
- update packages: nginx-light-1.18.0-6.1+deb11u2 nano-5.4-2+deb11u1 :esphomepr:`3631` by :ghuser:`peterg79`
- Add support for SMT100 Soil Moisture Sensor :esphomepr:`3654` by :ghuser:`piechade` (new-integration)
- Rework NaN handling in sensor filters :esphomepr:`3610` by :ghuser:`DAVe3283` (breaking-change)
- Remove deprecated adc init call. :esphomepr:`3667` by :ghuser:`ssieb`
- List webserver service on MDNS if enabled. :esphomepr:`3662` by :ghuser:`RoboMagus`
- Show changes from python linting :esphomepr:`3677` by :ghuser:`jesserockz`
- dalybms: support changing the address :esphomepr:`3676` by :ghuser:`ssieb`
- Upgrade rweather/Crypto from 0.2.0 to 0.4.0 :esphomepr:`3593` by :ghuser:`sybrenstuvel`
- Allow GPIO20 for ESP32 :esphomepr:`3680` by :ghuser:`ashald`
- Remove old unused code in mcp23xxx_base :esphomepr:`3685` by :ghuser:`jesserockz`
- Adding option to report signal strength on pvvx_mithermometer :esphomepr:`3688` by :ghuser:`doolbneerg`
- Pass optional args to 'new_Pvariable' when creating new entities :esphomepr:`3690` by :ghuser:`RoboMagus`
- fix sx1509 use of pullup and pulldown :esphomepr:`3689` by :ghuser:`ssieb`
- Add a soft reset in setup() for bme280. :esphomepr:`3615` by :ghuser:`dbaarda`
- Add get_ap() method to WiFi :esphomepr:`3684` by :ghuser:`anatoly-savchenkov`
- Extend ST7789V component to support additional displays :esphomepr:`3651` by :ghuser:`kbx81` (breaking-change)
- Fix panic abort when BLEClient reconnects :esphomepr:`3594` by :ghuser:`dentra`
- Introduces ble_client.ble_write Action :esphomepr:`3398` by :ghuser:`rbaron`
- Add helpers to switch python for schema and codegen :esphomepr:`3693` by :ghuser:`jesserockz`
- Refactor BedJet climate into Hub component :esphomepr:`3522` by :ghuser:`jhansche` (breaking-change)
- Added support for setting the current animation frame :esphomepr:`3681` by :ghuser:`davestubbs`
- Adding support for Whynter ARC-14S/SH Air Conditioners :esphomepr:`3641` by :ghuser:`aeonsablaze` (new-integration)
- Sprinkler controller component :esphomepr:`2249` by :ghuser:`kbx81` (new-integration)
- add gradient color :esphomepr:`3687` by :ghuser:`nielsnl68`
- [Nextion] Add on_page trigger :esphomepr:`3673` by :ghuser:`anatoly-savchenkov`
- Bump pyupgrade from 2.34.0 to 2.37.3 :esphomepr:`3670` by :ghuser:`dependabot[bot]`
- Bump aioesphomeapi from 10.10.0 to 10.11.0 :esphomepr:`3669` by :ghuser:`dependabot[bot]`
- Create feedback cover component :esphomepr:`3253` by :ghuser:`ianchi` (new-integration)
- Bump pytest-asyncio from 0.18.3 to 0.19.0 :esphomepr:`3695` by :ghuser:`dependabot[bot]`
- Bump zeroconf from 0.38.7 to 0.39.0 :esphomepr:`3694` by :ghuser:`dependabot[bot]`
- Bump pytest-mock from 3.8.1 to 3.8.2 :esphomepr:`3622` by :ghuser:`dependabot[bot]`
- Bump flake8 from 4.0.1 to 5.0.4 :esphomepr:`3703` by :ghuser:`dependabot[bot]`
- Bump pylint from 2.14.4 to 2.14.5 :esphomepr:`3697` by :ghuser:`dependabot[bot]`
- Add priority to on_shutdown trigger :esphomepr:`3644` by :ghuser:`RoboMagus`
- Improve Web view for Climate components :esphomepr:`3706` by :ghuser:`anatoly-savchenkov`
- Add vector include :esphomepr:`3707` by :ghuser:`jesserockz`
- Add state_class total :esphomepr:`3608` by :ghuser:`peterg79`
- add gradient color V2.0 :esphomepr:`3709` by :ghuser:`nielsnl68`
- Webui small fixes :esphomepr:`3713` by :ghuser:`anatoly-savchenkov`
- Only trigger ble_client on_connect after discovering services :esphomepr:`3710` by :ghuser:`buxtronix`
- Fixes BLE remote address type when connecting :esphomepr:`3702` by :ghuser:`rbaron`
- Makes ble_client.ble_write's action value templatable :esphomepr:`3715` by :ghuser:`rbaron`
Past Changelogs
---------------
- :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`

194
changelog/2022.9.0.rst Normal file
View File

@ -0,0 +1,194 @@
ESPHome 2022.9.0 - 21st September 2022
======================================
.. seo::
:description: Changelog for ESPHome 2022.9.0.
:image: /_static/changelog-2022.9.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 4
DPS310, components/sensor/dps310, dps310.jpg
MCP9600, components/sensor/mcp9600, mcp9600.jpg
TM1621, components/display/tm1621, tm1621.jpg
MPL3115A2, components/sensor/mpl3115a2, mpl3115a2.jpg
uFire EC sensor, components/sensor/ufire_ec, ufire_ec.png
uFire ISE sensor, components/sensor/ufire_ise, ufire_ise.png
Factory Reset Switch, components/switch/factory_reset, restart-alert.svg
Factory Reset Button, components/button/factory_reset, restart-alert.svg
TM1638, components/display/tm1638, tm1638.jpg
BL0942, components/sensor/bl0942, bl0942.png
ESPHome Editor
--------------
The editor used in ESPHome has been swapped out for Monaco thanks to :ghuser:`glmnet`. He has
been working hard to make the experience of writing your YAML configurations easier and it now
supports auto completion with popups to show you more information.
Factory Reset
-------------
A new Factory Reset switch and button has been added this release, allowing resetting of information such
as counters, restored values, and more importantly, the wifi credentials of a device that has been set up
using the captive portal such as pre-flashed devices you would have purchased.
Bluetooth Active Connections
----------------------------
ESPHome 2022.9.3 adds active connections to the ``bluetooth_proxy`` component allowing Home Assistant
to connect to and control supported devices.
Release 2022.9.1 - September 22
-------------------------------
- Revert "fix spi timing issues" :esphomepr:`3838` by :ghuser:`jesserockz`
Release 2022.9.2 - September 29
-------------------------------
- Bump dashboard to 20220925.0 :esphomepr:`3846` by :ghuser:`glmnet`
Release 2022.9.3 - October 6
----------------------------
- Bluetooth Proxy active connections :esphomepr:`3817` by :ghuser:`jesserockz`
Release 2022.9.4 - October 7
----------------------------
- Add network type to mdns service message :esphomepr:`3880` by :ghuser:`jesserockz`
- Bump esphome-dashboard to 20221007.0 :esphomepr:`3881` by :ghuser:`jesserockz`
- Dont add wifi block to yaml if discovered device uses ethernet :esphomepr:`3882` by :ghuser:`jesserockz`
Full list of changes
--------------------
New Components
^^^^^^^^^^^^^^
- Add dps310 sensor support :esphomepr:`3704` by :ghuser:`kbx81` (new-integration)
- Support for MCP9600 Thermocouple Amplifier :esphomepr:`3700` by :ghuser:`MrEditor97` (new-integration)
- Add support to tm1621 display :esphomepr:`3737` by :ghuser:`Philippe12` (new-integration)
- u-fire EC sensor :esphomepr:`3774` by :ghuser:`pvizeli` (new-integration)
- Add support for MPL3115A2 Pressure/Altitude and Temperature Sensor :esphomepr:`3371` by :ghuser:`kbickar` (new-integration)
- Add support for BL0942 voltage, current, energy and power Sensor :esphomepr:`3777` by :ghuser:`dbuezas` (new-integration)
- Add Factory Reset button and switch :esphomepr:`3724` by :ghuser:`anatoly-savchenkov` (new-integration)
- Add support for TM1638 Led and Key component :esphomepr:`3340` by :ghuser:`skykingjwc` (new-integration)
- Add uFire ISE sensor :esphomepr:`3789` by :ghuser:`pvizeli` (new-integration)
Beta Changes
^^^^^^^^^^^^
- null initialize total sensor for pulse counter :esphomepr:`3803` by :ghuser:`RoboMagus`
- Sim800l add calls, multiline sms and ussd :esphomepr:`3630` by :ghuser:`glmnet`
- Unify 'nullptr' initalization of class members; :esphomepr:`3805` by :ghuser:`RoboMagus`
- Initialize all child sensors to nullptr :esphomepr:`3808` by :ghuser:`jesserockz`
- Remove floating point calculation from ac_dimmer ISR :esphomepr:`3770` by :ghuser:`Azimath`
- split pronto codes if they are too long :esphomepr:`3812` by :ghuser:`ssieb`
- [BME280] raise standby time :esphomepr:`3804` by :ghuser:`h3ndrik`
- Make sprinkler reset_resume() method public :esphomepr:`3824` by :ghuser:`kbx81`
- Bump dashboard to 20220919.1 :esphomepr:`3828` by :ghuser:`balloob`
- Fix-esphome-validation-line-number :esphomepr:`3815` by :ghuser:`glmnet`
- Bump dashboard to 20220920.0 :esphomepr:`3831` by :ghuser:`balloob`
- Bump dashboard to 20220920.1 :esphomepr:`3834` by :ghuser:`glmnet`
All changes
^^^^^^^^^^^
- support modifying the apds9960 settings :esphomepr:`3708` by :ghuser:`ssieb`
- Add support for pvvx mithermometer display via ble client :esphomepr:`3333` by :ghuser:`puuu`
- Improve OTA error messages adding return codes :esphomepr:`3698` by :ghuser:`IgnacioHR`
- Send CR also for commands for sim800l :esphomepr:`3719` by :ghuser:`ssieb`
- hydreon_rgxx: Support lens_bad, em_sat and temperature :esphomepr:`3642` by :ghuser:`functionpointer`
- wifi: support 802.11k and 802.11v :esphomepr:`3600` by :ghuser:`stintel`
- Add final validate for i2c with mix/max frequency :esphomepr:`3727` by :ghuser:`jesserockz`
- Add dps310 sensor support :esphomepr:`3704` by :ghuser:`kbx81` (new-integration)
- Let favicon be cached :esphomepr:`3729` by :ghuser:`slovdahl`
- Add bitmap font support :esphomepr:`3573` by :ghuser:`justfalter`
- add log messages for bad pronto codes :esphomepr:`3738` by :ghuser:`ssieb`
- add color compare operator's :esphomepr:`3730` by :ghuser:`nielsnl68`
- Support for MCP9600 Thermocouple Amplifier :esphomepr:`3700` by :ghuser:`MrEditor97` (new-integration)
- Support high update rates and fix several bugs in the cse7766 component. :esphomepr:`3675` by :ghuser:`fhriley`
- Add Prometheus metrics relabeling :esphomepr:`3734` by :ghuser:`jangrewe`
- mcp23017: read output latch registers during setup :esphomepr:`3744` by :ghuser:`andyboeh`
- Captive portal show nearby WiFi with no ssid configured :esphomepr:`3748` by :ghuser:`anatoly-savchenkov`
- Remove unnecessary schema extension on template button :esphomepr:`3753` by :ghuser:`jesserockz`
- Tidy up switch schemas :esphomepr:`3754` by :ghuser:`jesserockz`
- Add IP101 support to Ethernet component :esphomepr:`3751` by :ghuser:`kbx81`
- Add BedJet Fan child component :esphomepr:`3735` by :ghuser:`jhansche`
- ibeacon support for the ble_rssi sensor :esphomepr:`3745` by :ghuser:`wjtje`
- Add AEHA IR Protocol :esphomepr:`3726` by :ghuser:`hazi`
- Add sum type to binary_sensor_map :esphomepr:`3541` by :ghuser:`fbrthld`
- Bump aioesphomeapi from 10.11.0 to 10.13.0 :esphomepr:`3740` by :ghuser:`dependabot[bot]`
- Bump pylint from 2.14.5 to 2.15.0 :esphomepr:`3746` by :ghuser:`dependabot[bot]`
- Esp32 pulsecounter optional pcnt :esphomepr:`3691` by :ghuser:`RoboMagus`
- Bump black from 22.6.0 to 22.8.0 :esphomepr:`3760` by :ghuser:`dependabot[bot]`
- Various ili9341 fixes :esphomepr:`3756` by :ghuser:`nielsnl68`
- Add the same docker tags as used in HA :esphomepr:`3752` by :ghuser:`andrey-yantsen`
- Bump pytest from 7.1.1 to 7.1.3 :esphomepr:`3766` by :ghuser:`dependabot[bot]`
- Remove unneeded line (spi component adds it) :esphomepr:`3778` by :ghuser:`jesserockz`
- Move crc16 to helpers :esphomepr:`3780` by :ghuser:`jesserockz`
- YAML linting :esphomepr:`3779` by :ghuser:`jesserockz`
- Add support to tm1621 display :esphomepr:`3737` by :ghuser:`Philippe12` (new-integration)
- u-fire EC sensor :esphomepr:`3774` by :ghuser:`pvizeli` (new-integration)
- Add support for MPL3115A2 Pressure/Altitude and Temperature Sensor :esphomepr:`3371` by :ghuser:`kbickar` (new-integration)
- Add support for BL0942 voltage, current, energy and power Sensor :esphomepr:`3777` by :ghuser:`dbuezas` (new-integration)
- Bump pylint from 2.15.0 to 2.15.2 :esphomepr:`3785` by :ghuser:`dependabot[bot]`
- Add Factory Reset button and switch :esphomepr:`3724` by :ghuser:`anatoly-savchenkov` (new-integration)
- [MPU6050] Support devices with WHOAMI 0x98 :esphomepr:`3784` by :ghuser:`CarlosGS`
- Bump zeroconf from 0.39.0 to 0.39.1 :esphomepr:`3782` by :ghuser:`dependabot[bot]`
- Add support for TM1638 Led and Key component :esphomepr:`3340` by :ghuser:`skykingjwc` (new-integration)
- Remove status_set_error from ufire_ec :esphomepr:`3792` by :ghuser:`pvizeli`
- Bump frenck/action-yamllint from 1.2.0 to 1.3.0 :esphomepr:`3798` by :ghuser:`dependabot[bot]`
- esp32_ble_tracker continuous and one shot scanning modes :esphomepr:`3649` by :ghuser:`jonofmac`
- Add stop action for ble scanning :esphomepr:`3799` by :ghuser:`jesserockz`
- Add Prometheus Service Discovery for online devices :esphomepr:`3788` by :ghuser:`cznewt`
- Allow ble tracker to subscribe to ota start and stop the scanning :esphomepr:`3800` by :ghuser:`jesserockz`
- Add uFire ISE sensor :esphomepr:`3789` by :ghuser:`pvizeli` (new-integration)
- fix spi timing issues :esphomepr:`3763` by :ghuser:`IgnacioHR`
- null initialize total sensor for pulse counter :esphomepr:`3803` by :ghuser:`RoboMagus`
- Sim800l add calls, multiline sms and ussd :esphomepr:`3630` by :ghuser:`glmnet`
- Unify 'nullptr' initalization of class members; :esphomepr:`3805` by :ghuser:`RoboMagus`
- Initialize all child sensors to nullptr :esphomepr:`3808` by :ghuser:`jesserockz`
- Remove floating point calculation from ac_dimmer ISR :esphomepr:`3770` by :ghuser:`Azimath`
- split pronto codes if they are too long :esphomepr:`3812` by :ghuser:`ssieb`
- [BME280] raise standby time :esphomepr:`3804` by :ghuser:`h3ndrik`
- Make sprinkler reset_resume() method public :esphomepr:`3824` by :ghuser:`kbx81`
- Bump dashboard to 20220919.1 :esphomepr:`3828` by :ghuser:`balloob`
- Fix-esphome-validation-line-number :esphomepr:`3815` by :ghuser:`glmnet`
- Bump dashboard to 20220920.0 :esphomepr:`3831` by :ghuser:`balloob`
- Bump dashboard to 20220920.1 :esphomepr:`3834` by :ghuser:`glmnet`
Past Changelogs
---------------
- :doc:`2022.8.0`
- :doc:`2022.6.0`
- :doc:`2022.5.0`
- :doc:`2022.4.0`
- :doc:`2022.3.0`
- :doc:`2022.2.0`
- :doc:`2022.1.0`
- :doc:`2021.12.0`
- :doc:`2021.11.0`
- :doc:`2021.10.0`
- :doc:`2021.9.0`
- :doc:`2021.8.0`
- :doc:`v1.20.0`
- :doc:`v1.19.0`
- :doc:`v1.18.0`
- :doc:`v1.17.0`
- :doc:`v1.16.0`
- :doc:`v1.15.0`
- :doc:`v1.14.0`
- :doc:`v1.13.0`
- :doc:`v1.12.0`
- :doc:`v1.11.0`
- :doc:`v1.10.0`
- :doc:`v1.9.0`
- :doc:`v1.8.0`
- :doc:`v1.7.0`

View File

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

42
components.py Normal file
View File

@ -0,0 +1,42 @@
import os
import json
def setup(app):
"""Setup connects events to the components output builder"""
app.connect("html-page-context", add_component_details)
app.connect("build-finished", create_output)
app.compoents_output = {}
is_production = os.getenv("NETLIFY") == "true"
return {
"version": "1.0.0",
"parallel_read_safe": True,
"parallel_write_safe": not is_production,
}
def add_component_details(app, pagename, templatename, context, doctree):
"""As each page is built, collect page details for the output."""
if pagename.startswith("components/"):
page_key = pagename[11:].replace("/", "_")
component_name = pagename.split("/")[-1]
page_data = {
"title": context["title"],
"url": context["pageurl"],
"path": context["pagename"],
}
if os.path.exists(os.path.join(app.builder.srcdir, "images", component_name + ".png")):
page_data["image"] = app.builder.config.html_baseurl + "/_images/" + component_name + ".png"
elif os.path.exists(os.path.join(app.builder.srcdir, "images", component_name + ".jpg")):
page_data["image"] = app.builder.config.html_baseurl + "/_images/" + component_name + ".jpg"
app.compoents_output[page_key] = page_data
def create_output(app, exception):
"""Generates the components.json from the collected component pages"""
with open(os.path.join(app.builder.outdir, "components.json"), "wt") as f:
f.write(json.dumps(app.compoents_output))

View File

@ -40,7 +40,23 @@ Configuration variables:
- **too_cold** (*Optional*): ``true`` if the sensor reports being too cold. Hydreon only mentions this feature for the RG-9.
- **name** (**Required**, string): The name for the voltage sensor.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
- **lens_bad** (*Optional*): ``true`` if the sensor reports the lens being bad.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
- **em_sat** (*Optional*): ``true`` if the sensor reports the Emitter being saturated.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.

View File

@ -60,6 +60,8 @@ Advanced options:
- **disabled_by_default** (*Optional*, boolean): If true, then this entity should not be added to any client's frontend,
(usually Home Assistant) without the user manually enabling it (via the Home Assistant UI).
Requires Home Assistant 2021.9 or newer. Defaults to ``false``.
- **publish_initial_state** (*Optional*, boolean): If true, then the sensor will publish its initial state at boot or when
HA first connects, depending on the platform. This means that any applicable triggers will be run. Defaults to ``false``.
- **entity_category** (*Optional*, string): The category of the entity.
See https://developers.home-assistant.io/docs/core/entity/#generic-properties
for a list of available options. Requires Home Assistant 2021.11 or newer.

View File

@ -91,6 +91,48 @@ This automation is triggered when the client disconnects from a BLE device.
- lambda: |-
ESP_LOGD("ble_client_lambda", "Disconnected from BLE device");
.. _ble_client-ble_write_action:
``ble_client.ble_write`` Action
-------------------------------
This action triggers a write to a specified BLE characteristic. The write is attempted in
a best-effort fashion and will only succeed if the ``ble_client``'s connection has been
established and the peripheral exposes the expected BLE service and characteristic.
Example usage:
.. code-block:: yaml
ble_client:
- mac_address: 11:22:33:44:55:66
id: my_ble_client
switch:
- platform: template
name: "My Switch"
turn_on_action:
- ble_client.ble_write:
id: my_ble_client
service_uuid: F61E3BE9-2826-A81B-970A-4D4DECFABBAE
characteristic_uuid: 6490FAFE-0734-732C-8705-91B653A081FC
# List of bytes to write.
value: [0x01, 0xab, 0xff]
- ble_client.ble_write:
id: my_ble_client
service_uuid: F61E3BE9-2826-A81B-970A-4D4DECFABBAE
characteristic_uuid: 6490FAFE-0734-732C-8705-91B653A081FC
# A lambda returning an std::vector<uint8_t>.
value: !lambda |-
return {0x13, 0x37};
Configuration variables:
- **id** (**Required**, :ref:`config-id`): ID of the associated BLE client.
- **service_uuid** (**Required**, UUID): UUID of the service to write to.
- **characteristic_uuid** (**Required**, UUID): UUID of the service's characteristic to write to.
- **value** (**Required**, Array of bytes or :ref:`lambda <config-lambda>`): The value to be written.
BLE Overview
------------
This section gives a brief overview of the Bluetooth LE architecture

View File

@ -0,0 +1,45 @@
Bluetooth Proxy
===============
.. seo::
:description: Instructions for setting up the Bluetooth Proxy in ESPHome.
:image: bluetooth.svg
Home Assistant can expand its Bluetooth reach by communicating through
the Bluetooth proxy component in ESPHome. Place your ESPHome devices close to the
Bluetooth devices that you want to interact with for the best
experience.
If you're looking to create a device that is just a Bluetooth Proxy, see our `Bluetooth Proxy installer <https://esphome.github.io/bluetooth-proxies/>`__ website.
The Bluetooth proxy depends on :doc:`esp32_ble_tracker` so make sure to add that to your configuration.
.. note::
Bluetooth proxy requires Home Assistant 2022.9 or later.
.. note::
The Bluetooth proxy of ESPHome currently only provides Home Assistant with passive sensor
data that is advertised by certain devices. Not all devices are supported and ESPHome does not decode or keep a list.
To find out if your device is supported, please search for it in the `Home Assistant Integrations <https://www.home-assistant.io/integrations/>`__ list.
The Individual device integrations in Home Assistant (such as BTHome) will receive the data from the Bluetooth Integration in Home Assistant
which automatically aggregates all ESPHome bluetooth proxies with any USB Bluetooth Adapters you might have.
Configuration:
--------------
.. code-block::
bluetooth_proxy:
- **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``. Requires Home Assistant 2022.10 or later.
See Also
--------
- :doc:`esp32_ble_tracker`
- :apiref:`bluetooth_proxy/bluetooth_proxy.h`
- BTHome `<https://bthome.io/>`__
- :ghedit:`Edit`

View File

@ -0,0 +1,51 @@
Factory Reset Button
====================
.. seo::
:description: Instructions for setting up buttons that can remotely invalidate all ESPHome preferences stored in flash and reboot ESP.
:image: restart.svg
The ``factory_reset`` button allows you to remotely invalidate (reset) all ESPHome :ref:`preferences <preferences-flash_write_interval>` stored in flash memory and reboot your node.
After reboot all states, parameters and variables will be reinitialized with their default values. This is useful:
- for devices preflashed with ESPHome to reset behavior back to factory state
- in case of moving a device to a new environment or starting a new use-case (e.g. reset counters or state)
- for privacy concerns when giving away a device
.. note::
**USE WITH GREAT CAUTION!** All credentials, global variables, counters and saved states stored in non-volatile memory will be lost with no chance of recovering them.
Even raw reading of flash memory with ``esptool`` will not help, since data is physically erased from flash memory.
For devices configured using :doc:`captive portal </components/captive_portal>`, this will reset WiFi settings as well, thus making such devices offline.
You'll need to be in close proximity to your device to configure it again using a built-in WiFi access point and captive portal.
.. figure:: images/factory-rst-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
button:
- platform: factory_reset
name: Restart with Factory Default Settings
Configuration variables:
------------------------
- **name** (**Required**, string): The name of the button.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Button <config-button>`.
See Also
--------
- :doc:`shutdown`
- :doc:`restart`
- :doc:`safe_mode`
- :doc:`/components/switch/factory_reset`
- :doc:`template`
- :apiref:`factory_reset/factory_reset_button.h`
- :ghedit:`Edit`

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -25,6 +25,9 @@ Configuration variables:
See Also
--------
- :doc:`shutdown`
- :doc:`safe_mode`
- :doc:`factory_reset`
- :doc:`/components/switch/restart`
- :doc:`template`
- :apiref:`restart/button/restart_button.h`

View File

@ -33,6 +33,8 @@ See Also
- :doc:`shutdown`
- :doc:`restart`
- :doc:`factory_reset`
- :doc:`/components/switch/safe_mode`
- :doc:`template`
- :apiref:`safe_mode/safe_mode_button.h`
- :ghedit:`Edit`

View File

@ -32,6 +32,9 @@ See Also
--------
- :doc:`restart`
- :doc:`safe_mode`
- :doc:`factory_reset`
- :doc:`/components/switch/shutdown`
- :doc:`template`
- :apiref:`shutdown/shutdown_button.h`
- :ghedit:`Edit`

View File

@ -5,8 +5,8 @@ BedJet
:description: Instructions for setting up a BedJet climate device.
:image: bedjet.png
The ``bedjet`` climate platform creates a climate device which can be used to control
a BedJet V3 Climate Comfort Sleep System.
The ``bedjet`` component allows you to communicate with a BedJet V3 Climate Comfort
Sleep System.
This component supports the following functionality:
@ -16,36 +16,40 @@ This component supports the following functionality:
- Start one of the saved memory presets, including "Biorhythm" programs
- Show the current status of the BedJet
This platform uses the BLE peripheral on an ESP32, so you also need to enable
This component uses the BLE peripheral on an ESP32, so you also need to enable
this component. Please see the :doc:`/components/ble_client` docs for how to discover the MAC
address of your BedJet device, or you can find the list of paired MAC addresses in
the "DEVICE LIST" section of the BedJet mobile application.
Component/Hub
-------------
This component is a global hub that maintains the connection to the BedJet device
and delegates status updates to individual platform components.
.. code-block:: yaml
ble_client:
- mac_address: 11:22:33:aa:bb:cc
id: ble_bedjet
esp32_ble_tracker:
climate:
- platform: bedjet
id: my_bedjet_fan
name: "My BedJet Fan"
ble_client_id: ble_bedjet
ble_client:
- mac_address: C4:4F:33:00:00:01
id: bedjet_ble_id1
bedjet:
- id: bedjet_1
ble_client_id: bedjet_ble_id1
Configuration variables:
------------------------
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the climate device.
- **ble_client_id** (**Required**, :ref:`config-id`): The ID of the BLE Client.
- **time_id** (*Optional*, :ref:`config-id`): The ID of a :ref:`Time Component <time>` which
can be used to set the time on the BedJet device.
- **heat_mode** (*Optional*, string): The primary heating mode to use for `HVACMode.HEAT`:
- ``"heat"`` (Default) - Setting ``hvac_mode=heat`` uses the BedJet "HEAT" mode.
- ``"extended"`` - Setting ``hvac_mode=heat`` uses BedJet "EXT HEAT" mode.
- Whichever is not selected will be made available as a custom preset.
- All other options from :ref:`Climate <config-climate>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to dispatch status
changes to child components. Defaults to ``5s``. Each child component can decide whether to
publish its own updated state on this interval, or use another (longer) update interval to
throttle its own updates.
lambda calls
************
@ -58,11 +62,11 @@ From :ref:`lambdas <config-lambda>`, you can call methods to do some advanced st
button:
- platform: template
name: "Check Bedjet Firmware"
name: "Check Bedjet(1) Firmware"
on_press:
then:
- lambda: |-
id(my_bedjet_fan).upgrade_firmware();
id(bedjet_1).upgrade_firmware();
- ``.send_local_time``: If `time_id` is set, attempt to sync the clock now.
@ -88,6 +92,61 @@ From :ref:`lambdas <config-lambda>`, you can call methods to do some advanced st
- lambda: |-
id(my_bedjet_fan).set_clock(22, 10);
``bedjet`` Climate
------------------
The ``climate`` platform exposes the BedJet's climate-related functionality, including
setting the mode and target temperature.
.. code-block:: yaml
climate:
- platform: bedjet
id: my_bedjet_climate_entity
name: "My BedJet"
bedjet_id: bedjet_1
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the climate device.
- **bedjet_id** (**Required**, :ref:`config-id`): The ID of the Bedjet component.
- **heat_mode** (*Optional*, string): The primary heating mode to use for ``HVACMode.HEAT``:
- ``heat`` (Default) - Setting ``hvac_mode=heat`` uses the BedJet "HEAT" mode.
- ``extended`` - Setting ``hvac_mode=heat`` uses BedJet "EXT HEAT" mode.
Whichever is not selected will be made available as a custom preset.
- All other options from :ref:`Climate <config-climate>`.
``bedjet`` Fan
--------------
The `fan` platform exposes the BedJet's fan-related functionality, including
on/off and speed control.
When the BedJet is already on, turning the Fan component off will set the BedJet unit's mode to
``OFF``. If it was not already on, it will be turned on to mode ``FAN_ONLY``.
.. code-block:: yaml
fan:
- platform: bedjet
id: my_bedjet_fan_entity
name: "My BedJet Fan"
bedjet_id: bedjet_1
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the fan device.
- **bedjet_id** (**Required**, :ref:`config-id`): The ID of the Bedjet component.
- Other options from :ref:`Fan <config-fan>`.
Known issues:
-------------

View File

@ -48,6 +48,8 @@ submit a feature request (see FAQ).
+---------------------------------------+---------------------+----------------------+
| Yashima | ``yashima`` | |
+---------------------------------------+---------------------+----------------------+
| :ref:`Whynter<whynter>` | ``whynter`` | yes |
+---------------------------------------+---------------------+----------------------+
This component requires that you have configured a :doc:`/components/remote_transmitter`.
@ -270,6 +272,29 @@ Configuration variables:
- ``DG11J1-3A``: Temperature range is from 18 to 32 (default)
- ``DG11J1-91``: Temperature range is from 16 to 30
.. _whynter:
``whynter`` Climate
-------------------------
Additional configuration is available for this platform
Configuration variables:
- **use_fahrenheit** (*Optional*, boolean): Allows you to transfer the temperature to the air conditioner in degrees Fahrenheit. The air conditioner display also shows the temperature in Fahrenheit. Defaults to ``false``.
.. code-block:: yaml
# Example configuration entry
climate:
- platform: whynter
name: "AC"
sensor: room_temperature
use_fahrenheit: true
supports_heat: true
See Also
--------

View File

@ -27,9 +27,9 @@ All climate platforms in ESPHome inherit from the climate configuration schema.
climate:
- platform: ...
visual:
min_temperature: 18 °C
max_temperature: 25 °C
temperature_step: 0.1 °C
min_temperature: 18
max_temperature: 25
temperature_step: 0.1
Configuration variables:
@ -174,6 +174,8 @@ advanced stuff.
id(my_climate).fan_mode
// Swing mode, type: SwingMode (enum)
id(my_climate).swing_mode
// Current action (currentl on idle, cooling, heating, etc.), ClimateAction (enum)
id(my_climate).action
- ``.make_call``: Control the climate device

View File

@ -20,7 +20,7 @@ The ``midea`` component creates a Midea air conditioner climate device.
- `Senville <https://senville.com/>`_
- and maybe others
Control is possible with a custom dongle. Example of hardware implementation is `IoT Uni Dongle <https://github.com/dudanov/iot-uni-dongle>`_.
Control is possible with a custom dongle. Example of hardware implementation is `IoT Uni Dongle <https://github.com/dudanov/iot-uni-dongle>`_ or `Midea SLWF-01pro <https://www.ebay.com/itm/164956459539>`_ (`store <https://smartlight.me/smart-home-devices/wifi-devices/wifi-dongle-air-conditioners-midea-idea-electrolux-for-home-assistant>`_, `Tindie <https://www.tindie.com/products/smartlightme/wifi-dongle-for-air-conditioners-midea-electrolux>`_).
.. code-block:: yaml

View File

@ -180,9 +180,9 @@ than ``off``. If this option is not configured, you'll need to manually change
the front end (Home Assistant), an ESPHome action, automation, or from within a lambda elsewhere in your
device's configuration.
- **default_target_temperature_low** (*Optional*, *Deprecated*, float): The default low target
- **default_target_temperature_low** (*Optional*, float): The default low target
temperature for the control algorithm. This can be dynamically set in the frontend later.
- **default_target_temperature_high** (*Optional*, *Deprecated*, float): The default high target
- **default_target_temperature_high** (*Optional*, float): The default high target
temperature for the control algorithm. This can be dynamically set in the frontend later.
**At least one of** ``default_target_temperature_low`` **and** ``default_target_temperature_high``
@ -190,9 +190,9 @@ device's configuration.
.. note::
**default_mode**, **default_target_temperature_low**, and **default_target_temperature_high** are
deprecated and will be removed in a future release. You should migrate your configuration to using
a :ref:`preset <thermostat-preset>` which allows for more flexibility and customisation
**default_mode**, **default_target_temperature_low**, and **default_target_temperature_high** are
being removed in a future release. In the future you will need to migrate your configuration to using
a :ref:`preset <thermostat-preset>` which will allow for more flexibility and customisation
Note that ``min_temperature`` and ``max_temperature`` from the base climate component are used to define
the range of allowed temperature values in the thermostat component. See :doc:`/components/climate/index`.

View File

@ -0,0 +1,267 @@
Feedback Cover
==============
.. seo::
:description: Instructions for setting up feedback covers in ESPHome.
The ``feedback`` cover platform allows you to create covers with position control that
can optionally have feedback from sensors to detect the fully-open and fully-closed states (endstops),
and from sensors to detect actual movement (opening/closing). In all the cases the current
position is approximated with the time the cover has been moving in a direction.
It supports *open*, *close*, *stop* and *toggle* actions. Tilt control is not supported.
.. figure:: images/more-info-ui.png
:align: center
:width: 50.0%
.. code-block:: yaml
# Example configuration entry
cover:
- platform: feedback
name: "Gate"
open_action:
- switch.turn_on: open_cover_switch
open_duration: 2.1min
open_endstop: open_endstop_binary_sensor
open_sensor: open_movement_binary_sensor
close_action:
- switch.turn_on: close_cover_switch
close_duration: 2min
close_endstop: close_endstop_binary_sensor
close_sensor: close_movement_binary_sensor
stop_action:
- switch.turn_off: open_cover_switch
- switch.turn_off: close_cover_switch
Use Cases
---------
It is a versatile cover that can accommodate for a number of DIY setups, or monitoring an externally controlled cover:
Time-Based
**********
Simplest case, when no sensors are available. The state is thus assumed.
It is a drop-in replacement of :doc:`/components/cover/time_based`
Endstop Sensors
***************
For cases where there are endstops at one or both ends of the cover to detect the fully-open and fully-closed states.
When any of these endstops are reached, an actual state is read and updated and the cover optionally
stopped (via ``stop_action``). The state is not assumed.
The extension also handles the case where the cover has builtin endstops, which stops the movement, independently to
the component's logic. In this case, when the cover is fully closed (either if timed based or sensor based) the
``stop_action`` is not triggered.
It is a drop-in replacement of :doc:`/components/cover/endstop`.
Movement Sensors
****************
If movement feedback is available, the cover no longer operates in *optimistic mode* (assuming that movement starts
as soon as an action is triggered) and can also react to commands issued to cover from an external control and still
keep states in sync (useful for "smartization" of an existing cover).
When there are no specific endstop sensors, and if the cover has builtin endstops and no external control logic,
these movement sensors can optionally be use to infer the endstop state.
When the movement stops (with no stop action being requested) it is assumed that it was caused by
the builtin endstops, and so the close/open state (according to current direction) was reached.
This function is activated setting ``infer_endstop`` to True.
It can be used to replace a :doc:`/components/cover/current_based`, with some modifications in the yaml. See :ref:`migrating_current_based`
Safety Features
---------------
To protect the cover hardware from damage, some safety options are available:
- *Max duration*, to protect from faulty endstops
- *Direction change wait time*, like an interlock wait time, to protect motors from sudden direction changes
- *Obstacle sensors* and *rollback*, possibility to stop and optionally rollback the cover when some external sensors detects an obstacle
(it might be a sensor for high current consumption or an infrared light detecting an obstruction in the path).
Configuration variables
-----------------------
- **name** (**Required**, string): The name of the cover.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **stop_action** (**Required**, :ref:`Action <config-action>`): The action that should
be performed when the remote requests the cover to be closed or an endstop is reached.
Open options:
- **open_action** (**Required**, :ref:`Action <config-action>`): The action that should
be performed when the remote requests the cover to be opened.
- **open_duration** (**Required**, :ref:`config-time`): The amount of time it takes the cover
to open up from the fully-closed state.
- **open_endstop** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when the open position is reached.
- **open_sensor** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when the cover is moving in the open direction.
- **open_obstacle_sensor** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when an obstacle that blocks the
open direction is detected.
Close options:
- **close_action** (**Required**, :ref:`Action <config-action>`): The action that should
be performed when the remote requests the cover to be closed.
- **close_duration** (**Required**, :ref:`config-time`): The amount of time it takes the cover
to close from the fully-open state.
- **close_endstop** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when the closed position is reached.
- **close_sensor** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when the cover is moving in the close direction.
- **close_obstacle_sensor** (**Optional**, :ref:`config-id`): The ID of the
:ref:`Binary Sensor <config-binary_sensor>` that turns on when an obstacle that blocks the
close direction is detected.
Additional options:
- **has_built_in_endstop** (*Optional*, boolean): Indicates that the cover has built in end stop
detectors. In this configuration the ``stop_action`` is not performed when the open or close
time is completed and if the cover is commanded to open or close the corresponding actions
will be performed without checking current state. Defaults to ``false``.
- **infer_endstop_from_movement** (*Optional*, boolean): Whether to infer endstop state from the movement sensor.
Requires movement sensors to be set, no endstop sensors and to have builtin endstops. Defaults to ``false``.
- **assumed_state** (*Optional*, boolean): Whether the true state of the cover is not known.
This will make the Home Assistant frontend show buttons for both OPEN and CLOSE actions, instead
of hiding or disabling one of them. Defaults to ``true`` if no sensor is available to known
the actual state of the cover.
- **max_duration** (*Optional*, :ref:`config-time`): The maximum duration the cover should be opening
or closing. Useful for protecting from dysfunctional endstops.
Requires internal, builtin or inferred endstops.
- **direction_change_wait_time** (*Optional*, :ref:`config-time`): Stops cover and forces a wait time between changes in direction,
and takes it into account when computing cover position (useful to protect motors).
When this option is set (even at 0s) if an open/close action is invoked while the cover is moving in the opposite direction,
then and intermediate stop action will be invoked to generate the delay.
- **acceleration_wait_time** (*Optional*, :ref:`config-time`): Considers a wait time needed by the cover to actually
start moving after command is issued and takes it into account when computing cover position
(useful for heavy covers with large inertia).
Intended to not accumulate error when doing multiple partial open/close actions).
The open/close duration includes one instance of this delay, as it is the total amount of time from
issuing a command to reaching endstop.
Defaults to ``0s``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to publish updated position information to the UI while the cover is moving.
Defaults to ``1s``.
- **obstacle_rollback** (*Optional*, percentage): The percentage of rollback the cover will perform in case of
obstacle detection while moving. Defaults to ``10%``.
- All other options from :ref:`Cover <config-cover>`.
Example Configurations
----------------------
.. _migrating_current_based:
Migrating Current-Based Cover
*****************************
Most options can be left untouched, but some modifications are needed:
1. All current sensing related options must be moved to auxiliary :doc:`/components/binary_sensor/analog_threshold`,
to convert current readings to binary sensors, using the corresponding thresholds and delays.
If there where any open/close obstacle current threshold defined, a separate binary sensor with that threshold should be defined.
The option ``start_sensing_delay`` should be directly replaced by a ``delayed_off`` filter in the movement sensors, or alternatively
hysteresis options could be used to reduce the noise.
2. To have the very same behavior implicit in current based cover, you must always set ``has_built_in_endstop`` and ``infer_endstop_from_movement``
to True.
.. code-block:: yaml
# Example original sensor configuration
cover:
- platform: current_based
name: "Current Based Cover"
open_sensor: open_current_sensor
open_moving_current_threshold: 0.5
open_obstacle_current_threshold: 0.8
start_sensing_delay: 0.8s
# ...rest of options
# Example converted sensor configuration
binary_sensor:
- platform: analog_threshold
id: open_binary_sensor
sensor_id: open_current_sensor
threshold: 0.5
filters:
- delayed_off: 0.8s
- platform: analog_threshold
id: open_obstacle_binary_sensor
sensor_id: open_current_sensor
threshold: 0.8
# ... repeat for close sensors
cover:
- platform: feedback
name: "Feedback Based Cover"
has_built_in_endstop: true
infer_endstop_from_movement: true
open_sensor: open_binary_sensor
open_obstacle_sensor: open_obstacle_binary_sensor
#... rest of options
3. Malfunction detection is not directly supported by Feedback Cover, as the malfunction was very narrowly defined to a specific use case
(while in other hardware configurations, the same situation is perfectly valid).
The malfunction alerted specifically when there was current in the opposite direction of the requested operation (possibly due to a relay welded).
This detection can still be achieved by putting the logic directly in the switch, (or whatever needed according to your specific use case).
.. code-block:: yaml
# Example original malfunction configuration
cover:
- platform: current_based
close_sensor: close_current
close_action:
- switch.turn_on: open_relay
open_sensor: open_current
open_action:
- switch.turn_on: open_relay
malfunction_detection: true
malfunction_action:
- logger.log: "Malfunction detected. Relay welded."
#... rest of options
# Example converted malfunction configuration
switch:
- platform: gpio
id: open_relay
#... rest of options
on_turn_off:
- delay: 200ms #allow for switching time and any discharge
- if:
condition:
binary_sensor.is_on: open_binary_sensor
# alternative can check directly
# on sensor.in_range open_current
then:
- logger.log: "Malfunction detected. Relay welded."
See Also
--------
- :doc:`index`
- :ref:`automation`
- :apiref:`feedback/feedback_cover.h`
- :ghedit:`Edit`

View File

@ -200,7 +200,7 @@ Lambdas
From :ref:`lambdas <config-lambda>`, you can access the current state of the cover (note that these
fields are read-only, if you want to act on the cover, use the ``make_call()`` method as shown above).
- ``position``: Retrieve the current position of the cover, as a value between ``0.0`` (open) and ``1.0`` (closed).
- ``position``: Retrieve the current position of the cover, as a value between ``0.0`` (closed) and ``1.0`` (open).
.. code-block:: cpp

View File

@ -64,6 +64,13 @@ Configuration variables:
The stop button on the UI is always enabled even when the cover is stopped and each press
on the button will cause the ``stop_action`` to be performed.
.. note::
The state of the cover can be restored from flash after a node reboot, with
``esp8266_restore_from_flash: true`` option set.
See :doc:`esp8266_restore_from_flash </components/esphome>` for details.
See Also
--------

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -149,10 +149,11 @@ Fonts
The rendering engine also has a powerful font drawer which integrates seamlessly into ESPHome.
Whereas in most Arduino display projects you have to use one of a few pre-defined fonts in very
specific sizes, with ESPHome you have the option to use **any** TrueType (``.ttf``) font file
at **any** size! Granted the reason for it is actually not having to worry about the licensing of font files :)
at **any** size, as well as fixed-size `PCF <https://en.wikipedia.org/wiki/Portable_Compiled_Format>`_ and `BDF <https://en.wikipedia.org/wiki/Glyph_Bitmap_Distribution_Format>`_ bitmap fonts! Granted the reason for it is
actually not having to worry about the licensing of font files :)
To use fonts you first have to define a font object in your ESPHome configuration file. Just grab
a ``.ttf`` file from somewhere on the internet and place it, for example,
a ``.ttf``, ``.pcf``, or ``.bdf`` file from somewhere on the internet and place it, for example,
inside a ``fonts`` folder next to your configuration file.
Next, create a ``font:`` section in your configuration:
@ -169,12 +170,15 @@ Next, create a ``font:`` section in your configuration:
id: roboto
size: 20
- file: "fonts/tom-thumb.bdf"
id: tomthumb
display:
# ...
Configuration variables:
- **file** (**Required**): The path (relative to where the .yaml file is) of the TrueType font
- **file** (**Required**): The path (relative to where the .yaml file is) of the font
file. You can use the ``gfonts://`` short form to use Google Fonts, or use the below structure:
- **type** (**Required**, string): Can be ``gfonts`` or ``local``.
@ -200,12 +204,13 @@ Configuration variables:
**Local Fonts**:
- **path** (**Required**, string): The path (relative to where the .yaml file is) of the TrueType font file.
- **path** (**Required**, string): The path (relative to where the .yaml file is) of the TrueType or bitmap font file.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the font later
in your display code.
- **size** (*Optional*, int): The size of the font in pt (not pixel!).
If you want to use the same font in different sizes, create two font objects. Defaults to ``20``.
If you want to use the same font in different sizes, create two font objects. Note: *size* is ignored
by bitmap fonts. Defaults to ``20``.
- **glyphs** (*Optional*, list): A list of characters you plan to use. Only the characters you specify
here will be compiled into the binary. Adjust this if you need some special characters or want to
reduce the size of the binary if you don't plan to use some glyphs. The items in the list can also
@ -216,7 +221,7 @@ Configuration variables:
.. note::
To use fonts you will need to have the python ``pillow`` package installed, as ESPHome uses that package
to translate the TrueType files into an internal format. If you're running this as a Home Assistant
to translate the TrueType and bitmap font files into an internal format. If you're running this as a Home Assistant
add-on or with the official ESPHome docker image, it should already be installed. Otherwise you need
to install it using
``pip install pillow``.
@ -625,7 +630,7 @@ Animation
*********
Allows to use animated images on displays. Animation inherits all options from the image component.
It adds additional lambda methods: ``next_frame()`` and ``prev_frame()`` to change the shown picture of a gif.
It adds additional lambda methods: ``next_frame()``, ``prev_frame()`` and ``set_frame()`` to change the shown picture of a gif.
.. code-block:: yaml
@ -636,7 +641,7 @@ It adds additional lambda methods: ``next_frame()`` and ``prev_frame()`` to chan
The animation can be rendered just like the image component with the ``image()`` function of the display component.
To show the next frame of the animation call ``id(my_animation).next_frame()``, to show the previous picture use ``id(my_animation).prev_frame()``.
To show the next frame of the animation call ``id(my_animation).next_frame()``, to show the previous picture use ``id(my_animation).prev_frame()``. To show a specific picture use ``id(my_animation).set_frame(int frame)``.
This can be combined with all Lambdas:
.. code-block:: yaml

View File

@ -280,11 +280,20 @@ Wi-Fi, API, and OTA configuration.
Inkplate 6 Plus Touchscreen
***************************
The Inkplate 6 Plus has a built in touchscreen supported by ESPHome.
Below is a config example:
The Inkplate 6 Plus has a built in touchscreen supported by ESPHome. Note you need to enable pin 12 on the mcp23017 to enable the touchscreen
Below is a config example with touchscreen power swtich:
.. code-block:: yaml
switch:
- platform: gpio
name: 'Inkplate Touchscreen Enabled'
restore_mode: ALWAYS_ON
pin:
mcp23xxx: mcp23017_hub
number: 12
inverted: true
touchscreen:
- platform: ektf2232
interrupt_pin: GPIO36
@ -293,13 +302,37 @@ Below is a config example:
number: 10
on_touch:
- logger.log:
format: "Touch: {x}, {y}"
args:
- touch.x
- touch.y
format: "touch x=%d, y=%d"
args: ['touch.x', 'touch.y']
Inkplate 6 Plus Backlight
***************************
The Inkplate 6 Plus has a built in backlight supported by ESPHome.
Below is a config example:
.. code-block:: yaml
power_supply:
- id: backlight_power
keep_on_time: 0.2s
enable_time: 0s
pin:
mcp23xxx: mcp23017_hub
number: 11
output:
- platform: mcp47a1
id: backlight_brightness_output
power_supply: backlight_power
light:
- platform: monochromatic
output: backlight_brightness_output
id: backlight
default_transition_length: 0.2s
name: '${friendly_name} Backlight'
See Also
--------

View File

@ -21,7 +21,7 @@ CS to your set ``cs_pin`` and finally GND to GND.
You can even daisy-chain multiple MAX7219s by connecting the DOUT of the previous chip in the chain to the
next DIN. With more than ~3 chips the 3.3V will probably not be enough, so then you will have to potentially
use a logic level converted.
use a logic level converter.
.. code-block:: yaml

View File

@ -63,13 +63,14 @@ Configuration variables:
Defaults to ``5s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **tft_url** (*Optional*, string): The URL to download the TFT file from for updates. See :ref:`Nextion Upload <nextion_upload_tft>`.
- **on_sleep** (*Optional*, :ref:`Action <config-action>`): An automation to perform when the Nextion goes to sleep.
- **on_wake** (*Optional*, :ref:`Action <config-action>`): An automation to perform when the Nextion wakes up.
- **touch_sleep_timeout** (*Optional*, int): Sets internal No-touch-then-sleep timer in seconds.
- **wake_up_page** (*Optional*, int): Sets the page to display after waking up
- **auto_wake_on_touch** (*Optional*, boolean): Sets if Nextion should auto-wake from sleep when touch press occurs.
- **on_setup** (*Optional*, :ref:`Action <config-action>`): An action to be performed after ESPHome connects to the Nextion. See :ref:`Nextion Automation <nextion-on_setup>`.
- **on_sleep** (*Optional*, :ref:`Action <config-action>`): An action to be performed when the Nextion goes to sleep. See :ref:`Nextion Automation <nextion-on_sleep>`.
- **on_wake** (*Optional*, :ref:`Action <config-action>`): An action to be performed when the Nextion wakes up. See :ref:`Nextion Automation <nextion-on_sleep>`.
- **on_page** (*Optional*, :ref:`Action <config-action>`): An action to be performed after a page change. See :ref:`Nextion Automation <nextion-on_page>`.
.. _display-nextion_lambda:
Rendering Lambda
@ -108,7 +109,7 @@ Please see :ref:`display-printf` for a quick introduction into the ``printf`` fo
Lambda Calls
************
Several methods are available for use within :ref:`lambdas <config-lambda>` ; these permit advanced functionality beyond simple
Several methods are available for use within :ref:`lambdas <config-lambda>`; these permit advanced functionality beyond simple
display updates. See the full :apiref:`nextion/nextion.h` for more info.
.. _nextion_upload_tft:
@ -182,6 +183,80 @@ The developer tools in Home Assistant can be used to trigger the update. The bel
- WAVEFORM_SENSOR 4
- NO_RESULT 5
.. _display-nextion_automation:
Nextion Automation
------------------
With Nextion displays, it's possible to define several automation actions. Depending on your setup, you may or may not need to use some of them.
.. _nextion-on_setup:
``on_setup``
************
This automation will be triggered once ESP establishes a connection with Nextion. This happens after a boot up and may take some
noticeable time (e.g. hundreds of milliseconds) to establish a connection over UART. Typical use scenario for this automation is choosing of the initial
page to display depending on some runtime conditions or simply showing a page with a non-zero index (Nextion shows page 0 by default).
.. code-block:: yaml
wifi:
ap: {} # This spawns an AP with the device name and mac address with no password.
captive_portal:
display:
- platform: nextion
id: disp
on_setup:
then:
lambda: |-
// Check if WiFi hot-spot is configured
if (wifi::global_wifi_component->has_sta()) {
// Show the main page
id(disp).goto_page("main_page");
} else {
// Show WiFi Access Point QR code for captive portal, see https://qifi.org/
id(disp).goto_page("wifi_qr_page");
}
.. _nextion-on_sleep:
``on_sleep / on_wake``
**********************
The action is called before and after Nextion goes to sleep mode. Nextion is not responsive while in sleep mode. Use these triggers to prepare your code
for that and :ref:`force-update <nextion_update_all_components>` the on-screen content once it's back.
.. _nextion-on_page:
``on_page``
***********
This automation is triggered when a page is changed on the Nextion display. This includes both ESP and Nextion initiated page changes.
ESP initiates a page change by calling ``goto_page("page_name")`` function. Nextion can change pages as a reaction to user's activity (e.g. clicks) or using a timer.
In either case, this automation can be helpful to update on-screen controls for the newly displayed page.
If you fully own your Nextoin HMI design and follow the best practice of setting the components' vscope to global in the Nextion Editor, you'll probably never need this trigger.
However, if this is not the case and all / some of your UI components have local visibility scope, ``on_page`` will be your remedy. Here you can initiate updates of the relevant components.
Before actually updating components, you need to understand which page Nextion was switched to. ``x`` argument will contain a page id integer.
Once you know the page id, it's time to update the components. Two strategies would be possible. The first one is to use :ref:`Nextion Sensors <nextion_sensor>` for every UI field and use one of the
:ref:`update functions <nextion_update_all_components>`. The second is to manually set component text or value for each field:
.. code-block:: yaml
on_page:
then:
lambda: |-
switch (x) {
case 0x02: // wifi_qr_page
// Manually trigger update for controls on page 0x02 here
id(disp).set_component_text_printf("qr_wifi", "WIFI:T:nopass;S:%s;P:;;", wifi::global_wifi_component->get_ap().get_ssid().c_str());
break;
}
.. _nextion_upload_tft_file:
Uploading A TFT File

View File

@ -0,0 +1,234 @@
PVVX MiThermometer Display
==========================
.. seo::
:description: Instructions for setting up BLE devices with PVVX MiThermometer custom firmware as displays.
:image: /components/sensor/images/xiaomi_lywsd03mmc.jpg
The ``pvvx_mithermometer`` display platform allows you to use devices running the `ATC_MiThermometer firmware <https://github.com/pvvx/ATC_MiThermometer>`__ by pvvx as display drivers with ESPHome.
.. figure:: /components/sensor/images/xiaomi_lywsd03mmc.jpg
:align: center
:width: 75.0%
Xiaomi LYWSD03MMC.
The data to be displayed is transmitted as external data via BLE.
To do this, a ``ble_client`` component must be set up.
This component can also synchronize the time of the pvvx device by transmitting a timestamp on each connection.
After the data has been transmitted, the BLE connection is terminated in order to be able to receive the advertising data required for the ``pvvx_mithermometer`` sensor platform.
The pvvx firmware refreshes the screen periodically (can be set as minimum LCD refresh rate in the firmware configuration).
By default, the internal sensor data and, if available and valid (``validity_period``), the external data are switched every 2.5 s.
Further firmware configuration makes it possible to activate other display modes such as time and battery status.
The firmware configuration can be changed via browser using `TelinkMiFlasher.html <https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html>`__.
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
ble_client:
- mac_address: "A4:C1:38:B1:CD:7F"
id: pvvx_ble_display
display:
- platform: pvvx_mithermometer
ble_client_id: pvvx_ble_display
lambda: |-
it.print_bignum(23.1);
it.print_unit(pvvx_mithermometer::UNIT_DEG_C);
it.print_smallnum(33);
it.print_percent(true);
it.print_happy(true);
it.print_bracket(true);
Configuration variables:
------------------------
- **ble_client_id** (**Required**, :ref:`config-id`): ID of the associated BLE client.
- **time_id** (*Optional*, :ref:`config-id`): ID of a :doc:`/components/time` component. If set, the time will be synchronized with every connection.
- **disconnect_delay** (*Optional*, :ref:`config-time`): The amount of time the BLE connection is maintained before being disconnected again. Defaults to ``5s``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to transmit the display data. Defaults to ``60s``.
- **validity_period** (*Optional*, :ref:`config-time`): The time periode for which the pvvx device should display the information. Defaults to ``5min``.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use to define the information to be displayed.
See :ref:`display-pvvx_mithermometer_lambda` for more information.
- **auto_clear_enabled** (*Optional*, boolean): Whether to automatically clear the display data before each lambda call,
or to keep the existing display content (must overwrite explicitly, e.g., only on data change). Defaults to ``true``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. _display-pvvx_mithermometer_lambda:
Rendering Lambda
----------------
The ``pvvx_mithermometer`` displays can only show two numbers with optional units and a smiley face. Therefore, the API is tailord to these limitations.
In the lambda you're passed a variable called ``it`` as with all other displays. In this case however, ``it`` is a ``PVVXDisplay`` instance (see API Reference).
.. code-block:: yaml
display:
- platform: pvvx_mithermometer
# ...
lambda: |-
// Print -2.1 as big number (first row)
it.print_bignum(-2.1);
// Print °C next to the big number
it.print_unit(pvvx_mithermometer::UNIT_DEG_C);
// Print 88 as small number (second row)
it.print_smallnum(88);
// Print % next to the small number
it.print_percent(true);
// Print the low battery symbol
it.print_battery(true);
// Print a happy smiley. Results in " ^_^ "
it.print_happy(true);
// Print a sad smiley. Results in " -∧- "
it.print_sad(true);
// The comination of happy and sad simley results in " Δ△Δ "
// Print round brackets around the simley
it.print_bracket(true);
// The final result is "(Δ△Δ)"
Valid values for the big number (``it.print_bignum()``) are from -99.5 to 1999.5. Smaller values are displayed as ``Lo``, larger ones as ``Hi``. It will be printed to the screen. If not defined, a 0 will be displayed.
Valid values for the small number (``it.print_smallnum()``) are from -9 to 99. Smaller values are displayed as ``Lo``, larger ones as ``Hi``. If not defined, a 0 will be displayed.
Possible values for the unit of the big number (``it.print_unit()``) are:
- ``pvvx_mithermometer::UNIT_NONE``: do not show a unit
- ``pvvx_mithermometer::UNIT_DEG_GHE``: show ``°Г``
- ``pvvx_mithermometer::UNIT_MINUS``: show ``-``
- ``pvvx_mithermometer::UNIT_DEG_F``: show ``°F``
- ``pvvx_mithermometer::UNIT_LOWDASH``: show ``_``
- ``pvvx_mithermometer::UNIT_DEG_C``: show ``°C``
- ``pvvx_mithermometer::UNIT_LINES``: show ``=``
- ``pvvx_mithermometer::UNIT_DEG_E``: show ``°E``
The appearance of the smiley can be defined by combining the functions ``it.print_happy()``, ``it.print_sad()`` and ``it.print_bracket(true)``:
=================== =============== ================= ==========
``print_bracket()`` ``print_sad()`` ``print_happy()`` result
=================== =============== ================= ==========
false false false
false false true ``^_^``
false true false ``-∧-``
false true true ``Δ△Δ``
true false false ``( )``
true false true ``(^_^)``
true true false ``(-∧-)``
true true true ``(Δ△Δ)``
=================== =============== ================= ==========
Display states of other sensors
*******************************
The following example display the sensor states of a MiFlora sensor on a pvvx display. The time is also synchronized.
.. code-block:: yaml
time:
- platform: homeassistant
id: homeassistant_time
esp32_ble_tracker:
ble_client:
- mac_address: "A4:C1:38:B1:CD:7F"
id: pvvx_ble_display
sensor:
- platform: pvvx_mithermometer
mac_address: "A4:C1:38:B1:CD:7F"
temperature:
name: "PVVX Temperature"
humidity:
name: "PVVX Humidity"
battery_level:
name: "PVVX Battery-Level"
battery_voltage:
name: "PVVX Battery-Voltage"
- platform: xiaomi_hhccjcy01
mac_address: '94:2B:FF:5C:91:61'
temperature:
name: "Xiaomi HHCCJCY01 Temperature"
id: miflora_temperature
moisture:
name: "Xiaomi HHCCJCY01 Moisture"
id: miflora_moisture
illuminance:
name: "Xiaomi HHCCJCY01 Illuminance"
conductivity:
name: "Xiaomi HHCCJCY01 Soil Conductivity"
display:
- platform: pvvx_mithermometer
ble_client_id: pvvx_ble_display
update_interval: 10min
validity_period: 15min
time_id: homeassistant_time
lambda: |-
double temp = id(miflora_temperature).state;
double moisture = id(miflora_moisture).state;
it.print_bignum(temp);
it.print_unit(pvvx_mithermometer::UNIT_DEG_C);
it.print_smallnum(moisture);
it.print_percent();
if (temp < 5 || temp > 30 || moisture < 10 || moisture > 50) {
it.print_sad();
} else {
it.print_happy();
}
Only synchronize the time once a day
************************************
The following example will synchronized the time of the pvvx device once a day.
.. code-block:: yaml
time:
- platform: homeassistant
id: homeassistant_time
esp32_ble_tracker:
ble_client:
- mac_address: "A4:C1:38:B1:CD:7F"
id: pvvx_ble_display
sensor:
- platform: pvvx_mithermometer
mac_address: "A4:C1:38:B1:CD:7F"
temperature:
name: "PVVX Temperature"
humidity:
name: "PVVX Humidity"
battery_level:
name: "PVVX Battery-Level"
battery_voltage:
name: "PVVX Battery-Voltage"
display:
- platform: pvvx_mithermometer
ble_client_id: pvvx_ble_display
update_interval: 24h
validity_period: 0s
time_id: homeassistant_time
See Also
--------
- :doc:`index`
- :doc:`/components/ble_client`
- :doc:`/components/sensor/xiaomi_ble`
- :apiref:`pvvx_mithermometer/display/pvvx_display.h`
- `ATC_MiThermometer firmware <https://github.com/pvvx/ATC_MiThermometer>`__ by `pvvx <https://github.com/pvvx>`__
- :ghedit:`Edit`

View File

@ -13,12 +13,7 @@ Usage
The ``st7789v`` display platform allows you to use
ST7789V (`datasheet <https://github.com/Xinyuan-LilyGO/TTGO-T-Display>`__,
`Tindie <https://www.tindie.com/products/ttgo/lilygor-ttgo-t-display/>`__)
displays with ESPHome. Note that this component utilizes the 4-Wire :ref:`SPI bus <spi>`; the physical
connection is already in place on the TTGO T-Display module as shown below.
.. note::
Currently this only supports 135x240 pixel ST7789V displays. Other sizes (e.g. 240x320, 240x240) are not supported.
displays with ESPHome. Note that this component utilizes the 4-Wire :ref:`SPI bus <spi>`.
.. figure:: images/st7789v-full.jpg
:align: center
@ -26,12 +21,15 @@ connection is already in place on the TTGO T-Display module as shown below.
ST7789V TFT LCD on TTGO T-Display module
This module has a USB-C connector with an on-board serial adapter for programming. Simply connect to a
USB-C port to get started! (Depending on your operating system of choice, you might need to install an
appropriate driver.) It is also possible to power the module via the 5V and G (ground) pins along
the edges of the module, or via a battery attached to the connector on the bottom of the board. The
ESP32's UART pins are not brought out to the headers, so the on-board serial adapter must be used for
hardwired programming. (OTA updates are of course possible after ESPHome is initially installed.)
The TTGO T-Display module shown has the display attached to the module's board and its connections to the ESP32
cannot be changed. Other display modules have pin headers or other connectors which must be connected appropriately
to an ESP module.
.. note::
Displays larger than the 135x240 pixel display on the TTGO T-Display shown require a significant amount of RAM
to operate correctly. Some ESP devices, such as the ESP8266, do not have sufficient memory to support this display.
If you attempt to use this component and experience repeated crashes, this is likely the cause of the issue.
.. code-block:: yaml
@ -42,6 +40,7 @@ hardwired programming. (OTA updates are of course possible after ESPHome is init
display:
- platform: st7789v
model: TTGO TDisplay 135x240
backlight_pin: GPIO4
cs_pin: GPIO5
dc_pin: GPIO16
@ -57,9 +56,26 @@ hardwired programming. (OTA updates are of course possible after ESPHome is init
Configuration variables:
************************
- **model** (**Required**, string): The display model to use. One of the following options:
- ``TTGO TDisplay 135x240``
- ``Adafruit Funhouse 240x240``
- ``Adafruit RR 280x240`` (round-rectangular display -- some pixels are "deleted" from corners to form rounded shape)
- ``Custom`` (see details below)
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **height** (*Optional*, int): When ``model`` is set to "Custom", use this to specify the ``height`` of the display
in pixels. This option may not be specified when the ``model`` is not set to "Custom".
- **width** (*Optional*, int): When ``model`` is set to "Custom", use this to specify the ``width`` of the display
in pixels. This option may not be specified when the ``model`` is not set to "Custom".
- **offset_height** (*Optional*, int): When ``model`` is set to "Custom", use this to specify the display's vertical
offset in pixels. This option may not be specified when the ``model`` is not set to "Custom".
- **offset_width** (*Optional*, int): When ``model`` is set to "Custom", use this to specify the display's horizontal
offset in pixels. This option may not be specified when the ``model`` is not set to "Custom".
- **eightbitcolor** (*Optional*, boolean): Limits the supported color depth to eight bits. May be useful on
memory-constrained devices.
- **backlight_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The display's backlight pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
@ -67,13 +83,15 @@ Configuration variables:
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. note::
On memory-constrained devices, it may be possible to use *part* of the display area by setting the model to "custom"
and specifying a smaller ``height`` and/or ``width`` than that of the actual display.
Configuration examples
**********************
As of version 1.15, ESPHome supports color displays. To utilize the color capabilities of this display
module, you'll likely want to add a ``color:`` section to your YAML configuration; please see
:ref:`color <config-color>` for more detail on this configuration section.
To use colors in your lambda:
.. code-block:: yaml

View File

@ -0,0 +1,92 @@
TM1621 LCD Display
========================
.. seo::
:description: Instructions for setting up TM1621 LCD Display.
:image: tm1621.jpg
The ``tm1621`` display platform allows you to use the popular TM1621 LCD display drivers with ESPHome, that can find in Sonoff device like THR316D, THR320D, POWR316D or POWR320D
.. figure:: images/tm1621-full.jpg
:align: center
:width: 75.0%
TM1621 LCD Display.
The LCD have four signal, ``cs`` for chip select, ``data`` for data signal, ``read`` for reading data dir and ``write`` for writing data dir
.. code-block:: yaml
# Example configuration entry
display:
platform: tm1621
id: tm1621_display
cs_pin: GPIO17
data_pin: GPIO5
read_pin: GPIO23
write_pin: GPIO18
lambda: |-
it.printf(0, "%.1f", id(my_sensor1).state);
it.display_celsius(true);
it.printf(1, "%.1f", id(my_sensor2).state);
it.display_humidity(true);
Configuration variables:
------------------------
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the CS line.
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the DATA line.
- **read_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the READ line.
- **write_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the WRITE line.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the TM1621.
See :ref:`display-tm1621_lambda` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. _display-tm1621_lambda:
Rendering Lambda
----------------
The TM1621 has a similar API to the fully fledged :ref:`display-engine`, but it's only a subset as the TM1621
LCD displays don't have a concept of individual pixels. In the lambda you're passed a variable called ``it``
as with all other displays. In this case however, ``it`` is a TM1621 instance (see API Reference).
The most basic operation with the TM1621 is wiring a simple number to the screen as in the configuration example
at the top of this page. But even though you're passing in a string (here ``"0123"``), ESPHome converts it
into a representation that the TM1621 can understand.
Each of the three methods (``print`` and ``printf``) all optionally take a the line number (0 for first line and 1 for the second).
This argument is ``0`` by default.
Also note that the ``.`` (dot) character is special because when ESPHome encounters it in the string the dot
segment of the previous position will be enabled.
.. code-block:: yaml
display:
- platform: tm1621
# ...
lambda: |-
it.printf(0, "%.1f", id(my_sensor1).state);
it.display_celsius(true);
it.printf(1, "%.1f", id(my_sensor2).state);
it.display_humidity(true);
Please see :ref:`display-printf` for a quick introduction into the ``printf`` formatting rules.
Also we have five function to display or not some unites:
- °C on the first line : ``display_celsius(bool)``
- °F on the first line : ``display_fahrenheit(bool)``
- %HR on the second line : ``display_humidity(bool)``
- V on the first line and A on the second line : ``display_voltage(bool)``
- kW/h on the first line and W on the second line : ``display_kwh(bool)``
See Also
--------
- :doc:`index`
- :apiref:`tm1621/tm1621.h`
- :ghedit:`Edit`

View File

@ -0,0 +1,188 @@
TM1638 7 Segment Display Keypad & LED Module
============================================
.. seo::
:description: Instructions for setting up TM1638 7 Segment Display Keypad & LED Module
:image: tm1638.jpg
The ``tm1638`` display platform allows you to use the popular TM1638 7 Segment Display Keypad & LED Module with ESPHome.
.. figure:: images/tm1638-full.jpg
:align: center
:width: 75.0%
TM1638 8-Segment Display Keypad & LED Module.
The module can be powered with 5v DC. To display the colon punctuation use the
``.`` in the colon place. (See clock example below)
.. code-block:: yaml
# Example configuration entry
display:
platform: tm1638
id: tm1638_display
stb_pin: 5
clk_pin: 18
dio_pin: 23
intensity: 5
update_interval: 5s
lambda: |-
it.print("0123");
Configuration variables:
------------------------
- **stb_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the STB line hooked up to.
- **clk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the CLK line hooked up to.
- **dio_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin you have the DIO line hooked up to.
- **intensity** (*Optional*, int): The intensity with which the TM1638 should drive the outputs. Range is from
0 (least intense) to 7 (the default). This setting will affect the 7 segment display and the 8 individual LED lights.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the TM1638.
See :ref:`display-tm1638_lambda` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. _display-tm1638_lambda:
Rendering Lambda
----------------
The TM1638 has a similar API to the fully fledged :ref:`display-engine`, but it's only a subset as the TM1638
7-segment Display Keypad & LED Module does not have a concept of individual pixels. In the lambda you're passed a variable called ``it``
as with all other displays. In this case however, ``it`` is a TM1638 instance (see API Reference).
The most basic operation with the TM1638 is writing a simple number to the screen as in the configuration example
at the top of this page. But even though you're passing in a string (here ``"0123"``), ESPHome converts it
into a representation that the TM1638 can understand: The exact pixels that should be turned on. And of course,
not all characters can be represented. You can see a full list of characters :ref:`at the MAX7219 docs <display-max7219_characters>`.
Each of the three methods (``print``, ``printf`` and ``strftime``) all optionally take a position argument at the
beginning which can be used to print the text at a specific position. This argument is ``0`` by default which
means the first character of the first TM1638. For example to start the first character of your text at
the end of the TM1638, you would write ``it.print(3, "0");``.
Also note that the ``.`` (dot) character is special because when ESPHome encounters it in the string the dot
segment of the previous position will be enabled.
.. code-block:: yaml
display:
- platform: tm1638
# ...
lambda: |-
// Print 0 at position 0 (left)
it.print("0");
// Result: "0 "
// Print 1 at position 1 (second character)
it.print(1, "1");
// Result: "01 "
// Let's write a sensor value (let's assume it's 42.1)
it.printf(0, "%.1f", id(my_sensor).state);
// Result: "42.1 " (the dot will appear on the "2" segment)
// Overwrite the previous content with blank
it.print(" ");
// Print a right-padded sensor value with 0 digits after the decimal
it.printf("S%3.0f", id(my_sensor).state);
// Result: "S 42"
// Print the current time
it.strftime("%H.%M");
// Result for 10:06:42 -> "10:06" on a display with : and "10.06" on a display with .
Please see :ref:`display-printf` for a quick introduction into the ``printf`` formatting rules and
:ref:`display-strftime` for an introduction into the ``strftime`` time formatting.
Creating a digital clock
************************
The following example creates a typical digital clock with the ``:`` colon flashing every second.
.. code-block:: yaml
time:
- platform: homeassistant
id: homeassistant_time
display:
platform: tm1638
clk_pin: 18
dio_pin: 23
stb_pin: 5
update_interval: 500ms
lambda: |-
static int i = 0;
i++;
if ((i % 2) == 0)
it.strftime("%H.%M", id(homeassistant_time).now());
else
it.strftime("%H%M", id(homeassistant_time).now());
LEDs
----------------
The TM1638 7 Segment Display Keypad & LED Module has 8 LED lights across the top or middle of the display, depending on the board. These LEDs can be exposed as :doc:`switches </components/switch/index>` or :doc:`outputs </components/output/index>` with the led property set between 0 and 7. The board has the LEDs labelled 1-8, but the leds use zero based addressing. The LED labelled "1" is LED 0 in the configuration.
.. code-block:: yaml
switch:
- platform: tm1638
id: TM1638Led1
led: 0
output:
- platform: tm1638
id: TM1638Led2
led: 1
Buttons
----------------
The TM1638 7 Segment Display Keypad & LED Module has 8 buttons across the top or middle of the display, depending on the board. These buttons are exposed as binary sensor components with the key property set between 0 and 7, They can be accessed via the binary sensor component configuration. As with the LEDs the buttons are labeled 1-8 on the board, but use zero based addressing. Therefore the button labelled "1" is key 0 in the configuration. See :doc:`/components/binary_sensor/index`
.. code-block:: yaml
binary_sensor:
- platform: tm1638
name: "TM1638 Button 1"
id: TM1638Button1
key: 0
filters:
- delayed_on: 10ms
on_press:
then:
- switch.turn_on: TM1638Led1
on_release:
then:
- switch.turn_off: TM1638Led1
- platform: tm1638
name: "TM1638 Button 2"
id: TM1638Button2
key: 1
filters:
- delayed_on: 10ms
on_press:
then:
- output.turn_on: TM1638Led2
on_release:
then:
- output.turn_off: TM1638Led2
See Also
--------
- :doc:`index`
- :doc:`/components/switch/index`
- :doc:`/components/binary_sensor/index`
- :apiref:`tm1638/tm1638.h`
- :ghedit:`Edit`

View File

@ -72,7 +72,10 @@ Configuration variables:
impact on the device but can be used to debug the BLE stack. Defaults to ``5min``.
- **active** (*Optional*, boolean): Whether to actively send scan requests to request more data
after having received an advertising packet. With some devices this is necessary to receive all data,
but also drains those devices' power a (tiny) bit more. Defaults to ``true``.
but also drains those devices' power a bit more. Some devices don't need this, in that case
you can save power and RF pollution by setting it to ``false``. Defaults to ``true``.
- **continuous** (*Optional*, boolean): Whether to scan continuously (forever) or to only scan when
asked to start a scan (with start_scan action). Defaults to ``true``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this ESP32 BLE Hub.
@ -86,14 +89,17 @@ Automations:
- **on_ble_service_data_advertise** (*Optional*, :ref:`Automation <automation>`): An automation to
perform when a Bluetooth advertising with service data is received. See
:ref:`esp32_ble_tracker-on_ble_service_data_advertise`.
- **on_scan_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform when
a BLE scan has completed (the duration of the scan). This works with continuous set to true or false.
ESP32 Bluetooth Low Energy Tracker Automation
---------------------------------------------
.. _esp32_ble_tracker-on_ble_advertise:
``on_ble_advertise``
********************
``on_ble_advertise`` Trigger
************************************************
This automation will be triggered when a Bluetooth advertising is received. A variable ``x`` of type
:apiclass:`esp32_ble_tracker::ESPBTDevice` is passed to the automation for use in lambdas.
@ -128,8 +134,8 @@ Configuration variables:
.. _esp32_ble_tracker-on_ble_manufacturer_data_advertise:
``on_ble_manufacturer_data_advertise``
**************************************
``on_ble_manufacturer_data_advertise`` Trigger
************************************************
This automation will be triggered when a Bluetooth advertising with manufcaturer data is received. A
variable ``x`` of type ``std::vector<uint8_t>`` is passed to the automation for use in lambdas.
@ -159,8 +165,8 @@ Configuration variables:
.. _esp32_ble_tracker-on_ble_service_data_advertise:
``on_ble_service_data_advertise``
*********************************
``on_ble_service_data_advertise`` Trigger
************************************************
This automation will be triggered when a Bluetooth advertising with service data is received. A
variable ``x`` of type ``std::vector<uint8_t>`` is passed to the automation for use in lambdas.
@ -185,10 +191,82 @@ Configuration variables:
- **service_uuid** (**Required**, string): 16 bit, 32 bit, or 128 bit BLE Service UUID.
- See :ref:`Automation <automation>`.
``on_scan_end`` Trigger
************************************************
This automation will be triggered when a Bluetooth scanning sequence has completed. If running
with continuous set to true, this will trigger every time the scan completes (the duration of
a scan).
.. code-block:: yaml
esp32_ble_tracker:
on_scan_end:
- then:
- lambda: |-
ESP_LOGD("ble_auto", "The scan has ended!");
Configuration variables:
- None
- See :ref:`Automation <automation>`.
``esp32_ble_tracker.start_scan`` Action
************************************************
Start a Bluetooth scan. If there is a scan already in progress, then the action is ignored.
.. code-block:: yaml
esp32_ble_tracker:
scan_parameters:
continuous: false
on_...:
- esp32_ble_tracker.start_scan:
Configuration variables:
- **continuous** (*Optional*, boolean): Whether to start the scan in continuous mode. Defaults to ``false``
.. note::
This action can also be written in :ref:`lambdas <config-lambda>`:
.. code-block:: yaml
esp32_ble_tracker:
id: ble_tracker_id
.. code-block:: cpp
id(ble_tracker_id).start_scan()
``esp32_ble_tracker.stop_scan`` Action
************************************************
Stops the bluetooth scanning. It can be started again with the above start scan action.
.. code-block:: yaml
esp32_ble_tracker:
on_...:
- esp32_ble_tracker.stop_scan:
See Also
--------
- :doc:`binary_sensor/ble_presence`
- :doc:`text_sensor/ble_scanner`
- :doc:`sensor/ble_rssi`
- :doc:`sensor/b_parasite`
- :doc:`sensor/xiaomi_ble`
- :doc:`sensor/xiaomi_miscale`
- :doc:`sensor/inkbird_ibsth1_mini`
- :doc:`sensor/mopeka_pro_check`
- :doc:`sensor/ruuvitag`
- :doc:`ble_client`
- :doc:`bluetooth_proxy`
- :apiref:`esp32_ble_tracker/esp32_ble_tracker.h`
- `ESP32 BLE for Arduino <https://github.com/nkolban/ESP32_BLE_Arduino>`__ by `Neil Kolban <https://github.com/nkolban>`__.
- :ghedit:`Edit`

View File

@ -151,7 +151,7 @@ Automations:
- **on_stream_start** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a stream starts.
- **on_stream_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform
- **on_stream_stop** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a stream stops.
Test Setting:

View File

@ -31,6 +31,15 @@ Configuration variables:
- ``snapshot``
- ``stream``
Integrating the mjpeg web service into an NVR:
----------------------------------------------
**Zoneminder**
- *General -> Source Type*: `cURL (HTTP(S) only)`
- *Source -> URL*: `http://ESP_IP_ADDRESS:8080/`
See Also
--------

View File

@ -115,17 +115,26 @@ too many WiFi/MQTT connection attempts, Over-The-Air updates being applied or th
.. note::
It's not guaranteed that all components are in a connected state when this automation is triggered. For
example, the MQTT client may have already disconnected.
example, the MQTT client may have already disconnected. For use-cases that require specific shutdown ordering, look at the ``priority`` parameter.
.. code-block:: yaml
esphome:
# ...
on_shutdown:
priority: 700
then:
- switch.turn_off: switch_1
Configuration variables: See :ref:`Automation <automation>`.
Configuration variables:
- **priority** (*Optional*, float): The priority to execute your custom shutdown code. A higher value
means a high priority and in case of shutdown triggers that the code is executed **later**.
Priority is used primarily for the initialization order of components. Shutdowns for these components are handled in *reverse* order, such that e.g. sensors (600) are shutdown before the hardware components (800) they depend on.
Please note this is an ESPHome-internal value and any change will not be marked as a breaking change.
Defaults to ``600``. For priority values refer to the list in the :ref:`esphome-on_boot` section.
- See :ref:`Automation <automation>`.
.. _esphome-on_loop:

View File

@ -6,9 +6,11 @@ Ethernet Component
:image: ethernet.svg
:keywords: Ethernet, ESP32
This core ESPHome component sets up ethernet connections for ESP32s.
This ESPHome component enables *wired* Ethernet connections for ESP32s.
Ethernet for ESP8266 is not supported.
This component can't be used in same time than Wifi one, even if your ESP32 has both wired.
This component and the Wi-Fi component may **not** be used simultaneously, even if both are physically available.
.. code-block:: yaml
@ -29,24 +31,23 @@ This component can't be used in same time than Wifi one, even if your ESP32 has
Configuration variables:
------------------------
- **type** (**Required**, string): The type of LAN chipset. Must be one of
``LAN8720`` or ``TLK110`` (see datasheet for more details).
- **type** (**Required**, string): The type of LAN chipset/phy. Must be one of
``LAN8720``, ``TLK110`` or ``IP101`` (see datasheet for more details).
- **mdc_pin** (**Required**, :ref:`config-pin`): The MDC pin of the board.
Usually this is ``GPIO23``.
- **mdio_pin** (**Required**, :ref:`config-pin`): The MDIO pin of the board.
Usually this is ``GPIO18``.
- **clk_mode** (*Optional*, string): The clock mode of the data lines, this must be one
of these values: (see datasheet of your board for more details)
- **clk_mode** (*Optional*, string): The clock mode of the data lines. See your board's
datasheet for more details. Must be one of the following values:
- ``GPIO0_IN`` (Default) - External clock
- ``GPIO0_OUT`` - Internal clock
- ``GPIO16_OUT`` - Internal clock
- ``GPIO17_OUT`` - Internal clock
- **phy_addr** (*Optional*, int): The PHY addr type of the ethernet controller. Defaults to 0.
- **power_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin with which
to control the power of the board. Leave unspecified for no power pin (default)
- **phy_addr** (*Optional*, int): The PHY addr type of the Ethernet controller. Defaults to 0.
- **power_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin controlling the
power/reset status of the Ethernet controller. Leave unspecified for no power pin (default).
- **manual_ip** (*Optional*): Manually configure the static IP of the node.
- **static_ip** (**Required**, IPv4 address): The static IP of your node.
@ -66,23 +67,12 @@ Configuration variables:
.. note::
If your ethernet board is not designed with an ESP32 built in, chances are that you are going
to use flying leads, dupont wires, etc. to connect the ethernet to the ESP32. This is
probably to fail as the ethernet interface uses a high frequency clock signal. For more
If your Ethernet board is not designed with an ESP32 built in, it's common to attempt
to use flying leads, dupont wires, etc. to connect the Ethernet controller to the ESP32.
This approach is likely to fail, however, as the Ethernet interface uses a high frequency
clock signal that will not travel reliably over these types of connections. For more
information and wiring details refer to the link in the *See also* section.
Configuration for wESP32 board
------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO16
mdio_pin: GPIO17
clk_mode: GPIO0_IN
phy_addr: 0
Configuration for Olimex ESP32-POE
----------------------------------
@ -108,6 +98,18 @@ Configuration for Olimex ESP32-EVB
clk_mode: GPIO0_IN
phy_addr: 0
Configuration for Olimex ESP32-GATEWAY
--------------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
Configuration for LILYGO TTGO T-Internet-POE ESP32-WROOM LAN8270A Chip
----------------------------------------------------------------------
@ -120,20 +122,6 @@ Configuration for LILYGO TTGO T-Internet-POE ESP32-WROOM LAN8270A Chip
clk_mode: GPIO17_OUT
phy_addr: 0
Configuration for OpenHacks LAN8720
-----------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
phy_addr: 1
Note: This board has an issue that might cause the ESP32 to boot in program mode. When testing, make sure you are monitoring the
serial output and reboot the device several times to see if it boots into the program properly.
Configuration for Wireless Tag WT32-ETH01
-----------------------------------------
@ -147,6 +135,53 @@ Configuration for Wireless Tag WT32-ETH01
phy_addr: 1
power_pin: GPIO16
Configuration for OpenHacks LAN8720
-----------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
phy_addr: 1
.. note::
This board has an issue that might cause the ESP32 to boot in program mode. When testing, make sure
you are monitoring the serial output and reboot the device several times to see if it boots into the
program properly.
Configuration for wESP32 board (up to rev.6)
--------------------------------------------
.. code-block:: yaml
ethernet:
type: LAN8720
mdc_pin: GPIO16
mdio_pin: GPIO17
clk_mode: GPIO0_IN
phy_addr: 0
.. note::
Revision 7 and upwards of the wESP32 board does not have a LAN8720 chip. Until support for the
replacement RTL8201 is included in ESPHome, the wESP board rev.7 will not work with the above configuration.
Configuration for ESP32-Ethernet-Kit board
------------------------------------------
.. code-block:: yaml
ethernet:
type: IP101
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO5
See Also
--------

View File

@ -41,7 +41,7 @@ Configuration variables:
.. note::
If the device can support multiple I²C buses (ESP32 has 2) these buses need to be defined as below and sensors need to be setup specifying the correct bus:
If the device can support multiple I²C buses (ESP32 has 2, ESP8266 does not support more than one) these buses need to be defined as below and sensors need to be setup specifying the correct bus:
.. code-block:: yaml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

View File

@ -6,9 +6,10 @@ Logger Component
:image: file-document-box.svg
The logger component automatically logs all log messages through the
serial port and through MQTT topics. By default, all logs with a
severity higher than ``DEBUG`` will be shown. Decreasing the log level
can help with the performance of the application and memory size.
serial port and through MQTT topics (if there is an MQTT client in the
configuration). By default, all logs with a severity higher than
``DEBUG`` will be shown. Decreasing the log level can help with the
performance of the application and memory size.
.. code-block:: yaml
@ -54,7 +55,9 @@ The logger component makes use of platform-specific hardware UARTs for serial lo
By default, the logger will occupy ``UART0``. The ESP32 has three hardware UARTs, all of
which can be used for both transmit and receive. The ESP8266 only has two hardware UARTs,
one of which is transmit-only. The ESP8266 ``UART0`` can also be 'swapped' to TX/RX on the
CTS/RTS pins, if you need to use GPIO1 and GPIO3 for something else.
CTS/RTS pins, if you need to use GPIO1 and GPIO3 for something else. Note that the common
NodeMCU boards have their USB-UART Adapters fixed to the default GPIOs used by ``UART0``,
so if you use anything else you will not get log messages over the on-board USB.
Possible Hardware UART configurations:

View File

@ -23,7 +23,7 @@ via the I2S bus. This platform only works on ESP32 based chips.
Configuration variables:
------------------------
- **dac_type** (**Required**, enum)
- **dac_type** (**Required**, enum):
- ``external``: Use an external DAC, for example the NS4168, or UDA1334A.
- ``internal``: Use the internal DAC
@ -35,9 +35,11 @@ External DAC
- **i2s_lrclk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The GPIO pin to use for the I2S LRCLK (Word Select or Left/Right Clock) signal.
- **i2s_dout_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The GPIO pin to use for the I2S DOUT (Data Out) signal.
- **i2s_bclk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The GPIO pin to use for the I2S BCLK signal (Bit Clock).
- **i2s_bclk_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The GPIO pin to use for the I2S BCLK (Bit Clock) signal.
- **mode** (*Optional*, string): The mode of the I2S bus. Can be ``mono`` or ``stereo``. Defaults to ``mono``.
For best results, keep the wires as short as possible.
Internal DAC
************

View File

@ -146,7 +146,7 @@ Configuration variables:
``media_player.on_state`` Trigger
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This trigger is activated each time the state of the media player is updated
This trigger is activated each time the state of the media player is updated
(for example, if the player is stop playing audio or received some command).
.. code-block:: yaml

View File

@ -375,7 +375,7 @@ The response is mapped to the sensor based on register_count and offset in bytes
Note
----
Write support is only implemented for switches.
Write support is only implemented for switches and selects.
However the C++ code provides the required API to write to a modbus device.
These methods can be called from a lambda.

View File

@ -290,6 +290,21 @@ You have to download the server CA certficiate in PEM format and add it to ``cer
Usually these are .crt files and you can open them with any text editor.
Also make sure to change the ``port`` of the mqtt broker. Most brokers use port 8883 for TLS connections.
.. warning::
MbedTLS, the library that handles TLS for the esp-idf, doesn't validate wildcard certificates.
The Common Name check only works if the CN is explicitly reported in the certificate.
- \*.example.com -> Fail
- mqtt.example.com -> Success
If a secure connection is necessary for your device, you really want to set:
.. code-block:: yaml
skip_cert_cn_check: false
.. code-block:: yaml
mqtt:
@ -298,6 +313,7 @@ Also make sure to change the ``port`` of the mqtt broker. Most brokers use port
discovery: true
discovery_prefix: ${mqtt_prefix}/homeassistant
log_topic: ${mqtt_prefix}/logs
# Evaluate carefully skip_cert_cn_check
skip_cert_cn_check: true
idf_send_async: false
certificate_authority: |

View File

@ -177,6 +177,9 @@ enum. These values are:
Updating the password:
----------------------
Changing an existing password:
******************************
Since the password is used both for compiling and uploading the regular ``esphome <file> run``
won't work of course. This issue can be worked around by executing the operations separately
through an ``on_boot`` trigger:
@ -191,6 +194,12 @@ through an ``on_boot`` trigger:
password: "Old password"
id: my_ota
Adding a password:
******************
If OTA is already enabled without a password, simply add a ``password:`` line to the existing
``ota:`` config block.
See Also
--------

View File

@ -0,0 +1,114 @@
DAC7678
=======
.. seo::
:description: Instructions for setting up the DAC7678.
:image: dac7678.svg
:keywords: DAC7678
.. _dac7678-component:
Component/Hub
-------------
The DAC7678 component represents a DAC7678 12-bit 8 channel DAC with internal reference
(`datasheet <https://www.ti.com/lit/ds/symlink/dac7678.pdf>`__) in ESPHome. It
uses the :ref:`I²C Bus <i2c>` for communication.
To use the channels of this components, you first need to setup the
global ``dac7678`` hub and give it an id, and then define the
:ref:`individual output channels <dac7678-output>`.
.. code-block:: yaml
# Example configuration entry
dac7678:
address: 0x4A
id: dac7678_hub1
internal_reference: true
# Individual outputs
output:
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 0
Configuration variables:
************************
- **address** (*Optional*, int): The I²C address of the driver.
Defaults to ``0x48``.
- **id** (*Optional*, :ref:`config-id`): The id to use for
this dac7678 component. Use this if you have multiple DAC7678s connected at the same time
- **internal_reference** (*Optional*, bool): State of the internal reference.
Defaults to ``false``.
.. _dac7678-output:
DAC7678 Output
--------------
The DAC7678 output component exposes a DAC7678 DAC channel of a global
:ref:`DAC7678 hub <dac7678-component>` as a float
output.
.. code-block:: yaml
# Example configuration entry
dac7678:
address: 0x4A
id: dac7678_hub1
internal_reference: true
# Individual outputs
output:
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 0
id: 'dac7678_1_ch0'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 1
id: 'dac7678_1_ch1'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 2
id: 'dac7678_1_ch2'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 3
id: 'dac7678_1_ch3'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 4
id: 'dac7678_1_ch4'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 5
id: 'dac7678_1_ch5'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 6
id: 'dac7678_1_ch6'
- platform: dac7678
dac7678_id: 'dac7678_hub1'
channel: 7
id: 'dac7678_1_ch7'
Configuration variables:
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **channel** (**Required**, int): Chose the channel of the DAC7678 of
this output component. Must be in range from 0 to 7.
- **dac7678_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
:ref:`DAC7678 hub <dac7678-component>`.
Use this if you have multiple DAC7678 devices.
- All other options from :ref:`Output <config-output>`.
See Also
--------
- :doc:`/components/output/index`
- :ghedit:`Edit`

View File

@ -61,7 +61,7 @@ This action turns the output with the given ID on when executed.
on_...:
then:
- output.turn_on: relay_1
- output.turn_on: light_1
.. note::
@ -69,7 +69,7 @@ This action turns the output with the given ID on when executed.
.. code-block:: cpp
id(relay_1).turn_on();
id(light_1).turn_on();
.. _output-turn_off_action:
@ -82,7 +82,7 @@ This action turns the output with the given ID off when executed.
on_...:
then:
- output.turn_off: relay_1
- output.turn_off: light_1
.. note::
@ -90,7 +90,7 @@ This action turns the output with the given ID off when executed.
.. code-block:: cpp
id(relay_1).turn_off();
id(light_1).turn_off();
.. _output-set_level_action:
@ -98,14 +98,14 @@ This action turns the output with the given ID off when executed.
***************************
This action sets the float output to the given level when executed. Note: This only
works with floating point outputs like ESP8266 PWM or LEDC.
works with floating point outputs like ESP8266 PWM, LEDC or ``slow_pwm``.
.. code-block:: yaml
on_...:
then:
- output.set_level:
id: output_1
id: light_1
level: 50%
.. note::
@ -115,7 +115,7 @@ works with floating point outputs like ESP8266 PWM or LEDC.
.. code-block:: cpp
// range is 0.0 (off) to 1.0 (on)
id(relay_1).set_level(0.5);
id(light_1).set_level(0.5);
Full Output Index
-----------------
@ -129,10 +129,13 @@ Full Output Index
- :doc:`/components/fan/speed`
- :apiref:`binary_output.h <output/binary_output.h>`,
:apiref:`float_output.h <output/float_output.h>`
- :ghedit:`Edit`
.. toctree::
:maxdepth: 1
:glob:
*
- :ghedit:`Edit`

View File

@ -24,8 +24,8 @@ global ``pca9685`` hub and give it an id, and then define the
# Example configuration entry
pca9685:
frequency: 500
id: 'pca9685_hub1'
- id: pca9685_hub1
frequency: 500
# Individual outputs
output:

View File

@ -29,6 +29,7 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **include_internal** (*Optional*, boolean): Whether ``internal`` entities should be displayed on the
web interface. Defaults to ``false``.
- **relabel** (*Optional*): Override metric labels. See :ref:`prometheus-relabel`
.. note::
@ -41,6 +42,32 @@ Configuration variables:
static_configs:
- targets: [<ip or node_name.local>]
Metric Relabeling
-----------------
ESPHome allows you to do some basic relabeling of Prometheus metrics.
This is useful if you want to have different metric names or IDs than those shown in Home Assistant or the web interface.
You can relabel metric name or ID labels by adding a ``relabel`` block in the ``prometheus`` configuration,
and then adding a block with ``id`` and/or ``name`` fields for each sensor whose labels your want to override.
.. _prometheus-relabel:
``relabel``
***********
Set the the ``id`` and ``name`` label values of the Prometheus metric for the sensor with the specified ID.
.. code-block:: yaml
# Example configuration entry
prometheus:
relabel:
my_voltage_sensor:
id: angry_pixies
name: "Angry Pixies"
See Also
--------

View File

@ -30,6 +30,7 @@ Configuration variables:
- **dump** (*Optional*, list): Decode and dump these remote codes in the logs (at log.level=DEBUG).
Set to ``all`` to dump all available codecs:
- **aeha**: Decode and dump AEHA infrared codes.
- **coolix**: Decode and dump Coolix infrared codes.
- **dish**: Decode and dump Dish infrared codes.
- **jvc**: Decode and dump JVC infrared codes.
@ -65,6 +66,9 @@ Configuration variables:
Automations:
- **on_aeha** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
AEHA remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::AEHAData`
is passed to the automation for use in lambdas.
- **on_coolix** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Coolix remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::CoolixData`
is passed to the automation for use in lambdas.
@ -164,6 +168,12 @@ Configuration variables:
Remote code selection (exactly one of these has to be included):
- **aeha**: Trigger on a decoded AEHA remote code with the given data.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
- **data** (**Required**, 3-35 bytes list): The code to listen for, see :ref:`remote_transmitter-transmit_aeha`
for more info. Usually you only need to copy this directly from the dumper output.
- **coolix**: Trigger on a decoded Coolix remote code with the given data.
- **data** (**Required**, int): The 24-bit Coolix code to trigger on, see dumper output for more info.

View File

@ -78,6 +78,27 @@ Configuration variables:
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in
Home Assistant, you'll want to set the **times** to 10 and the **wait_time** to 0s.
.. _remote_transmitter-transmit_aeha:
``remote_transmitter.transmit_aeha`` Action
*********************************************
This :ref:`action <config-action>` sends a AEHA code to a remote transmitter.
.. code-block:: yaml
on_...:
- remote_transmitter.transmit_aeha:
address: 0x1FEF
data: [0x1F, 0x3E, 0x06, 0x5F]
Configuration variables:
- **address** (**Required**, int): The address to send the command to, see dumper output for more details.
- **data** (**Required**, list): The command to send, A length of 2-35 bytes can be specified for one packet.
AEHA refers to the Association for Electric Home Appliances in Japan, a format used by Panasonic and many other companies.
.. _remote_transmitter-transmit_coolix:
``remote_transmitter.transmit_coolix`` Action
@ -224,7 +245,7 @@ This :ref:`action <config-action>` a Nexa RF remote code to a remote transmitter
.. code-block:: yaml
on_...:
- remote_transmitter.nexa:
- remote_transmitter.transmit_nexa:
device: 0x38DDB4A
state: 1
group: 0

View File

@ -119,6 +119,24 @@ Multiple ADC Sensors
You can only use as many ADC sensors as your device can support. The ESP8266 only has one ADC and can only handle one sensor at a time. For example, on the ESP8266, you can measure the value of an analog pin (A0 on ESP8266) or VCC (see above) but NOT both simultaneously. Using both at the same time will result in incorrect sensor values.
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
on GPIO34.
.. code-block:: yaml
- platform: adc
name: "Battery voltage"
pin: GPIO34
accuracy_decimals: 2
update_interval: 60s
attenuation: 11dB
filters:
- multiply: 2.0 # The voltage divider requires us to multiply by 2
This works on SKU:DFR0654. For more information see: `manufacturer's website <https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654>`__.
See Also
--------

View File

@ -54,6 +54,12 @@ Base Configuration:
- **address** (*Optional*, int): The I²C address of the sensor. Defaults to ``0x39``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to check the sensor. Defaults to ``60s``.
- **led_drive** (*Optional*, int): The LED drive level in mA. One of 100mA, 50mA, 25mA, 12.5mA. Defaults to ``100mA``.
- **proximity_gain** (*Optional*, int): The proximity gain level. One of 1x, 2x, 4x, 8x. Defaults to ``4x``.
- **ambient_light_gain** (*Optional*, int): The ambient light gain level. One of 1x, 4x, 16x, 64x. Defaults to ``4x``.
- **gesture_led_drive** (*Optional*, int): The gesture LED drive level in mA. One of 100mA, 50mA, 25mA, 12.5mA. Defaults to ``100mA``.
- **gesture_gain** (*Optional*, int): The proximity gain level. One of 1x, 2x, 4x, 8x. Defaults to ``4x``.
- **gesture_wait_time** (*Optional*, int): The gesture wait time in ms. One of 0ms, 2.8ms, 5.6ms, 8.4ms, 14ms, 22.4ms, 30.8ms, 39.2ms. Defaults to ``2.8ms``.
Sensor
------

View File

@ -138,7 +138,7 @@ Here are common current calibrations for the **Expandable 6 Channel Energy Meter
- 20A/25mA SCT-006: 11131
- 30A/1V SCT-013-030: 8650
- 50A/1V SCT-013-050: 15420
- 80A/26.6mA SCT-010: 41996
- 80A/26.6mA SCT-010: 41996 (note this will saturate at 2^16/10^3 amps)
- 100A/50ma SCT-013-000: 27961
- 120A/40mA: SCT-016: 41880
@ -172,6 +172,28 @@ a time-series-database, e.g. InfluxDB.
id: ct1RAWattHours
state_topic: ${disp_name}/ct1/reverse_active_energy
If the power, power_factor, reactive_power, forward_active_energy, or reverse_active_energy configuraion variables
are used, care must be taken to ensure that the line ATM90E32's voltage is from is the same phase as the current
transformer is installed on. This is significant in split-phase or multi phase installations. On a house with 240
split-phase wiring (very common in the US), one simple test is to reverse the orentation of the current transformer
on a line. If the power factor doesn't change sign, it is likely that the voltage fed to the ATM90E32 is from the other
phase.
The CircuitSetup Expandable 6 channel board can easilly handle this situation by cutting the jumpers JP12/13 to
allow a seperate VA2 to be input on the J3 pads. Make sure that current taps connected to CT 1-3 are on the phase
from which VA is fed (the barrel jack) and the taps connected to CT3-6 are on the phase from which VA2 is fed. See
the CicuitSetup repo for more details on this.
If a mulit board stack is being used, remember to cut JP12/13 on all boards and to feed VA2 to each board. VA is
fed to all boards through the stacking headers. Another detail is that each voltage transformer needs to have the
same polarity; getting this backwards will be just like having it on the wrong phase.
Note that the current measurement is the RMS value so is always positive. They only way to determine directon is to
look at the power factor. If there are only largly resistive loads and no power sources, (PF almost 1), it is simpler
to just create a template sensor that computes power from Irms*Vrms and ignore all these details. On the other
hand, one might be surprised how reactive some loads are and the CirciuitSetup designs are able to
handle these situations well.
Additional Examples
-------------------

View File

@ -13,7 +13,7 @@ This sensor is **mostly used for touch** devices but could be used for any ``bin
Add your binary sensors as ``channels`` to the binary sensor map. The binary sensor map then publishes a value depending
on the type of the binary sensor map and the values specified with each channel.
This platform currently supports only one measurement type: ``GROUP``, but others might get added later.
This platform currently supports two measurement types: ``GROUP`` and ``SUM``, and others might get added later.
You need to specify which type of mapping you want with the ``type:`` configuration value:
- ``GROUP`` Each channel has its own value. The sensor publishes the average value of all active
@ -47,6 +47,45 @@ You need to specify which type of mapping you want with the ``type:`` configurat
channel: 0
id: touchkey0
# ...
- ``SUM`` Each channel has its own value. The sensor publishes the sum of all active
binary sensors values.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: binary_sensor_map
id: group_0
name: 'Group Map 0'
type: sum
channels:
- binary_sensor: bit0
value: 1
- binary_sensor: bit1
value: 2
- binary_sensor: bit2
value: 4
- binary_sensor: bit3
value: 8
binary_sensor:
- platform: gpio
pin: 4
id: bit0
- platform: gpio
pin: 5
id: bit1
- platform: gpio
pin: 6
id: bit2
- platform: gpio
pin: 7
id: bit3
# ...
Configuration variables:
------------------------

View File

@ -0,0 +1,68 @@
Belling BL0942 Energy Monitor
==================================
.. seo::
:description: Instructions for setting up BL0942 power monitors.
:image: bl0942.png
:keywords: BL0942, Aubess, Mini Smart Switch With Energy Monitor
The ``bl0942`` sensor platform allows you to use BL0942 energy monitors sensors with
ESPHome. These are used in some Tuya-devices (e.g. Aubess Tuya WiFi Mini Smart Switch With Energy Monitor)
The communication with this integration is done over a :ref:`UART bus <uart>`.
You must therefore have a ``uart:`` entry in your configuration with both the TX and RX pins set
to some pins on your board and the baud rate set to 4800 with 1 stop bit.
.. code-block:: yaml
# Example configuration entry
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 4800
stop_bits: 1
sensor:
- platform: bl0942
uart_id: uart_bus
voltage:
name: 'BL0942 Voltage'
current:
name: 'BL0942 Current'
power:
name: 'BL0942 Power'
filters:
multiply: -1
energy:
name: 'BL0942 Energy'
frequency:
name: "BL0942 Frequency"
accuracy_decimals: 2
update_interval: 60s
Configuration variables:
------------------------
- **voltage** (*Optional*): The voltage value of the sensor in Volts.
All options from :ref:`Sensor <config-sensor>`.
- **current** (*Optional*): The current value of the sensor in Amperes. All options from
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): The (active) power value of the sensor in Watts. Note that some power meters will report this in negative values (probably wired backwards), so you may want to use a filter to multiply it by -1. All options from :ref:`Sensor <config-sensor>`.
- **energy** (*Optional*): Use the voltage value of the sensor in kWh.
All options from :ref:`Sensor <config-sensor>`.
- **frequency** (*Optional*): The frequency value of the sensor in Hertz. All options from
:ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`bl0942/bl0942.h`
- :ghedit:`Edit`

View File

@ -24,6 +24,10 @@ instructions for setting up this platform.
- platform: ble_rssi
service_uuid: '11aa'
name: "BLE Test Service 16 bit RSSI value"
# RSSI based on iBeacon UUID
- platform: ble_rssi
ibeacon_uuid: '68586f1e-89c2-11eb-8dcd-0242ac130003'
name: "BLE Test Service iBeacon RSSI value"
.. note::
@ -35,10 +39,18 @@ Configuration variables:
- **name** (**Required**, string): The name of the sensor.
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
sensor. Either this or ''service_uuid'' has to be present.
sensor. Note that exactly one of ``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
- **service_uuid** (*Optional*, 16 bit, 32 bit, or 128 bit BLE Service UUID): The BLE
Service UUID which can be tracked if the device randomizes the MAC address. Either
this or ''mac_address'' has to be present.
Service UUID which can be tracked if the device randomizes the MAC address. Note that exactly one of
``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` must be present.
- **ibeacon_uuid** (*Optional*, string): The `universally unique identifier <https://en.wikipedia.org/wiki/Universally_unique_identifier>`__
to identify the beacon that needs to be tracked. Note that exactly one of ``mac_address``,
``service_uuid`` or ``ibeacon_uuid`` must be present.
- **ibeacon_major** (*Optional*, int): The iBeacon major identifier of the beacon that needs
to be tracked. Usually used to group beacons, for example for grouping all beacons in the
same building.
- **ibeacon_minor** (*Optional*, int): The iBeacon minor identifier of the beacon that needs
to be tracked. Usually used to identify beacons within an iBeacon group.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.

View File

@ -7,7 +7,7 @@ CSE7766 Power Sensor
:keywords: cse7766, cse7759b, Sonoff Pow R2
The ``cse7766`` sensor platform allows you to use your CSE7766 voltage/current and power sensors
(`datasheet <http://dl.itead.cc/S31/CSE7766.pdf>`__) sensors with
(`datasheet <https://itead.cc/wp-content/uploads/2022/05/CSE7766.pdf>`__) sensors with
ESPHome. This sensor is commonly found in Sonoff POW R2. CSE7759B is similar to CSE7766
and works with this integration.

View File

@ -88,6 +88,7 @@ Configuration variables:
************************
- **update_interval** (*Optional*, :ref:`config-time`): Delay between data requests.
- **address** (*Optional*, int): Address to use, defaults to ``0x80``.
Sensor
------

View File

@ -0,0 +1,61 @@
DPS310 Atmospheric Pressure Sensor
==================================
.. seo::
:description: Instructions for setting up DPS310 atmospheric pressure sensors
:image: dps310.jpg
:keywords: DPS310
The ``dps310`` sensor platform allows you to use both the temperature and pressure sensors on
your DPS310 atmospheric pressure sensor (`Adafruit <https://www.adafruit.com/product/4494>`__)
with ESPHome. The :ref:`I²C <i2c>` component is required to be set up in your configuration.
.. figure:: images/dps310-full.jpg
:align: center
:width: 50.0%
DPS310 Atmospheric Pressure Sensor board from `Adafruit <https://www.adafruit.com/product/4494>`__
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: dps310
temperature:
name: "Outside Temperature"
pressure:
name: "Outside Pressure"
address: 0x77
update_interval: 60s
Configuration variables:
------------------------
- **pressure** (**Required**): The information for the pressure sensor.
- **name** (**Required**, string): The name for the pressure sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Required**): The information for the temperature.
sensor
- **name** (**Required**, string): The name for the temperature
sensor.
- **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``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
See Also
--------
- :ref:`sensor-filters`
- :doc:`bmp280`
- :doc:`bme680`
- :doc:`bmp085`
- :apiref:`dps310/dps310.h`
- :ghedit:`Edit`

View File

@ -38,6 +38,8 @@ required to be set up in your configuration for this sensor to work.
- platform: hydreon_rgxx
too_cold:
name: "too cold"
lens_bad:
name: "lens bad"
.. code-block:: yaml
@ -99,6 +101,12 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (*Optional*): Temperature +-5°C. Only on RG-9 Version 1.100 or later.
- **name** (**Required**, string): The name for the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -558,10 +558,16 @@ So for example ``above: 5`` with no below would mean the range from 5 to positiv
- platform: dallas
# ...
on_value_range:
above: 5
below: 10
then:
- switch.turn_on: relay_1
- below: 5.0
then:
- switch.turn_on: relay_1
- above: 5.0
below: 10.0
then:
- switch.turn_on: relay_2
- above: 10.0
then:
- switch.turn_on: relay_3
Configuration variables:

View File

@ -38,7 +38,6 @@ Configuration variables:
that the value can be restored upon power cycle or reboot.
Warning: this option can wear out your flash. Defaults to ``false``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **min_save_interval** (*Optional*, :ref:`config-time`): The minimum time span between saving updated values to storage. This is to keep wearout of memory low. Defaults to ``0s``.
- All other options from :ref:`Sensor <config-sensor>`.
.. _sensor-integration-reset_action:

View File

@ -0,0 +1,69 @@
MCP9600 Thermocouple Amplifier
===========================================
.. seo::
:description: Instructions for setting up the MCP9600 thermocouple amplifier
:image: mcp9600.jpg
:keywords: MCP9600
The ``mcp9600`` sensor platform allows you to use your MCP9600 and MCP9601
(`datasheet <https://cdn-learn.adafruit.com/assets/assets/000/105/040/original/MCP960X-Data-Sheet-20005426%281%29.pdf>`__,
`Adafruit`_) to measure the temperature of a connected thermocouple while also measuring the ambient temperature around the sensor with ESPHome. :ref:`I²C <i2c>` is
required to be set up in your configuration for this sensor to work.
.. warning::
The :ref:`I²C <i2c>` bus must be set to a minimum of ``100khz`` due to the limitations of the MCP9600 and MCP9601.
.. figure:: images/mcp9600.jpg
:align: center
:width: 80.0%
MCP9600 Thermocouple Amplifier
.. _Adafruit: https://www.adafruit.com/product/4101
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: mcp9600
hot_junction:
name: "Thermocouple Temperature"
cold_junction:
name: "Ambient Temperature"
thermocouple_type: K
address: 0x67
update_interval: 60s
Configuration variables:
------------------------
- **hot_junction** (*Optional*): The information for the Hot Junction temperature sensor.
- **name** (**Required**, string): The name for the temperature
sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **cold_junction** (*Optional*): The information for the Cold Junction temperature sensor.
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **thermocouple_type** (*Optional*): Set the thermocouple type. Options are:
K, J, T, N, S, E, B and R type thermocouple. Defaults to ``K``.
- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x67``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`mcp9600/mcp9600.h`
- `Adafruit MCP9600 Library <https://github.com/adafruit/Adafruit_MCP9600>`__ by `Adafruit <https://www.adafruit.com/>`__
- `SparkFun MCP9600 Library <https://github.com/sparkfun/SparkFun_MCP9600_Arduino_Library>`__ by `SparkFun <https://www.sparkfun.com/>`__
- :ghedit:`Edit`

View File

@ -134,7 +134,8 @@ This example logs the value as parsed and the raw modbus bytes received for this
ESP_LOGI("","Sensor properties: adress = 0x%X, offset = 0x%X value type=%d",item->start_address,item->offset,item->sensor_value_type);
int i=0 ;
for (auto val : data) {
ESP_LOGI("","data[%d]=0x%02X (%d)",i++ ,data[i],data[i]);
ESP_LOGI("","data[%d]=0x%02X (%d)",i,data[i],data[i]);
i++;
}
return x ;

View File

@ -0,0 +1,70 @@
MPL3115A2 Barometric Pressure/Altitude/Temperature Sensor
=========================================================
.. seo::
:description: Instructions for setting up MPL3115A2 atmospheric pressure sensors.
:image: mpl3115a2.jpg
:keywords: MPL3115A2
The ``mpl3115a2`` sensor platform allows you to use your MPL3115A2 atmospheric pressure sensors
(`datasheet <https://www.nxp.com/docs/en/data-sheet/MPL3115A2.pdf>`__,
`Adafruit`_) temperature and pressure sensors with ESPHome. The :ref:`I²C <i2c>` is
required to be set up in your configuration for this sensor to work.
.. figure:: images/mpl3115a2-full.jpg
:align: center
:width: 50.0%
MPL3115A2 Barometric Pressure/Altitude/Temperature Sensor
.. _Adafruit: https://www.adafruit.com/product/1893
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: mpl3115a2
temperature:
name: "MPL3115A2 Temperature"
pressure:
name: "MPL3115A2 Pressure"
update_interval: 10s
Configuration variables:
------------------------
The MPL3115A2 can be configured to output either pressure or altitude depending on which
sensor is configured.
- **pressure** (**Optional**): The information for the pressure sensor.
- **name** (**Required**, string): The name for the pressure sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **altitude** (**Optional**): The information for the altitude sensor.
- **name** (**Required**, string): The name for the altitude sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Optional**): The information for the temperature sensor.
- **name** (**Required**, string): The name for the temperature sensor.
- **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 ``0x60``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
See Also
--------
- :ref:`sensor-filters`
- :doc:`bmp280`
- :doc:`bme280`
- :doc:`bmp085`
- :doc:`ms5611`
- :apiref:`mpl3115a2/mpl3115a2.h`
- :ghedit:`Edit`

View File

@ -30,13 +30,12 @@ See :doc:`/components/display/nextion` for setting up the display
- platform: nextion
name: "Current Humidity"
component_name: humidity # pageX.humidity for a global
nextion_precision: 1
precision: 1
update_interval: 4s
- platform: nextion
nextion_id: nextion1
name: "Current Temperature"
variable_name: temperature
hass_component_name: sensor.temperature
- platform: nextion
id: s01
component_id: 2

View File

@ -38,10 +38,13 @@ Configuration variables:
- **falling_edge** (*Optional*): What to do when a falling edge is
detected. One of ``DISABLE``, ``INCREMENT`` and ``DECREMENT``.
Defaults to ``DISABLE``.
- **use_pcnt** (*Optional*, boolean): Use hardware ``PCNT`` pulse counter. Only supported on ESP32. Defaults to ``true``.
- **internal_filter** (*Optional*, :ref:`config-time`): If a pulse shorter than this
time is detected, its discarded and no pulse is counted. Defaults to ``13us``. On the ESP32,
this value can not be higher than ``13us``, for the ESP8266 you can use larger intervals too.
time is detected, its discarded and no pulse is counted. Defaults to ``13us``. On the ESP32, when using the hardware pulse counter
this value can not be higher than ``13us``, for the ESP8266 or with ``use_pcnt: false`` you can use larger intervals too.
If you enable this, set up the ``count_mode`` to increase on the falling edge, not leading edge. For S0 pulse meters that are used to meter power consumption 50-100 ms is a reasonable value.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
@ -101,10 +104,37 @@ measure the total consumed energy in kWh.
filters:
- multiply: 0.001 # (1/1000 pulses per kWh)
(Re)Setting the total pulse count
---------------------------------
Using this action, you are able to reset/set the total pulse count. This can be useful
if you would like the ``total`` sensor to match what you see on your meter you are
trying to match.
.. code-block:: yaml
# Set pulse counter total from home assistant using this service call:
api:
services:
- service: set_pulse_total
variables:
new_pulse_total: int
then:
- pulse_counter.set_total_pulses:
id: pulse_counter_id
value: !lambda 'return new_pulse_total;'
.. note::
This value is the raw count of pulses, and not the value you see after the filters
are applied.
See Also
--------
- :ref:`sensor-filters`
- :doc:`/components/sensor/pulse_meter`
- :doc:`rotary_encoder`
- `esp-idf Pulse Counter API <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/pcnt.html>`__.
- :apiref:`pulse_counter/pulse_counter_sensor.h`

View File

@ -23,7 +23,7 @@ a better understanding of these sensors.
:align: center
:width: 75.0%
To use rotary encoders in ESPHome, first identify the two pins encoding th step value.
To use rotary encoders in ESPHome, first identify the two pins encoding the step value.
These are often called ``CLK`` and ``DT`` as in above image. Note if the values this sensor
outputs go in the wrong direction, you can just swap these two pins.
@ -57,7 +57,7 @@ Configuration variables:
The second pin for determining the step value. Must not be a pin from an external I/O expander.
- **name** (**Required**, string): The name of the rotary encoder sensor.
- **pin_reset** (*Optional*, :ref:`Pin Schema <config-pin_schema>`):
An optional pin that resets the step value. This is useful with rotary encoders that have have a
An optional pin that resets the step value. This is useful with rotary encoders that have a
third pin. Defaults to no reset pin.
- **resolution** (*Optional*, string): The resolution of the sensor, this controls how many
pulses are generated by one step:
@ -72,7 +72,7 @@ Configuration variables:
- **max_value** (*Optional*, int): The maximum value this rotary encoder will go to, turning
the knob further will not increase the number. Defaults to no maximum.
- **publish_initial_value** (*Optional*, boolean): Controls whether the value is published
upon start of ESPHome. By default the value is only published when it changes, causing an
upon start of ESPHome. By default, the value is only published when it changes, causing an
"unknown" value at first. If you set this option to true, the value is published once after
boot and when it changes. Defaults to ``false``.
- **restore_mode** (*Optional*): Control how the Rotary Encoder attempts to restore state on bootup.

View File

@ -5,8 +5,8 @@ SGP40 Volatile Organic Compound Sensor and SGP41 VOC and NOx Sensor
:description: Instructions for setting up SGP40/SGP41 Volatile Organic Compound and NOx sensor
:image: sgp40.jpg
The ``sgp4x`` sensor platform allows you to use your Sensirion SGP40
(`datasheet <https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9_Gas_Sensors/Sensirion_Gas_Sensors_SGP40_Datasheet.pdf>`__) or SGP41
The ``sgp4x`` sensor platform allows you to use your Sensirion SGP40
(`datasheet <https://sensirion.com/media/documents/296373BB/6203C5DF/Sensirion_Gas_Sensors_Datasheet_SGP40.pdf>`__) or SGP41
(`datasheet <https://sensirion.com/media/documents/5FE8673C/61E96F50/Sensirion_Gas_Sensors_Datasheet_SGP41.pdf>`__) with ESPHome.
The type of sensor used is automatically detected.
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
@ -41,15 +41,15 @@ Configuration variables:
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **algorithm_tuning** (*Optional*): The VOC algorithm can be customized by tuning 6 different parameters. For more details see `Engineering Guidelines for SEN5x <https://sensirion.com/media/documents/25AB572C/61E961EA/Sensirion_Engineering_Guidelines_SEN5x.pdf>`__
- **algorithm_tuning** (*Optional*): The VOC algorithm can be customized by tuning 6 different parameters. For more details see `Engineering Guidelines for SEN5x <https://sensirion.com/media/documents/25AB572C/62B463AA/Sensirion_Engineering_Guidelines_SEN5x.pdf>`__
- **index_offset** (*Optional*): VOC index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 100.
- **index_offset** (*Optional*): VOC index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 100.
- **learning_time_offset_hours** (*Optional*): Time constant to estimate the VOC algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hour
- **learning_time_gain_hours** (*Optional*): Time constant to estimate the VOC algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
- **learning_time_gain_hours** (*Optional*): Time constant to estimate the VOC algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
- **gating_max_duration_minutes** (*Optional*): Maximum duration of gating in minutes (freeze of estimator during high VOC index signal). Zero disables the gating. Allowed values are in range 0..3000. The default value is 180 minutes
- **std_initial** (*Optional*): Initial estimate for standard deviation. Lower value boosts events during initial learning period, but may result in larger device-todevice variations. Allowed values are in range 10..5000. The default value is 50.
- **gain_factor:** (*Optional*): Gain factor to amplify or to attenuate the VOC index output. Allowed values are in range 1..1000. The default value is 230.
- **gain_factor** (*Optional*): Gain factor to amplify or to attenuate the VOC index output. Allowed values are in range 1..1000. The default value is 230.
- All other options from :ref:`Sensor <config-sensor>`.
@ -57,14 +57,14 @@ Configuration variables:
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **algorithm_tuning** (*Optional*): The NOx algorithm can be customized by tuning 5 different parameters.For more details see `Engineering Guidelines for SEN5x <https://sensirion.com/media/documents/25AB572C/61E961EA/Sensirion_Engineering_Guidelines_SEN5x.pdf>`__
- **index_offset** (*Optional*): NOx index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 100.
- **algorithm_tuning** (*Optional*): The NOx algorithm can be customized by tuning 5 different parameters.For more details see `Engineering Guidelines for SEN5x <https://sensirion.com/media/documents/25AB572C/62B463AA/Sensirion_Engineering_Guidelines_SEN5x.pdf>`__
- **index_offset** (*Optional*): NOx index representing typical (average) conditions. Allowed values are in range 1..250. The default value is 100.
- **learning_time_offset_hours** (*Optional*): Time constant to estimate the NOx algorithm offset from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hour
- **learning_time_gain_hours** (*Optional*): Time constant to estimate the NOx algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
- **learning_time_gain_hours** (*Optional*): Time constant to estimate the NOx algorithm gain from the history in hours. Past events will be forgotten after about twice the learning time. Allowed values are in range 1..1000. The default value is 12 hours.
- **gating_max_duration_minutes** (*Optional*): Maximum duration of gating in minutes (freeze of estimator during high NOx index signal). Zero disables the gating. Allowed values are in range 0..3000. The default value is 180 minutes
- **std_initial** (*Optional*): The initial estimate for standard deviation parameter has no impact for NOx. This parameter is still in place for consistency reasons with the VOC tuning parameters command. This parameter must always be set to 50.
- **gain_factor:** (*Optional*)
- **gain_factor** (*Optional*): Gain factor to amplify or to attenuate the VOC index output. Allowed values are in range 1..1000. The default value is 230.
- All other options from :ref:`Sensor <config-sensor>`.

View File

@ -0,0 +1,81 @@
SMT100 Soil Moisture Sensor
================================
.. seo::
:description: Instructions for setting up SMT100 soil moisture and temperature sensor
:image: smt100.jpg
:keywords: smt100
The SMT100 sensor platform allows you to use the SMT100 soil moisture and temperature with ESPHome.
.. figure:: images/smt100.jpg
:align: center
:width: 50.0%
The communication with this integration is done over a UART bus using a simple ASCII protocol. You must therefore have a ``uart:`` entry in your configuration with both the TX and RX pins set to some pins on your board and the baud rate set to 9600.
.. code-block:: yaml
# Example configuration entry
uart:
tx_pin: TX
rx_pin: RX
baud_rate: 9600
sensor:
- platform: smt100
counts:
name: "Counts"
permittivity:
name: "Permittivity"
temperature:
name: "Temperature"
moisture:
name: "Moisture"
voltage:
name: "Voltage"
Configuration variables:
------------------------
- **counts** (*Optional*): Raw measurement data from the sensor electronics (dimensionless quantity). Higher counts mean less moisture. May be used for material specific calibrations.
- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- **dielectric_constant** (*Optional*): Dielectric coefficient or permittivity of the material to be measured (dimensionless quantity). Higher permittivity means higher water content. May be used for material specific calibration.
- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (*Optional*): Soil temperature in degrees Celsius. Please note that the temperature sensor is inside the black sensor enclosure and requires some time to equilibrate with the soil temperature.
- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- **moisture** (*Optional*): Soil moisture (volumetric water content in %).
- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- **voltage** (*Optional*): Supply voltage of the sensor in Volt.
- **name** (**Required**): Sensor name.
- All other options from :ref:`Sensor <config-sensor>`.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to pull the sensor. Defaults is 60s.
See Also
--------
- :doc:`/components/sensor/smt100`
- :ref:`sensor-filters`
- :apiref:`smt100/smt100.h`
- :ghedit:`Edit`

View File

@ -11,6 +11,12 @@ The ``tcs34725`` sensor platform allows you to use your TCS34725 RGB color senso
`Adafruit`_), color temperature and illuminance sensors with ESPHome. The :ref:`I²C <i2c>` is
required to be set up in your configuration for this sensor to work.
Note: If the `integration_time` is set too long for the light conditions, the sensor will overexpose.
In this case the sensor may not show 100% on its clear channel. With an `integration_time` of `614ms`
and a `gain` of `1x` the sensor will max out at around 4100 lx. In this case the individual color
channels will show `100%`, the clear channel `25%`. The illumination in lux is shown as `0` as well
as the color temperature in kelvin will show `0`.
.. figure:: images/tcs34725-full.jpg
:align: center
:width: 50.0%

View File

@ -107,10 +107,13 @@ In teleinfo platform:
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation or multiple hubs.
Sensor
******
- **tag_name** (**Required**, string): Specify the tag you want to retrieve from the Teleinformation.
- **teleinfo_id** (*Optional*, :ref:`config-id`): Specify the ID of used hub.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
@ -118,6 +121,7 @@ Text Sensor
***********
- **tag_name** (**Required**, string): Specify the tag you want to retrieve from the Teleinformation.
- **teleinfo_id** (*Optional*, :ref:`config-id`): Specify the ID of used hub.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Text Sensor <config-text_sensor>`.

View File

@ -37,7 +37,7 @@ Configuration variables:
Lambda to be evaluated every update interval to get the new value of the sensor
- **update_interval** (*Optional*, :ref:`config-time`): The interval to publish the value of the
sensor, either the result of the lambda function or if no lambda function the last value
published using the publish action. Defaults to ``60s``.
published using the publish action. Set to ``never`` to disable updates. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.

View File

@ -41,7 +41,6 @@ Configuration variables:
- **restore** (*Optional*, boolean): Whether to store the intermediate result on the device so
that the value can be restored upon power cycle or reboot.
Defaults to ``true``.
- **min_save_interval** (*Optional*, :ref:`config-time`): The minimum time span between saving updated values to storage. This is to keep wearout of memory low. Defaults to ``0s``.
- **method** (*Optional*, string): The method to use for calculating the total daily energy. One of
``trapezoid``, ``left`` or ``right``. Defaults to ``right``.
- All other options from :ref:`Sensor <config-sensor>`.

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