diff --git a/Doxygen b/Doxygen
index 289570c17..790fcddee 100644
--- a/Doxygen
+++ b/Doxygen
@@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 2021.9.3
+PROJECT_NUMBER = 2021.10.0b1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/Makefile b/Makefile
index aa6f79626..c5288bc44 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
ESPHOME_PATH = ../esphome
-ESPHOME_REF = 2021.9.3
+ESPHOME_REF = 2021.10.0b1
-.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png
+.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify
html:
sphinx-build -M html . _build -j auto -n $(O)
@@ -9,6 +9,10 @@ html:
html-strict:
sphinx-build -M html . _build -W -j auto -n $(O)
+minify:
+ minify -o _static/webserver-v1.min.js _static/webserver-v1.js
+ minify -o _static/webserver-v1.min.css _static/webserver-v1.css
+
cleanhtml:
rm -rf "_build/html/*"
diff --git a/_static/changelog-2021.10.0.png b/_static/changelog-2021.10.0.png
new file mode 100644
index 000000000..ecfc0b4dc
Binary files /dev/null and b/_static/changelog-2021.10.0.png differ
diff --git a/_static/version b/_static/version
index ba2609bbd..597c7733d 100644
--- a/_static/version
+++ b/_static/version
@@ -1 +1 @@
-2021.9.3
\ No newline at end of file
+2021.10.0b1
\ No newline at end of file
diff --git a/_static/webserver-v1.js b/_static/webserver-v1.js
index 483284b86..701b7b1a0 100644
--- a/_static/webserver-v1.js
+++ b/_static/webserver-v1.js
@@ -29,6 +29,10 @@ source.addEventListener('state', function (e) {
const states = document.getElementById("states");
let i = 0, row;
for (; row = states.rows[i]; i++) {
+ if (!row.children[2].children.length) {
+ continue;
+ }
+
if (row.classList.contains("switch")) {
(function(id) {
row.children[2].children[0].addEventListener('click', function () {
@@ -70,4 +74,13 @@ for (; row = states.rows[i]; i++) {
});
})(row.id);
}
+ if (row.classList.contains("select")) {
+ (function(id) {
+ row.children[2].children[0].addEventListener('change', function () {
+ const xhr = new XMLHttpRequest();
+ xhr.open("POST", '/select/' + id.substr(7) + '/set?option=' + encodeURIComponent(this.value), true);
+ xhr.send();
+ });
+ })(row.id);
+ }
}
diff --git a/_static/webserver-v1.min.js b/_static/webserver-v1.min.js
index e2cbb4b4e..35c23bfc9 100644
--- a/_static/webserver-v1.min.js
+++ b/_static/webserver-v1.min.js
@@ -1 +1,7 @@
-const source=new EventSource("/events");source.addEventListener("log",function(a){const b=document.getElementById("log");let c="";a.data.startsWith("\x1B[1;31m")?c="e":a.data.startsWith("\x1B[0;33m")?c="w":a.data.startsWith("\x1B[0;32m")?c="i":a.data.startsWith("\x1B[0;35m")?c="c":a.data.startsWith("\x1B[0;36m")?c="d":a.data.startsWith("\x1B[0;37m")?c="v":b.innerHTML+=a.data+"\n",b.innerHTML+=""+a.data.substr(7,a.data.length-10)+"\n"}),source.addEventListener("state",function(a){const b=JSON.parse(a.data);document.getElementById(b.id).children[1].innerText=b.state});const states=document.getElementById("states");for(let a,b=0;a=states.rows[b];b++)a.classList.contains("switch")&&function(b){a.children[2].children[0].addEventListener("click",function(){const a=new XMLHttpRequest;a.open("POST","/switch/"+b.substr(7)+"/toggle",!0),a.send()})}(a.id),a.classList.contains("fan")&&function(b){a.children[2].children[0].addEventListener("click",function(){const a=new XMLHttpRequest;a.open("POST","/fan/"+b.substr(4)+"/toggle",!0),a.send()})}(a.id),a.classList.contains("light")&&function(b){a.children[2].children[0].addEventListener("click",function(){const a=new XMLHttpRequest;a.open("POST","/light/"+b.substr(6)+"/toggle",!0),a.send()})}(a.id),a.classList.contains("cover")&&function(b){a.children[2].children[0].addEventListener("click",function(){const a=new XMLHttpRequest;a.open("POST","/cover/"+b.substr(6)+"/open",!0),a.send()}),a.children[2].children[1].addEventListener("click",function(){const a=new XMLHttpRequest;a.open("POST","/cover/"+b.substr(6)+"/close",!0),a.send()})}(a.id);
\ No newline at end of file
+const source=new EventSource("/events");source.addEventListener('log',function(e){const log=document.getElementById("log");let klass='';if(e.data.startsWith("[1;31m")){klass='e';}else if(e.data.startsWith("[0;33m")){klass='w';}else if(e.data.startsWith("[0;32m")){klass='i';}else if(e.data.startsWith("[0;35m")){klass='c';}else if(e.data.startsWith("[0;36m")){klass='d';}else if(e.data.startsWith("[0;37m")){klass='v';}else{log.innerHTML+=e.data+'\n';}
+log.innerHTML+=''+e.data.substr(7,e.data.length-10)+"\n";});source.addEventListener('state',function(e){const data=JSON.parse(e.data);document.getElementById(data.id).children[1].innerText=data.state;});const states=document.getElementById("states");let i=0,row;for(;row=states.rows[i];i++){if(!row.children[2].children.length){continue;}
+if(row.classList.contains("switch")){(function(id){row.children[2].children[0].addEventListener('click',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/switch/'+id.substr(7)+'/toggle',true);xhr.send();});})(row.id);}
+if(row.classList.contains("fan")){(function(id){row.children[2].children[0].addEventListener('click',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/fan/'+id.substr(4)+'/toggle',true);xhr.send();});})(row.id);}
+if(row.classList.contains("light")){(function(id){row.children[2].children[0].addEventListener('click',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/light/'+id.substr(6)+'/toggle',true);xhr.send();});})(row.id);}
+if(row.classList.contains("cover")){(function(id){row.children[2].children[0].addEventListener('click',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/cover/'+id.substr(6)+'/open',true);xhr.send();});row.children[2].children[1].addEventListener('click',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/cover/'+id.substr(6)+'/close',true);xhr.send();});})(row.id);}
+if(row.classList.contains("select")){(function(id){row.children[2].children[0].addEventListener('change',function(){const xhr=new XMLHttpRequest();xhr.open("POST",'/select/'+id.substr(7)+'/set?option='+encodeURIComponent(this.value),true);xhr.send();});})(row.id);}}
\ No newline at end of file
diff --git a/changelog/2021.10.0.rst b/changelog/2021.10.0.rst
new file mode 100644
index 000000000..4ff25072e
--- /dev/null
+++ b/changelog/2021.10.0.rst
@@ -0,0 +1,351 @@
+ESPHome 2021.10.0 - 20th October 2021
+=====================================
+
+.. seo::
+ :description: Changelog for ESPHome 2021.10.0.
+ :image: /_static/changelog-2021.10.0.png
+ :author: ESPHome
+ :author_twitter: @esphome_
+
+.. imgtable::
+ :columns: 3
+
+ AirThings Wave Mini, components/sensor/airthings_ble, airthings_logo.png
+ Current-Based Cover, components/cover/current_based, flash.svg
+ Daly BMS, components/sensor/daly_bms, daly_bms.png
+ EPEVER Tracer, cookbook/tracer-an, tracer-an.jpg
+ LTR390, components/sensor/ltr390, ltr390.jpg
+ Modbus Controller, components/modbus_controller, modbus.png
+ Safe Mode Switch, components/switch/safe_mode, restart-alert.svg
+ SCD4X, components/sensor/scd4x, scd4x.jpg
+ Tuya Cover, components/cover/tuya, tuya.png
+
+
+ESP-IDF
+-------
+
+Docs still to be written before release on how to use ESP-IDF, but here is a quick example:
+
+.. code-block:: yaml
+
+ esphome:
+ name: livingroom
+
+ esp32:
+ board:
+ framework:
+ type: esp-idf
+
+A huge effort has been put into reorganising, restructuring and rewriting a whole lot of code
+to allow ESP32 based boards to be compiled using ESP-IDF as the framework instead of Arduino.
+This allows ESPHome to keep up with new features and support for new ESP32 based chips
+that Espressif add to the ESP-IDF, such as the ESP32-C3 that a lot of people had been asking about.
+
+There are known issues and specific components that are missing support for ESP-IDF as those ones rely
+on an Arduino library and need more time to be rewritten in a compatible way.
+
+If you come across an issue while switching to ESP-IDF, please file an
+`issue on GitHub `__
+using the ``ESP32-IDF`` option as the platform.
+
+Dashboard Node Import
+---------------------
+
+To be written...
+
+Modbus Controller
+-----------------
+
+Support for generic modbus device data has been added. This allows you as a user
+to get data and control a modbus device without a native ESPHome component. Although a
+native component is still better and preferred if it exists.
+
+- :doc:`Modbus Controller `
+- :doc:`Sensors `
+- :doc:`Binary Sensors `
+- :doc:`Text Sensors `
+- :doc:`Numbers `
+- :doc:`Switches `
+- :doc:`Outputs `
+
+Text Sensor filters
+-------------------
+
+``text_sensors`` now have ``filters`` that allow you to do string manipulation before the value is
+given to the frontend. Check out the :ref:`docs here `.
+
+Lighting
+--------
+
+The Tuya light platform now supports RGB and HSV datapoints for those TuyaMCU based lights.
+
+Partitions now support adding non-addressable lights into the sequence. As an example you
+could build a "fake" addressable light from regular rgb leds.
+
+Graphs
+------
+
+There is new :ref:`Graph ` building functions for displays that will allow you to
+draw the history of sensors over time. See the docs for examples and images on what this looks like.
+
+``wait_until``
+--------------
+
+The ``wait_until`` action now has an optional ``timeout`` option that lets you continue or cancel (using an
+if action afterwards) your automations if the condition does not become true after a period of time.
+
+
+Combination of MiScale 1 & 2
+----------------------------
+
+:esphomepr:`2266` combines the two miscale platforms into one as the code was mostly the
+same and autodetection could be done to detemine which one you are using.
+
+Float Output state changes
+--------------------------
+
+When using a float output with both invert and min/max values, prevously
+the end resut value was being calculated incorrectly. :esphomepr:`2368` fixed this.
+
+
+Full list of changes
+--------------------
+
+New Features
+^^^^^^^^^^^^
+
+- Added graphing component :esphomepr:`2109` by :ghuser:`synco` (new-integration) (new-feature)
+- Add deep sleep wakeup from touch (#1238) :esphomepr:`2281` by :ghuser:`chrta` (new-feature)
+- Allow non-addressable lights in light partitions :esphomepr:`2256` by :ghuser:`paulmonigatti` (new-feature)
+- Add support for Waveshare 7.5 inch (C) bichromatic display (black-and-white only for now) :esphomepr:`1844` by :ghuser:`pixelspark` (new-feature)
+- Wifi scan results :esphomepr:`1605` by :ghuser:`gpambrozio` (new-feature)
+- Add SSD1305 support to SSD1306 integration along with few new options :esphomepr:`1902` by :ghuser:`zhangjingye03` (new-feature) (breaking-change)
+- Adds light sensor support for b-parasites :esphomepr:`2391` by :ghuser:`rbaron` (new-feature)
+- Tuya rgb support :esphomepr:`2278` by :ghuser:`irtimaled` (new-feature)
+- add fan.cycle_speed action :esphomepr:`2329` by :ghuser:`WeekendWarrior1` (new-feature)
+- Add cover toggle support :esphomepr:`1809` by :ghuser:`dtmuller` (new-feature)
+- Support HSV-based color support on tuya light :esphomepr:`2400` by :ghuser:`irtimaled` (new-feature)
+- String manipulation filters for text sensors! :esphomepr:`2393` by :ghuser:`WeekendWarrior1` (new-feature)
+- Add optional timeout for wait_until action :esphomepr:`2282` by :ghuser:`jesserockz` (new-feature)
+
+New Components
+^^^^^^^^^^^^^^
+
+- Added graphing component :esphomepr:`2109` by :ghuser:`synco` (new-integration) (new-feature)
+- Configurable Flash Write Interval :esphomepr:`2119` by :ghuser:`alexyao2015` (new-integration)
+- Add support for Daly Smart BMS :esphomepr:`2156` by :ghuser:`s1lvi0` (new-integration)
+- Add support for LTR390 :esphomepr:`1505` by :ghuser:`sjtrny` (new-integration)
+- Modbus controller :esphomepr:`1779` by :ghuser:`martgras` (new-integration)
+- Dashboard node import and render in browser :esphomepr:`2374` by :ghuser:`OttoWinter` (new-integration)
+- Add Current based cover :esphomepr:`1439` by :ghuser:`djwmarcx` (new-integration)
+- Add support for SCD4X :esphomepr:`2217` by :ghuser:`sjtrny` (new-integration)
+- Add support for Airthing Wave Mini :esphomepr:`2440` by :ghuser:`ncareau` (new-integration)
+- Add Safe Mode Restart Switch :esphomepr:`2437` by :ghuser:`paulmonigatti` (new-integration)
+- Added heatpumpir support :esphomepr:`1343` by :ghuser:`rob-deutsch` (new-integration)
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+
+- Combine code of xiaomi_miscale and xiaomi_miscale2 :esphomepr:`2266` by :ghuser:`edenhaus` (breaking-change)
+- Correctly invert the float output state :esphomepr:`2368` by :ghuser:`jesserockz` (breaking-change)
+- Add SSD1305 support to SSD1306 integration along with few new options :esphomepr:`1902` by :ghuser:`zhangjingye03` (new-feature) (breaking-change)
+
+All changes
+^^^^^^^^^^^
+
+- Drop obsolete comments from CONTRIBUTING.md :esphomepr:`2271` by :ghuser:`oxan`
+- Support inverting color temperature on tuya lights :esphomepr:`2277` by :ghuser:`irtimaled`
+- Untangle core headers (part 1) :esphomepr:`2276` by :ghuser:`oxan`
+- Compatibility with clang-tidy v14 :esphomepr:`2272` by :ghuser:`oxan`
+- Store strings only used for logging in flash :esphomepr:`2274` by :ghuser:`oxan`
+- Expose select on Frontend `web_server:` :esphomepr:`2245` by :ghuser:`ayufan`
+- Fix devcontainer scripts on Windows :esphomepr:`2239` by :ghuser:`alexyao2015`
+- Fix SM300D2 sensor component routines so they correctly read the sensor output :esphomepr:`2159` by :ghuser:`jamesbraid`
+- Bump tzlocal from 2.1 to 3.0 :esphomepr:`2154` by :ghuser:`dependabot[bot]`
+- Activate owning-memory clang-tidy check :esphomepr:`1891` by :ghuser:`OttoWinter`
+- Fix issue #2054. PZEM004T Component doesn't set the module address. :esphomepr:`1784` by :ghuser:`0x3333`
+- Convert st7735.h to use LF line endings :esphomepr:`2287` by :ghuser:`oxan`
+- Add esphal.h include to inkplate6 component :esphomepr:`2286` by :ghuser:`oxan`
+- Revert "Bump tzlocal from 2.1 to 3.0 (#2154)" :esphomepr:`2289` by :ghuser:`OttoWinter`
+- Run clang-tidy against ESP32 :esphomepr:`2147` by :ghuser:`oxan`
+- Run clang-tidy against Arduino 3 :esphomepr:`2146` by :ghuser:`oxan`
+- Bump click from 7.1.2 to 8.0.1 :esphomepr:`1824` by :ghuser:`dependabot[bot]`
+- Add stale/lock bots :esphomepr:`2299` by :ghuser:`OttoWinter`
+- Use standard version of make_unique when available :esphomepr:`2292` by :ghuser:`oxan`
+- Bug fix of NFC message & records becoming inaccessible in on_tag lambdas :esphomepr:`2309` by :ghuser:`JonasEr`
+- Dsmr updates :esphomepr:`2157` by :ghuser:`glmnet`
+- Support direct relay state feedback for tuya climate component :esphomepr:`1668` by :ghuser:`kroimon`
+- ac_dimmer increase gate time for robotdyn :esphomepr:`1708` by :ghuser:`glmnet`
+- Bump aioesphomeapi from 9.0.0 to 9.1.0 :esphomepr:`2306` by :ghuser:`dependabot[bot]`
+- Bump black from 21.8b0 to 21.9b0 :esphomepr:`2305` by :ghuser:`dependabot[bot]`
+- Add namespace to all PlatformIO library references :esphomepr:`2296` by :ghuser:`oxan`
+- Allow transforms and flashes to not update remote_values :esphomepr:`2313` by :ghuser:`matthewmazzanti`
+- Reduce stale/lock gh actions interval :esphomepr:`2341` by :ghuser:`OttoWinter`
+- Add `esp8266_disable_ssl_support:` config option :esphomepr:`2236` by :ghuser:`ayufan`
+- Bump pylint from 2.10.2 to 2.11.1 :esphomepr:`2334` by :ghuser:`dependabot[bot]`
+- Add eco mode to tuya climate component :esphomepr:`1860` by :ghuser:`kroimon`
+- Fix SPIDevice::write_byte16 to actually take a 16 bit argument :esphomepr:`2345` by :ghuser:`lgugelmann`
+- Redo docker build system with buildkit+multi-stage and cache pio packages :esphomepr:`2338` by :ghuser:`OttoWinter`
+- Calculating the AC only component of the samples :esphomepr:`1906` by :ghuser:`synco`
+- Fix error reporting for DHT bit read loop :esphomepr:`2344` by :ghuser:`besteru`
+- Also run docker CI when requirements change :esphomepr:`2347` by :ghuser:`OttoWinter`
+- Added graphing component :esphomepr:`2109` by :ghuser:`synco` (new-integration) (new-feature)
+- Properly calculate negative temperatures in sm300d2 :esphomepr:`2335` by :ghuser:`poptix`
+- Fix docker release deploy push flag :esphomepr:`2348` by :ghuser:`OttoWinter`
+- Add invert_colors option for st7735 :esphomepr:`2327` by :ghuser:`g5pw`
+- Add deep sleep wakeup from touch (#1238) :esphomepr:`2281` by :ghuser:`chrta` (new-feature)
+- Add ESPHOME_VERSION_CODE define :esphomepr:`2324` by :ghuser:`oxan`
+- Install python requirements after apt ones for better caching :esphomepr:`2349` by :ghuser:`OttoWinter`
+- Introduce call_dump_config() indirection :esphomepr:`2325` by :ghuser:`oxan`
+- ESP-IDF support and generic target platforms :esphomepr:`2303` by :ghuser:`OttoWinter`
+- CI cache only restore from direct matches :esphomepr:`2351` by :ghuser:`OttoWinter`
+- fixes compilation error in rtttl :esphomepr:`2357` by :ghuser:`martgras`
+- Fix MDNS not registered :esphomepr:`2359` by :ghuser:`OttoWinter`
+- Fix src_filter in platformio.ini after src_dir change :esphomepr:`2353` by :ghuser:`OttoWinter`
+- Fix duplicate defines and restore alphabetical order :esphomepr:`2352` by :ghuser:`oxan`
+- Configurable Flash Write Interval :esphomepr:`2119` by :ghuser:`alexyao2015` (new-integration)
+- Fix OTA password mismatch error. :esphomepr:`2363` by :ghuser:`mmakaay`
+- Allow compilation against IDF from repository :esphomepr:`2355` by :ghuser:`oxan`
+- Fix ESP8266 preferences not set up :esphomepr:`2362` by :ghuser:`OttoWinter`
+- Fix ESP8266 preference loading :esphomepr:`2367` by :ghuser:`paulmonigatti`
+- Allow non-addressable lights in light partitions :esphomepr:`2256` by :ghuser:`paulmonigatti` (new-feature)
+- add = to default font glpyh list :esphomepr:`2361` by :ghuser:`WeekendWarrior1`
+- Fix docker pio settings not applied :esphomepr:`2370` by :ghuser:`OttoWinter`
+- Fix OTA crash during reading of new bin file. :esphomepr:`2366` by :ghuser:`mmakaay`
+- Fix Dallas parent not being set :esphomepr:`2369` by :ghuser:`paulmonigatti`
+- Discard SenseAir S8 commands echoes & fix calibration result check :esphomepr:`2358` by :ghuser:`nmaggioni`
+- Add support for Daly Smart BMS :esphomepr:`2156` by :ghuser:`s1lvi0` (new-integration)
+- Combine code of xiaomi_miscale and xiaomi_miscale2 :esphomepr:`2266` by :ghuser:`edenhaus` (breaking-change)
+- Add support for Waveshare 7.5 inch (C) bichromatic display (black-and-white only for now) :esphomepr:`1844` by :ghuser:`pixelspark` (new-feature)
+- ili9341: use larger SPI transfers :esphomepr:`1628` by :ghuser:`numo68`
+- Correctly invert the float output state :esphomepr:`2368` by :ghuser:`jesserockz` (breaking-change)
+- Add support for LTR390 :esphomepr:`1505` by :ghuser:`sjtrny` (new-integration)
+- Allow sloppy Tuya datapoint message length :esphomepr:`1982` by :ghuser:`trvrnrth`
+- Mqtt topics to support numeric fan speed :esphomepr:`1859` by :ghuser:`wifwucite`
+- Wifi scan results :esphomepr:`1605` by :ghuser:`gpambrozio` (new-feature)
+- Add SSD1305 support to SSD1306 integration along with few new options :esphomepr:`1902` by :ghuser:`zhangjingye03` (new-feature) (breaking-change)
+- Fix broken compilation due to conflict between #1237 and IDF changes :esphomepr:`2372` by :ghuser:`oxan`
+- Don't generate IDs with the name of loaded integrations :esphomepr:`2373` by :ghuser:`oxan`
+- fix i2c scanning eror for Arduino :esphomepr:`2364` by :ghuser:`martgras`
+- Bump tzlocal from 2.1 to 3.0 :esphomepr:`2294` by :ghuser:`dependabot[bot]`
+- ledc: do not try to write_state to an uninitialized output :esphomepr:`1732` by :ghuser:`toelke`
+- Fix two i2c error code return errors :esphomepr:`2375` by :ghuser:`OttoWinter`
+- Fix ir_climate on ESP32-C3 :esphomepr:`2314` by :ghuser:`stintel`
+- Fix ESP8266 ADC :esphomepr:`2376` by :ghuser:`paulmonigatti`
+- Fix: Pin flags code generation returning FLAG_NONE :esphomepr:`2377` by :ghuser:`paulmonigatti`
+- Add missing MockObj operators :esphomepr:`2378` by :ghuser:`OttoWinter`
+- Fix esp-idf pinmask bit-shift overflow :esphomepr:`2380` by :ghuser:`chrta`
+- Add i2c bus recovery during initialization :esphomepr:`2379` by :ghuser:`chrta`
+- Bump voluptuous from 0.12.1 to 0.12.2 :esphomepr:`2381` by :ghuser:`dependabot[bot]`
+- Read unencrypted DSMR telegrams in chunks :esphomepr:`2382` by :ghuser:`mmakaay`
+- Fix clang-tidy header filter :esphomepr:`2385` by :ghuser:`OttoWinter`
+- Fix InterruptLock on ESP-IDF :esphomepr:`2388` by :ghuser:`OttoWinter`
+- Fix some issues with wifi driver after IDF refactor :esphomepr:`2387` by :ghuser:`OttoWinter`
+- Fix arduino esp32 wifi v2 :esphomepr:`2389` by :ghuser:`OttoWinter`
+- Misc fixes for esp-idf :esphomepr:`2386` by :ghuser:`OttoWinter`
+- Adds light sensor support for b-parasites :esphomepr:`2391` by :ghuser:`rbaron` (new-feature)
+- fix: Setting Tuya string DP value :esphomepr:`2394` by :ghuser:`irtimaled`
+- Tuya rgb support :esphomepr:`2278` by :ghuser:`irtimaled` (new-feature)
+- add fan.cycle_speed action :esphomepr:`2329` by :ghuser:`WeekendWarrior1` (new-feature)
+- Modbus controller :esphomepr:`1779` by :ghuser:`martgras` (new-integration)
+- Extend nfc ndef records with Text :esphomepr:`2191` by :ghuser:`JonasEr`
+- Fix NDEF URI casing :esphomepr:`2397` by :ghuser:`jesserockz`
+- Dashboard node import and render in browser :esphomepr:`2374` by :ghuser:`OttoWinter` (new-integration)
+- ccs811: Skip reading data if it is not available/ready :esphomepr:`2404` by :ghuser:`chrta`
+- Add missing include for component bme680_bsec :esphomepr:`2403` by :ghuser:`mmakaay`
+- fix: stop tuya light state getting reset :esphomepr:`2401` by :ghuser:`irtimaled`
+- Add Current based cover :esphomepr:`1439` by :ghuser:`djwmarcx` (new-integration)
+- Add cover toggle support :esphomepr:`1809` by :ghuser:`dtmuller` (new-feature)
+- Fix handling of timestamps in Teleinfo component. :esphomepr:`2392` by :ghuser:`0hax`
+- bump dashboard to 20210927.0 :esphomepr:`2405` by :ghuser:`balloob`
+- Add str_sprintf function that returns std::string :esphomepr:`2408` by :ghuser:`oxan`
+- Fix lint issues in web_server_base :esphomepr:`2409` by :ghuser:`jesserockz`
+- Fix uninitialised use of ESPPreferenceObject.backend :esphomepr:`2411` by :ghuser:`paulmonigatti`
+- Add support for SCD4X :esphomepr:`2217` by :ghuser:`sjtrny` (new-integration)
+- Support HSV-based color support on tuya light :esphomepr:`2400` by :ghuser:`irtimaled` (new-feature)
+- Tuya: add cover component :esphomepr:`2279` by :ghuser:`marmarek`
+- Fix tuya cover lint checks :esphomepr:`2414` by :ghuser:`OttoWinter`
+- Bump debian base to 5.1.0 / 20210902 :esphomepr:`2413` by :ghuser:`OttoWinter`
+- Remove default initializations from tuya cover :esphomepr:`2415` by :ghuser:`jesserockz`
+- Move #ifdef to after header include :esphomepr:`2417` by :ghuser:`oxan`
+- String manipulation filters for text sensors! :esphomepr:`2393` by :ghuser:`WeekendWarrior1` (new-feature)
+- Update web_server.cpp :esphomepr:`2419` by :ghuser:`arallsopp`
+- Fix default environment for clang-tidy :esphomepr:`2420` by :ghuser:`oxan`
+- Replace std::move() with const references where possible :esphomepr:`2421` by :ghuser:`oxan`
+- Fix line endings normalization :esphomepr:`2407` by :ghuser:`oxan`
+- Option to ignore CRC for EFuse MAC address :esphomepr:`2399` by :ghuser:`mmakaay`
+- Fix attach_interrupt(...) for esp-idf framework :esphomepr:`2416` by :ghuser:`mmakaay`
+- Fix I2C recovery on Arduino :esphomepr:`2412` by :ghuser:`mmakaay`
+- Fix ESP32 esp-idf OTA updates :esphomepr:`2424` by :ghuser:`mmakaay`
+- Add local MAC address to WiFi info :esphomepr:`2428` by :ghuser:`cvwillegen`
+- Thermostat publish state fix :esphomepr:`2427` by :ghuser:`kbx81`
+- Convert time to use tzdata :esphomepr:`2425` by :ghuser:`OttoWinter`
+- Hotfix for ESP8266 OTA issue: ERROR Error binary size :esphomepr:`2432` by :ghuser:`mmakaay`
+- Disable dependency finder on ESP32 :esphomepr:`2435` by :ghuser:`agners`
+- Use size_t to fix comparision using RISC-V toolchain :esphomepr:`2436` by :ghuser:`agners`
+- Fix I2C recovery ESP32 esp-idf :esphomepr:`2438` by :ghuser:`mmakaay`
+- Fix esp32 no longer has Hash internal lib :esphomepr:`2441` by :ghuser:`OttoWinter`
+- Fix restoring globals :esphomepr:`2442` by :ghuser:`OttoWinter`
+- Always upload using esptool :esphomepr:`2433` by :ghuser:`OttoWinter`
+- Add support for Airthing Wave Mini :esphomepr:`2440` by :ghuser:`ncareau` (new-integration)
+- Improved validation for Addressable Light Partition Segments :esphomepr:`2439` by :ghuser:`paulmonigatti`
+- Bump pytest-cov from 2.12.1 to 3.0.0 :esphomepr:`2444` by :ghuser:`dependabot[bot]`
+- Fix compilation error for shutdown component :esphomepr:`2447` by :ghuser:`martgras`
+- Bump aioesphomeapi from 9.1.4 to 9.1.5 :esphomepr:`2449` by :ghuser:`dependabot[bot]`
+- Only ping once every two seconds :esphomepr:`2448` by :ghuser:`alexiri`
+- Bump esphome-dashboard to 20211006.0 :esphomepr:`2451` by :ghuser:`jesserockz`
+- I2C re-introduce very verbose logging :esphomepr:`2446` by :ghuser:`OttoWinter`
+- Add Safe Mode Restart Switch :esphomepr:`2437` by :ghuser:`paulmonigatti` (new-integration)
+- Add id() for restoring global :esphomepr:`2454` by :ghuser:`jesserockz`
+- Add timestamp to ESPHome dashboard/cli logs :esphomepr:`2455` by :ghuser:`alexiri`
+- I2c fix :esphomepr:`2460` by :ghuser:`martgras`
+- Correct I2C read() return val check in bh1750 component. :esphomepr:`2465` by :ghuser:`mmakaay`
+- atm90e32: make the total_increasing class sensors actually be increasing totals. :esphomepr:`2459` by :ghuser:`davidmonro`
+- Use enum for Tuya fan direction datapoint :esphomepr:`2471` by :ghuser:`rmounce`
+- Fix MQTT cover state when position is supported :esphomepr:`2468` by :ghuser:`definitio`
+- Sgp40 fix :esphomepr:`2462` by :ghuser:`natelust`
+- EntityBase Refactor :esphomepr:`2418` by :ghuser:`paulmonigatti`
+- Fix below freezing temperature for Inkbird sensors :esphomepr:`2466` by :ghuser:`nuttytree`
+- Add configuration for cover topics :esphomepr:`2472` by :ghuser:`definitio`
+- Add configuration for climate topics :esphomepr:`2473` by :ghuser:`definitio`
+- Use arduino btStart for arduino framework :esphomepr:`2457` by :ghuser:`jesserockz`
+- Bump click from 8.0.1 to 8.0.3 :esphomepr:`2481` by :ghuser:`dependabot[bot]`
+- Bump flake8 from 3.9.2 to 4.0.1 :esphomepr:`2483` by :ghuser:`dependabot[bot]`
+- Bump platformio from 5.2.0 to 5.2.1 :esphomepr:`2482` by :ghuser:`dependabot[bot]`
+- Bump esphome-dashboard from 20211006.0 to 20211011.1 :esphomepr:`2484` by :ghuser:`dependabot[bot]`
+- Replace deprecated COLOR_BLACK constant :esphomepr:`2487` by :ghuser:`davet2001`
+- Fix color temperature persistence on CWWW lights :esphomepr:`2486` by :ghuser:`sairon`
+- Fix reset on http_request without network connection :esphomepr:`2474` by :ghuser:`niklasweber`
+- Consolidate CONF_RAW_DATA_ID to const.py :esphomepr:`2491` by :ghuser:`davet2001`
+- Update Airthings BLE :esphomepr:`2453` by :ghuser:`jesserockz`
+- Add on_open and on_closed triggers to cover :esphomepr:`2488` by :ghuser:`nuttytree`
+- Fix LoadProhibited crash for logger baud_rate 0 on esp-idf :esphomepr:`2498` by :ghuser:`mmakaay`
+- Added heatpumpir support :esphomepr:`1343` by :ghuser:`rob-deutsch` (new-integration)
+- Reduce IRAM usage in test3 :esphomepr:`2499` by :ghuser:`oxan`
+- Add optional timeout for wait_until action :esphomepr:`2282` by :ghuser:`jesserockz` (new-feature)
+- Improves ct_clamp component accuracy :esphomepr:`2283` by :ghuser:`skasi7`
+- Allow multiple pn532_spi entries :esphomepr:`2489` by :ghuser:`jesserockz`
+- Add throttle_average sensor filter :esphomepr:`2485` by :ghuser:`sermayoral`
+
+Past Changelogs
+---------------
+
+.. toctree::
+ :maxdepth: 1
+
+ 2021.9.0
+ 2021.8.0
+ v1.20.0
+ v1.19.0
+ v1.18.0
+ v1.17.0
+ v1.16.0
+ v1.15.0
+ v1.14.0
+ v1.13.0
+ v1.12.0
+ v1.11.0
+ v1.10.0
+ v1.9.0
+ v1.8.0
+ v1.7.0
diff --git a/changelog/index.rst b/changelog/index.rst
index eecc2c524..f8ffc1e7d 100644
--- a/changelog/index.rst
+++ b/changelog/index.rst
@@ -2,7 +2,7 @@ Changelog
=========
.. redirect::
- :url: /changelog/2021.9.0.html
+ :url: /changelog/2021.10.0.html
.. toctree::
:glob:
diff --git a/components/binary_sensor/esp32_touch.rst b/components/binary_sensor/esp32_touch.rst
index 6d6baa8ba..5f137ba40 100644
--- a/components/binary_sensor/esp32_touch.rst
+++ b/components/binary_sensor/esp32_touch.rst
@@ -95,6 +95,10 @@ Configuration variables:
- **id** (*Optional*,
:ref:`config-id`): Manually specify
the ID used for code generation.
+- **wakeup_threshold** (*Optional*, int): The threshold to use to detect touch events to wakeup from deep
+ sleep. Smaller values mean a higher probability that the pad is being touched. All touch pad sensors that
+ should trigger a wakeup from deep sleep must specify this value. The :ref:`deep_sleep-component` must also
+ be configured to enable a wakeup from a touch event. Note that no filter is active during deep sleep.
- All other options from :ref:`Binary Sensor `.
Touch Pad Pins
diff --git a/components/binary_sensor/index.rst b/components/binary_sensor/index.rst
index 5e95e61de..3cf2a1802 100644
--- a/components/binary_sensor/index.rst
+++ b/components/binary_sensor/index.rst
@@ -30,6 +30,7 @@ Configuration variables:
- **device_class** (*Optional*, string): The device class for the
sensor. See https://www.home-assistant.io/components/binary_sensor/
for a list of available options.
+- **icon** (*Optional*, icon): Manually set the icon to use for the binary sensor in the frontend.
- **filters** (*Optional*, list): A list of filters to apply on the binary sensor values such as
inverting signals. See :ref:`binary_sensor-filters`.
diff --git a/components/binary_sensor/modbus_controller.rst b/components/binary_sensor/modbus_controller.rst
new file mode 100644
index 000000000..2b87ffc32
--- /dev/null
+++ b/components/binary_sensor/modbus_controller.rst
@@ -0,0 +1,69 @@
+Modbus Binary Sensor
+====================
+
+.. seo::
+ :description: Instructions for setting up a modbus_controller device binary sensor.
+ :image: modbus.png
+
+The ``modbus_controller`` binary sensor platform creates a binary sensor from a modbus_controller component
+and requires :doc:`/components/modbus_controller` to be configured.
+
+
+Configuration variables:
+------------------------
+
+- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
+- **name** (**Required**, string): The name of the sensor.
+- **modbus_functioncode** (**Required**): type of the modbus register.
+ - "read_coils": Function 01 (01hex) Read Coils - Reads the ON/OFF status of discrete coils in the device.
+ - "read_discrete_inputs": Function 02(02hex) - Reads the ON/OFF status of discrete inputs in the device.
+ - "read_holding_registers": Function 03 (03hex) Read Holding Registers - Read the binary contents of holding registers in the device.
+ - "read_input_registers": Function 04 (04hex) Read Input Registers - Read the binary contents of input registers in the device.
+
+- **address**: (**Required**, integer): start address of the first register in a range
+- **bitmask** : some values are packed in a response. The bitmask is used to determined if the result is true or false
+- **skip_updates**: (*Optional*, integer): By default all sensors of of a modbus_controller are updated together. For data points that don't change very frequently updates can be skipped. A value of 5 would only update this sensor range in every 5th update cycle
+- **force_new_range**: (*Optional*, boolean): If possible sensors with sequential addresses are grouped together and requested in one range. Setting `foce_new_range: true` enforces the start of a new range at that address.
+- **lambda** (*Optional*, :ref:`lambda `):
+ Lambda to be evaluated every update interval to get the new value of the sensor
+- **offset**: (*Optional*, integer): not required for most cases
+ offset from start address in bytes. If more than one register is read a modbus read registers command this value is used to find the start of this datapoint relative to start address. The component calculates the size of the range based on offset and size of the value type
+ The value for offset depends on the register type. If a binary_sensor is created from an input register the offset is in bytes. For coil and discrete input resisters the LSB of the first data byte contains the coil addressed in the request. The other coils follow toward the high-order end of this byte and from low order to high order in subsequent bytes. For the registers offset is the position of the relevant bit.
+ To get the value of the coil register 2 can be retrived using address: 2 / offset: 0 or address: 0 / offset 2
+
+
+Example
+
+.. code-block:: yaml
+
+ binary_sensor:
+ - platform: modbus_controller
+ modbus_controller_id: epever
+ id: battery_internal_resistance_abnormal
+ name: "Battery internal resistance abnormal"
+ register_type: read
+ address: 0x3200
+ bitmask: 0x80 #(bit 8)
+
+
+Parameters passed into the lambda
+
+- **x** (bool): The parsed float value of the modbus data
+- **data** (std::vector`.
+
+MQTT options:
+
+- **action_state_topic** (*Optional*, string): The topic to publish
+ climate device action changes to.
+- **away_state_topic** (*Optional*, string): The topic to publish
+ away mode changes on.
+- **away_command_topic** (*Optional*, string): The topic to receive
+ away mode commands on.
+- **current_temperature_state_topic** (*Optional*, string): The topic to publish
+ current temperature changes to.
+- **fan_mode_state_topic** (*Optional*, string): The topic to publish
+ fan mode changes to.
+- **fan_mode_command_topic** (*Optional*, string): The topic to receive
+ fan mode commands on.
+- **mode_state_topic** (*Optional*, string): The topic to publish
+ climate device mode changes to.
+- **mode_command_topic** (*Optional*, string): The topic to receive
+ climate device mode commands on.
+- **swing_mode_state_topic** (*Optional*, string): The topic to publish
+ swing mode changes to.
+- **swing_mode_command_topic** (*Optional*, string): The topic to receive
+ swing mode commands on.
+- **target_temperature_state_topic** (*Optional*, string): The topic to publish
+ target temperature changes to.
+- **target_temperature_command_topic** (*Optional*, string): The topic to receive
+ target temperature commands on.
+- **target_temperature_high_state_topic** (*Optional*, string): The topic to publish
+ higher target temperature changes to.
+- **target_temperature_high_command_topic** (*Optional*, string): The topic to receive
+ higher target temperature commands on.
+- **target_temperature_low_state_topic** (*Optional*, string): The topic to publish
+ lower target temperature changes to.
+- **target_temperature_low_command_topic** (*Optional*, string): The topic to receive
+ lower target temperature commands on.
+- All other options from :ref:`MQTT Component `.
Climate Automation
------------------
diff --git a/components/climate/ir_climate.rst b/components/climate/ir_climate.rst
index 6e36bf675..b4e8b0f04 100755
--- a/components/climate/ir_climate.rst
+++ b/components/climate/ir_climate.rst
@@ -19,6 +19,8 @@ submit a feature request (see FAQ).
| Name | Platform name | Supports receiver |
| | | |
+=======================================+=====================+======================+
+| :ref:`Arduino-HeatpumpIR` | ``heatpumpir`` | |
++---------------------------------------+---------------------+----------------------+
| Ballu | ``ballu`` | yes |
+---------------------------------------+---------------------+----------------------+
| Coolix | ``coolix`` | yes |
@@ -81,6 +83,25 @@ Advanced Options
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **transmitter_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the remote transmitter.
+.. _heatpumpir:
+
+Arduino-HeatpumpIR
+------------------
+
+The ``heatpumpir`` platform supports dozens of manufacturers and hundreds of AC units by utilising the `Arduino-HeatpumpIR library `__.
+
+This platform should only be used if your AC unit is not supported by any of the other (native) platforms. No support can be provided for Arduino-HeatpumpIR, because it is a third party library.
+
+This platform utilises the library's generic one-size-fits-all API, which might not line up perfectly with all of the supported AC units. For example, some AC units have more fan speed options than what the generic API supports.
+
+Additional configuration must be specified for this platform:
+
+- **protocol** (**Required**, string): Choose one of Arduino-HeatpumpIR's supported protcols: ``aux``, ``ballu``, ``carrier_mca``, ``carrier_nqv``, ``daikin_arc417``, ``daikin_arc480``, ``daikin``, ``fuego``, ``fujitsu_awyz``, ``gree``, ``greeya``, ``greeyan``, ``hisense_aud``, ``hitachi``, ``hyundai``, ``ivt``, ``midea``, ``mitsubishi_fa``, ``mitsubishi_fd``, ``mitsubishi_fe``, ``mitsubishi_heavy_fdtc``, ``mitsubishi_heavy_zj``, ``mitsubishi_heavy_zm``, ``mitsubishi_heavy_zmp``, ``mitsubishi_heavy_kj``, ``mitsubishi_msc``, ``mitsubishi_msy``, ``mitsubishi_sez``, ``panasonic_ckp``, ``panasonic_dke``, ``panasonic_jke``, ``panasonic_lke``, ``panasonic_nke``, ``samsung_aqv``, ``samsung_fjm``, ``sharp``, ``toshiba_daiseikai``, ``toshiba``
+- **horizontal_default** (**Required**, string): What to default to when the AC unit's horizontal direction is *not* set to swing. Options are: ``left``, ``mleft``, ``middle``, ``mright``, ``right``, ``auto``
+- **vertical_default** (**Required**, string): What to default to when the AC unit's vertical direction is *not* set to swing. Options are: ``down``, ``mdown``, ``middle``, ``mup``, ``up``, ``auto``
+- **max_temperature** (**Required**, float): The maximum temperature that the AC unit supports being set to.
+- **min_temperature** (**Required**, float): The minimum temperature that the AC unit supports being set to.
+
.. _ir-receiver_id:
Using a Receiver
diff --git a/components/climate/tuya.rst b/components/climate/tuya.rst
index eda6c300c..6a2843dc6 100644
--- a/components/climate/tuya.rst
+++ b/components/climate/tuya.rst
@@ -27,7 +27,7 @@ On this controller, the data points are:
- 3 represents the target temperature.
- 4 represents the current temperature.
- 5 represents the timer but is not yet available to be used in ESPHome.
-- 7 represents the eco mode switch. (use the :doc:`/components/switch/tuya` component to control this)
+- 7 represents the eco mode switch.
Based on this, you can create the climate device as follows:
@@ -39,6 +39,8 @@ Based on this, you can create the climate device as follows:
switch_datapoint: 1
target_temperature_datapoint: 3
current_temperature_datapoint: 4
+ eco_datapoint: 7
+ eco_temperature: 20 °C
Configuration variables:
------------------------
@@ -47,13 +49,17 @@ Configuration variables:
- **name** (**Required**, string): The name of the climate device.
- **supports_heat** (*Optional*, boolean): Specifies if the device has a heating mode. Defaults to ``true``.
- **supports_cool** (*Optional*, boolean): Specifies if the device has a cooling mode. Defaults to ``false``.
-- **switch_datapoint** (**Required**, int): The datapoint id number of the climate switch.
-- **active_state_datapoint** (*Optional*, int): The datapoint id number of the active state.
-- **active_state_heating_value** (*Optional*, int): The active state datapoint value the device reports when heating. Defaults to ``1``.
-- **active_state_cooling_value** (*Optional*, int): The active state datapoint value the device reports when cooling.
+- **switch_datapoint** (**Required**, int): The datapoint id number of the climate switch (device on/off).
+- **active_state_datapoint** (*Optional*, int): The datapoint id number of the active state - :ref:`see below `.
+- **active_state_heating_value** (*Optional*, int): The active state datapoint value the device reports when heating. Defaults to ``1`` - :ref:`see below `.
+- **active_state_cooling_value** (*Optional*, int): The active state datapoint value the device reports when cooling - :ref:`see below `.
+- **heating_state_pin** (*Optional*, :ref:`config-pin`): The input pin indicating that the device is heating - :ref:`see below `. Only used if **active_state_datapoint** is not configured.
+- **cooling_state_pin** (*Optional*, :ref:`config-pin`): The input pin indicating that the device is cooling - :ref:`see below `. Only used if **active_state_datapoint** is not configured.
- **target_temperature_datapoint** (**Required**, int): The datapoint id number of the target temperature.
- **current_temperature_datapoint** (**Required**, int): The datapoint id number of the current temperature.
- **temperature_multiplier** (*Optional*, float): A multiplier to modify the incoming and outgoing temperature values - :ref:`see below `.
+- **eco_datapoint** (*Optional*, int): The datapoint id number of the eco mode state.
+- **eco_temperature** (*Optional*, float): The target temperature the controller uses while the eco mode is active.
If the device has different multipliers for current and target temperatures, **temperature_multiplier** can be replaced with both of:
@@ -62,6 +68,19 @@ If the device has different multipliers for current and target temperatures, **t
- All other options from :ref:`Climate `.
+.. _active_state_detection:
+
+Active state detection
+----------------------
+
+Some Tuya climate devices report the active state (idle/heating/cooling) via a tuya data point. In this case, you can use the **active_state_datapoint** variable together with **active_state_heating_value** and **active_state_cooling_value**.
+
+If your device does not make a data point available for this, it is possible to modify the hardware so that the relay outputs can be read by the ESP. Please refer to `this discussion ` for more details on the required modifications. You can then use the **heating_state_pin** and/or **cooling_state_pin** configuration variables to detect the current state.
+
+If none of the above variables are set, the current state is inferred from the difference between the current and target temperatures.
+If **supports_heat** is ``True`` and the current temperature is more than 1 °C below the target temperature, the device is expected to be heating.
+If **supports_cool** is ``True`` and the current temperature is more than 1 °C above the target temperature, the device is expected to be cooling.
+
.. _temperature-multiplier:
Temperature multiplier
diff --git a/components/cover/current_based.rst b/components/cover/current_based.rst
new file mode 100644
index 000000000..ee4581dc1
--- /dev/null
+++ b/components/cover/current_based.rst
@@ -0,0 +1,265 @@
+Current Based Cover
+===================
+
+.. seo::
+ :description: Instructions for setting up current-based covers in ESPHome.
+ :image: window-open.jpg
+
+The ``current_based`` cover platform allows you to create covers with position control by using current
+sensors to detect the fully-open and fully-closed states. This is pretty useful when using motors with
+integrated mechanical endstops. During cover operation, the component monitors the current consumption
+to detect when the motor has stopped.
+
+When fully open or close is requested, the corresponding relay will stay on until the current the motor is
+consuming goes below a certain amount. The amount of current needs to be specified in the configuration.
+
+Open and close durations can be specified to allow ESPHome to approximate the current position of the cover.
+
+.. figure:: images/more-info-ui.png
+ :align: center
+ :width: 75.0%
+
+This type of cover also provides safety features like current-based obstacle detection with automatic configurable
+rollback as well as relay malfunction detection: operation cancels if there's a current flowing in the opposite
+operation circuit (typically caused by welded relays).
+
+.. warning::
+
+ Depending on the cover and motor type, obstacles can physically damage the cover before being detectable.
+ Verify your setup to ensure the current consumption will increase enough to be detectable before causing
+ any physical damage. Use it at your own risk.
+
+.. code-block:: yaml
+
+ # Example configuration entry
+ 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
+ open_duration: 12s
+ open_action:
+ - switch.turn_on: open_cover_switch
+
+ close_sensor: close_current_sensor
+ close_moving_current_threshold: 0.5
+ close_obstacle_current_threshold: 0.8
+ close_duration: 10s
+ close_action:
+ - switch.turn_on: close_cover_switch
+
+ stop_action:
+ - switch.turn_off: close_cover_switch
+ - switch.turn_off: open_cover_switch
+
+ obstacle_rollback: 30%
+ start_sensing_delay: 0.8s
+
+
+
+Configuration variables:
+------------------------
+
+- **name** (**Required**, string): The name of the cover.
+- **open_sensor** (**Required**, :ref:`config-id`): The open current sensor.
+- **open_action** (**Required**, :ref:`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_moving_current_threshold** (**Required**, float): The amount of current in Amps the motor
+ should drain to consider the cover is opening.
+- **open_obstacle_current_threshold** (**Required**, float): The amount of current in Amps the motor
+ should drain to consider the cover is blocked during opening.
+- **close_sensor** (**Required**, :ref:`config-id`): The close current sensor.
+- **close_action** (*Optional*, :ref:`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_moving_current_threshold** (**Required**, float): The amount of current in Amps the motor
+ should drain to consider the cover is closing.
+- **close_obstacle_current_threshold** (**Required**, float): The amount of current in Amps the motor
+ should drain to consider the cover is blocked during closing.
+- **stop_action** (**Required**, :ref:`Action `): The action that should
+ be performed to stop the cover.
+- **max_duration** (*Optional*, :ref:`config-time`): The maximum duration the cover should be opening
+ or closing. Useful for protecting from dysfunctional motor integrated endstops.
+- **start_sensing_delay** (*Optional*, :ref:`config-time`): The amount of time the current sensing will be
+ disabled when the movement starts. Motors can take some time before reaching their average consumption.
+ Low values can cause an immediate stop because of the first current reading happening in the current-rising period.
+ Defaults to ``500ms``.
+- **obstacle_rollback** (*Optional*, percentage): The percentage of rollback the cover will perform in case of
+ obstacle detection. Defaults to ``10%``.
+- **malfunction_detection** (*Optional*, boolean): Enable to detect malfunction detection (Tipically welded realys). Defaults to ``True``.
+- **malfunction_action** (*Optional*, :ref:`Action `): The action that should
+ be performed when relay malfunction is detected. Malfunction may require device servicing. You can use this action
+ to notify other systems about this situation
+- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
+- All other options from :ref:`Cover `.
+
+Use with Shelly 2.5
+-------------------
+
+.. seo::
+ :description: Instructions for setting up current-based covers in ESPHome using a Shelly 2.5.
+ :image: shelly2.5.png
+
+The Shelly 2.5 is the perfect hardware for this platform. It features two outputs with current monitoring
+(thanks to an embedded :doc:`ADE7953 `) in a very small form factor (39mm x 36mm x 17 mm).
+It also features an :doc:`NTC temperature sensor `.
+
+.. figure:: images/shelly2.5.png
+ :align: center
+ :width: 30.0%
+
+These devices typically run hot (~55Cº at 20ºC room temperature). Long-term heavy loads (near to its rated limit) can overheat the device.
+It is strongly recommended to monitor the device temperature using the NTC temperature sensor, shutting down the device if it exceeds 90ºC.
+This safety feature is also present in the original firmware.
+
+.. warning::
+
+ The ADE7953 IRQ line is connected to the GPIO16. The ``irq_pin`` parameter for the :doc:`ADE7953 ` MUST be
+ set to GPIO16 to prevent device overheat (>70ºC idling).
+
+Configuration example:
+
+.. code-block:: yaml
+
+ esphome:
+ name: Shelly 2.5
+ platform: ESP8266
+ board: esp01_1m
+ esp8266_restore_from_flash: true
+
+ i2c:
+ sda: GPIO12
+ scl: GPIO14
+
+ sensor:
+ - platform: ade7953
+ irq_pin: GPIO16
+ voltage:
+ name: Shelly 2.5 Mains Voltage
+ internal: true
+ filters:
+ - throttle: 5s
+ current_a:
+ name: Shelly 2.5 Open Current
+ id: open_current
+ internal: true
+ current_b:
+ name: Shelly 2.5 Close Current
+ id: close_current
+ internal: true
+ update_interval: 0.5s
+
+ # NTC Temperature
+ - platform: ntc
+ sensor: temp_resistance_reading
+ name: Shelly 2.5 Temperature
+ unit_of_measurement: "°C"
+ accuracy_decimals: 1
+ calibration:
+ b_constant: 3350
+ reference_resistance: 10kOhm
+ reference_temperature: 298.15K
+ on_value_range:
+ above: 90
+ then: # Security shutdown by overheating
+ - switch.turn_on: _shutdown
+
+ - platform: resistance
+ id: temp_resistance_reading
+ sensor: temp_analog_reading
+ configuration: DOWNSTREAM
+ resistor: 32kOhm
+ internal: true
+ - platform: adc
+ id: temp_analog_reading
+ pin: A0
+ update_interval: 30s
+ internal: true
+
+ binary_sensor:
+ - platform: gpio
+ pin:
+ number: GPIO13
+ name: Shelly 2.5 Open Button
+ on_press:
+ then:
+ cover.open: blind
+
+ - platform: gpio
+ pin:
+ number: GPIO5
+ name: Shelly 2.5 Close Button
+ on_press:
+ then:
+ cover.close: blind
+
+ switch:
+ - platform: shutdown
+ id: _shutdown
+ name: Shelly 2.5 Shutdown
+
+ - platform: gpio
+ id: open_relay
+ name: Shelly 2.5 Open Relay
+ pin: GPIO15
+ restore_mode: RESTORE_DEFAULT_OFF
+ interlock: &interlock [open_relay, close_relay]
+ interlock_wait_time: 200ms
+
+ - platform: gpio
+ id: close_relay
+ name: Shelly 2.5 Close Relay
+ pin: GPIO4
+ restore_mode: RESTORE_DEFAULT_OFF
+ interlock: *interlock
+ interlock_wait_time: 200ms
+
+ # Example configuration entry
+ cover:
+ - platform: current_based
+ name: Blind
+ id: blind
+
+ open_sensor: open_current
+ open_moving_current_threshold: 0.5
+ open_duration: 12s
+ open_action:
+ - switch.turn_on: open_relay
+ close_sensor: close_current
+ close_moving_current_threshold: 0.5
+ close_duration: 10s
+ close_action:
+ - switch.turn_on: close_relay
+ stop_action:
+ - switch.turn_off: close_relay
+ - switch.turn_off: open_relay
+ obstacle_rollback: 30%
+ start_sensing_delay: 0.8s
+ malfunction_detection: true
+ malfunction_action:
+ then:
+ - logger.log: "Malfunction detected. Relay welded."
+
+
+
+ status_led:
+ pin:
+ number: GPIO0
+ inverted: yes
+
+
+
+See Also
+--------
+
+- :doc:`index`
+- :doc:`/components/cover/template`
+- :doc:`/components/sensor/ade7953`
+- :ref:`automation`
+- :apiref:`current_based/current_based_cover.h`
+- :ghedit:`Edit`
diff --git a/components/cover/images/shelly2.5.png b/components/cover/images/shelly2.5.png
new file mode 100644
index 000000000..2fb7d7620
Binary files /dev/null and b/components/cover/images/shelly2.5.png differ
diff --git a/components/cover/index.rst b/components/cover/index.rst
index 74c06b931..a96f45c4a 100644
--- a/components/cover/index.rst
+++ b/components/cover/index.rst
@@ -30,6 +30,7 @@ Configuration variables:
- **device_class** (*Optional*, string): The device class for the
sensor. See https://www.home-assistant.io/components/cover/ for a list of available options.
+- **icon** (*Optional*, icon): Manually set the icon to use for the cover in the frontend.
Advanced options:
@@ -39,7 +40,19 @@ 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``.
-- If MQTT enabled, all other options from :ref:`MQTT Component `.
+
+MQTT options:
+
+- **position_state_topic** (*Optional*, string): The topic to publish
+ cover position changes to.
+- **position_command_topic** (*Optional*, string): The topic to receive
+ cover position commands on.
+- **tilt_state_topic** (*Optional*, string): The topic to publish cover
+ cover tilt state changes to.
+- **tilt_command_topic** (*Optional*, string): The topic to receive
+ cover tilt commands on.
+- All other options from :ref:`MQTT Component `.
+
.. _cover-open_action:
@@ -110,6 +123,31 @@ This :ref:`action ` stops the cover with the given ID when execut
call.set_command_stop();
call.perform();
+.. _cover-toggle_action:
+
+``cover.toggle`` Action
+-----------------------
+
+This :ref:`action ` toggles the cover with the given ID when executed,
+cycling through the states close/stop/open/stop... This allows the cover to be controlled
+by a single push button.
+
+.. code-block:: yaml
+
+ on_...:
+ then:
+ - cover.toggle: cover_1
+
+.. note::
+
+ This action can also be expressed in :ref:`lambdas `:
+
+ .. code-block:: cpp
+
+ auto call = id(cover_1).make_call();
+ call.set_command_toggle();
+ call.perform();
+
.. _cover-control_action:
``cover.control`` Action
@@ -169,7 +207,7 @@ fields are read-only, if you want to act on the cover, use the ``make_call()`` m
} else {
// Cover is in-between open and closed
}
-
+
- ``tilt``: Retrieve the current tilt position of the cover, as a value between ``0.0`` and ``1.0``.
- ``current_operation``: The operation the cover is currently performing:
@@ -184,6 +222,36 @@ fields are read-only, if you want to act on the cover, use the ``make_call()`` m
// Cover is currently closing
}
+.. _cover-on_open_trigger:
+
+``cover.on_open`` Trigger
+*************************
+
+This trigger is activated each time the cover reaches a fully open state.
+
+.. code-block:: yaml
+
+ cover:
+ - platform: template # or any other platform
+ # ...
+ on_open:
+ - logger.log: "Cover is Open!"
+
+.. _cover-on_closed_trigger:
+
+``cover.on_closed`` Trigger
+***************************
+
+This trigger is activated each time the cover reaches a fully closed state.
+
+.. code-block:: yaml
+
+ cover:
+ - platform: template # or any other platform
+ # ...
+ on_closed:
+ - logger.log: "Cover is Closed!"
+
See Also
--------
diff --git a/components/cover/tuya.rst b/components/cover/tuya.rst
new file mode 100644
index 000000000..7542f11d2
--- /dev/null
+++ b/components/cover/tuya.rst
@@ -0,0 +1,80 @@
+Tuya Cover
+==========
+
+.. seo::
+ :description: Instructions for setting up a Tuya cover motor.
+
+The ``tuya`` cover platform creates a simple position-only cover from a
+tuya serial component.
+
+There are two components, the Tuya bus and the cover that uses it. The :doc:`/components/tuya`
+component requires a :ref:`UART bus ` to be configured. Put the ``tuya`` component in
+the config and it will list the possible devices for you in the config log.
+
+.. code-block:: yaml
+
+ # Example configuration entry
+ # Make sure your WiFi will connect
+ wifi:
+ ssid: "ssid"
+ password: "password"
+
+ # Make sure logging is not using the serial port
+ logger:
+ baud_rate: 0
+
+ # Enable Home Assistant API
+ api:
+
+ # Make sure you can upload new firmware OTA
+ ota:
+
+ # My dimmer used the hardware serial port on the alternate pins
+ uart:
+ rx_pin: GPIO13
+ tx_pin: GPIO15
+ baud_rate: 9600
+
+ # Register the Tuya MCU connection
+ tuya:
+
+Here is an example output for a Tuya dimmer:
+
+.. code-block:: text
+
+ [21:50:28][C][tuya:024]: Tuya:
+ [21:50:28][C][tuya:031]: Datapoint 2: int value (value: 53)
+ [21:50:28][C][tuya:029]: Datapoint 5: switch (value: OFF)
+
+On this cover motor, the position control is datapoint 2.
+Now you can create the cover.
+
+.. code-block:: yaml
+
+ # Create a cover using the dimmer
+ cover:
+ - platform: "tuya"
+ name: "motor1"
+ position_datapoint: 2
+
+Configuration variables:
+------------------------
+
+- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
+- **name** (**Required**, string): The name of the cover.
+- **position_datapoint** (**Required**, int): The datapoint id number of the cover position value.
+- **min_value** (*Optional*, int, default 0): The lowest position value, meaning cover closed.
+- **max_value** (*optional*, int, default 255): the highest position value, meaning cover opened.
+- **invert_position** (*optional*, boolean): invert the meaning of ``min_value`` and ``max_value``.
+ When set to ``true``, ``min_value`` will mean opened and ``max_value`` is closed.
+- All other options from :ref:`Cover `.
+
+
+See Also
+--------
+
+- :doc:`/components/tuya`
+- :doc:`/components/cover/index`
+- :apiref:`tuya/cover/tuya_cover.h`
+- :ghedit:`Edit`
+
diff --git a/components/deep_sleep.rst b/components/deep_sleep.rst
index e1c9ce64e..7f886e296 100644
--- a/components/deep_sleep.rst
+++ b/components/deep_sleep.rst
@@ -1,3 +1,5 @@
+.. _deep_sleep-component:
+
Deep Sleep Component
====================
@@ -33,6 +35,8 @@ Configuration variables:
- **run_duration** (*Optional*, :ref:`config-time`): The time duration the node should be active, i.e. run code.
- **sleep_duration** (*Optional*, :ref:`config-time`): The time duration to stay in deep sleep mode.
+- **touch_wakeup** (*Optional*, boolean): Only on ESP32. Use a touch event to wakeup from deep sleep. To be able
+ to wakeup from a touch event, :ref:`esp32-touch-binary-sensor` must be configured properly.
- **wakeup_pin** (*Optional*, :ref:`Pin Schema `): Only on ESP32. A pin to wake up to once
in deep sleep mode. Use the inverted property to wake up to LOW signals.
- **wakeup_pin_mode** (*Optional*): Only on ESP32. Specify how to handle waking up from a ``wakeup_pin`` if
diff --git a/components/display/images/graph_dualtrace.png b/components/display/images/graph_dualtrace.png
new file mode 100644
index 000000000..4beeacf91
Binary files /dev/null and b/components/display/images/graph_dualtrace.png differ
diff --git a/components/display/images/graph_screen.png b/components/display/images/graph_screen.png
new file mode 100644
index 000000000..a47ed6ca5
Binary files /dev/null and b/components/display/images/graph_screen.png differ
diff --git a/components/display/index.rst b/components/display/index.rst
index fcf63d50b..b6d50e9f5 100644
--- a/components/display/index.rst
+++ b/components/display/index.rst
@@ -177,7 +177,7 @@ Configuration variables:
here will be compiled into the binary. Adjust this if you need some special characters or want to
reduce the size of the binary if you don't plan to use some glyphs. The items in the list can also
be more than one character long if you for example want to use font ligatures. Defaults to
- ``!"%()+,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz``.
+ ``!"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz``.
.. note::
@@ -305,7 +305,7 @@ To display a text string from a ``text_sensor``, append ``.c_str()`` to the end
# ...
lambda: |-
it.printf(0, 0, id(my_font), "Text to follow: %s", id(template_text).state.c_str());
-
+
The last printf tip for use in displays I will discuss here is how to display binary sensor values. You
*could* of course just check the state with an ``if`` statement as the first few lines in the example below, but if
you want to be efficient you can use an *inline if* too. With the ``%s`` print specifier you can tell it to
@@ -370,6 +370,116 @@ Configuration variables:
RGB displays use red, green, and blue, while grayscale displays may use white.
+.. _display-graphs:
+
+Graphs
+******
+
+You can display a graph of a sensor value(s) using this component. Examples:
+
+.. figure:: images/graph_screen.png
+ :align: center
+ :width: 60.0%
+
+.. figure:: images/graph_dualtrace.png
+ :align: center
+ :width: 60.0%
+
+Graph component with options for grids, border and line-types.
+
+.. code-block:: yaml
+
+ graph:
+ # Show bare-minimum auto-ranged graph
+ - id: single_temperature_graph
+ sensor: my_temperature
+ duration: 1h
+ width: 151
+ height: 51
+ # Show multi-trace graph
+ - id: multi_temperature_graph
+ duration: 1h
+ x_grid: 10min
+ y_grid: 1.0 # degC/div
+ width: 151
+ height: 51
+ traces:
+ - sensor: my_inside_temperature
+ line_type: DASHED
+ line_thickness: 2
+ color: my_red
+ - sensor: my_outside_temperature
+ line_type: SOLID
+ line_thickness: 3
+ color: my_blue
+ - sensor: my_beer_temperature
+ line_type: DOTTED
+ line_thickness: 2
+ color: my_green
+
+Configuration variables:
+
+- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the graph later
+ in your display code.
+- **width** (**Required**, integer): The graph width in pixels
+- **height** (**Required**, integer): The graph height in pixels
+- **duration** (**Required**, seconds): The total graph history duration.
+- **border** (*Optional*, boolean): Specifics if a border will be draw around the graph. Default is True.
+- **x_grid** (*Optional*): Specifies the time per division. If not specified, no vertical grid will be drawn.
+- **y_grid** (*Optional*, float): Specifics the number of units per division. If not specified, no horizontal grid will be drawn.
+- **max_range** (*Optional*): Specifies the maximum Y-axis range.
+- **min_range** (*Optional*): Specifies the minimum Y-axis range.
+- **max_value** (*Optional*): Specifies the maximum Y-axis value.
+- **min_value** (*Optional*): Specifies the minimum Y-axis value.
+- **traces** (*Optional*): Use this to specify more than a single trace.
+
+Trace specific fields:
+- **sensor** (*Optional*, id): The sensor value to plot
+- **line_thickness** (*Optional*): Defaults to 3
+- **line_type** (*Optional*): Specifies the plot line-type. Can be one of the following: ``SOLID``, ``DOTTED``, ``DASHED``. Defaults to ``SOLID``.
+- **color** (*Optional*): Sets the color of the sensor trace.
+
+And then later in code:
+
+.. code-block:: yaml
+
+ display:
+ - platform: ...
+ # ...
+ pages:
+ - id: page1
+ lambda: |-
+ // Draw the graph at position [x=10,y=20]
+ it.graph(10, 20, id(simple_temperature_graph));
+ - id: page2
+ lambda: |-
+ // Draw the graph at position [x=10,y=20]
+ it.graph(10, 20, id(multi_temperature_graph), my_yellow);
+
+ color:
+ - id: my_red
+ red: 100%
+ green: 0%
+ blue: 0%
+ - id: my_green
+ red: 0%
+ green: 100%
+ blue: 0%
+ - id: my_blue
+ red: 0%
+ green: 0%
+ blue: 100%
+ - id: my_yellow
+ red: 100%
+ green: 100%
+ blue: 0%
+.. note::
+
+ Here are some things to note:
+ - Setting ``y_grid`` will expand any specified range to the nearest multiple of grid spacings.
+ - Axis labels are currently not possible without manually placing them.
+ - The grid and border color is set with it.graph(), while the traces are defined separately.
+
Images
******
@@ -609,7 +719,7 @@ You can then switch between these with three different actions:
- **to** (*Optional*, :ref:`config-id`): A page id. If set the automation is only triggered if changing to this page. Defaults to all pages.
Additionally the old page will be given as the variable ``from`` and the new one as the variable ``to``.
-
+
See Also
--------
diff --git a/components/display/ssd1306.rst b/components/display/ssd1306.rst
index a60b0f170..8ca40fcc5 100644
--- a/components/display/ssd1306.rst
+++ b/components/display/ssd1306.rst
@@ -12,11 +12,11 @@ Over I²C
The ``ssd1306_i2c`` display platform allows you to use
SSD1306 (`datasheet `__,
-`Adafruit `__)
+`Adafruit `__), SSD1305 (`datasheet `__)
and SH1106 (`datasheet `__,
`electrodragon `__)
displays with ESPHome. Note that this component is for displays that are connected via the :ref:`I²C Bus `.
-If your SSD1306 or SH1106 is connected via the 4-Wire :ref:`SPI bus `, see :ref:`ssd1306-spi`.
+If your SSD1306/SSD1305 or SH1106 is connected via the 4-Wire :ref:`SPI bus `, see :ref:`ssd1306-spi`.
.. figure:: images/ssd1306-full.jpg
:align: center
@@ -56,14 +56,22 @@ Configuration variables:
- ``SH1106 128x64``
- ``SH1106 96x16``
- ``SH1106 64x48``
+ - ``SSD1305 128x32``
+ - ``SSD1305 128x64``
- **reset_pin** (*Optional*, :ref:`Pin Schema `): The RESET pin. Defaults to not connected.
- **address** (*Optional*, int): Manually specify the :ref:`I²C ` address of the display. Defaults to 0x3C.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ``0°`` (default), ``90°``, ``180°``, ``270°``.
-- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
+- **contrast** (*Optional*, percentage): Set display contrast in %. Defaults to ``100%``.
+- **brightness** (*Optional*, percentage): Set display brightness in %. Only can be used with SSD1305. Defaults to ``100%``.
- **external_vcc** (*Optional*, boolean): Set this to true if you have the VCC pin connected to an external power supply.
Defaults to ``false``.
+- **flip_x** (*Optional*, boolean): Flip the horizontal axis on the screen. Defaults to ``true``.
+- **flip_y** (*Optional*, boolean): Flip the vertical axis on the screen. Defaults to ``true``.
+- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``0~15``. Defaults to ``0``.
+- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``0~15``. Defaults to ``0``.
+- **invert** (*Optional*, boolean): Invert all pixel state on the display. Defaults to ``false``.
- **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
@@ -126,15 +134,23 @@ Configuration variables:
- ``SH1106 128x64``
- ``SH1106 96x16``
- ``SH1106 64x48``
+ - ``SSD1305 128x32``
+ - ``SSD1305 128x64``
- **cs_pin** (**Required**, :ref:`Pin Schema `): The Chip Select (CS) pin.
- **dc_pin** (**Required**, :ref:`Pin Schema `): The DC pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema `): The RESET pin. Defaults to not connected.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ``0°`` (default), ``90°``, ``180°``, ``270°``.
-- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
+- **contrast** (*Optional*, percentage): Set display contrast in %. Defaults to ``100%``.
+- **brightness** (*Optional*, percentage): Set display brightness in %. Only can be used with SSD1305. Defaults to ``100%``.
- **external_vcc** (*Optional*, boolean): Set this to true if you have the VCC pin connected to an external power supply.
Defaults to ``false``.
+- **flip_x** (*Optional*, boolean): Flip the horizontal axis on the screen. Defaults to ``true``.
+- **flip_y** (*Optional*, boolean): Flip the vertical axis on the screen. Defaults to ``true``.
+- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``0~15``. Defaults to ``0``.
+- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``0~15``. Defaults to ``0``.
+- **invert** (*Optional*, boolean): Invert all pixel state on the display. Defaults to ``false``.
- **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
@@ -149,4 +165,5 @@ See Also
- :doc:`index`
- :apiref:`ssd1306_base/ssd1306_base.h`
- `SSD1306 Library `__ by `Adafruit `__
+- `SSD1305 Library `__ by `Adafruit `__
- :ghedit:`Edit`
diff --git a/components/display/st7735.rst b/components/display/st7735.rst
index b82c6b1bd..39897a3ab 100644
--- a/components/display/st7735.rst
+++ b/components/display/st7735.rst
@@ -52,6 +52,7 @@ Configuration variables:
- **col_start** (**Required**, int): The starting column offset. Default value depends on **model**.
- **row_start** (**Required**, int): The starting row offset. Default value depends on **model**.
- **use_bgr** (*Optional*, "true/false"): Use BGR mode. Default is false.
+- **invert_colors** (*Optional*, "true/false"): Invert LCD colors. Default is false.
- **eight_bit_color** (*Optional*, "true/false" ): 8bit mode. Default is false. This saves 50% of the buffer required for the display.
- **reset_pin** (*Optional*, :ref:`Pin Schema `): The RESET pin.
diff --git a/components/display/waveshare_epaper.rst b/components/display/waveshare_epaper.rst
index 9929913c6..8f9d128bc 100644
--- a/components/display/waveshare_epaper.rst
+++ b/components/display/waveshare_epaper.rst
@@ -92,6 +92,7 @@ Configuration variables:
- ``4.20in-bV2`` (B/W rendering only)
- ``5.83in``
- ``7.50in``
+ - ``7.50in-bc`` (display with version sticker '(C)' on the back, B/W rendering only)
- ``7.50inV2`` (Can't use with an ESP8266 as it runs out of RAM)
- **busy_pin** (*Optional*, :ref:`Pin Schema `): The BUSY pin. Defaults to not connected.
diff --git a/components/esphome.rst b/components/esphome.rst
index bbbc4f08c..0217da043 100644
--- a/components/esphome.rst
+++ b/components/esphome.rst
@@ -276,6 +276,35 @@ This option behaves differently depending on what the included file is pointing
AND compiled into the binary. This way implementation of classes and functions in header files can
be provided.
+.. _preferences-flash_write_interval:
+
+Adjusting flash writes
+------------------------
+
+.. code-block:: yaml
+
+ # Example configuration entry
+ preferences:
+ flash_write_interval: 1min
+
+- **flash_write_interval** (*Optional*, :ref:`config-time`): Customize the frequency in which data is
+ flushed to the flash. This setting helps to prevent rapid changes to a component from being quickly
+ written to the flash and wearing it out. Defaults to ``1min``.
+
+As all devices have a limited number of flash write cycles, this setting helps to reduce the number of flash writes
+due to quickly changing components. In the past, when components such as ``light``, ``switch``, ``fan`` and ``globals``
+were changed, the state was immediately committed to flash. The result of this was that the last state of these
+components would always restore to its last state on power loss, however, this has the cost of potentially quickly
+damaging the flash if these components are quickly changed.
+
+A safety feature has thus been implemented to mitigate issues resulting from the limited number of flash write cycles,
+the state is first stored in memory before being flushed to flash after the ``flash_write_interval`` has passed. This
+results in fewer flash writes, preserving the flash health.
+
+This behavior can be disabled by setting ``flash_write_interval`` to ``0s`` to immediately commit the state to flash,
+however, be aware that this may lead to increased flash wearing and a shortened device lifespan!
+
+For ESP8266, :ref:`esphome-esp8266_restore_from_flash` must also be set to true for states to be written to flash.
.. _esphome-changing_node_name:
diff --git a/components/fan/hbridge.rst b/components/fan/hbridge.rst
index 5a5a051ba..f0f827748 100644
--- a/components/fan/hbridge.rst
+++ b/components/fan/hbridge.rst
@@ -5,7 +5,7 @@ H-bridge Fan
:description: Instructions for setting up hbridge controlled fans (or motors).
:image: fan.png
-The `'hbridge`' fan platform allows you to use a compatible `h-bridge` (L298N, DRV8871, MX1508, BTS7960, L9110S, DRV8833, TB6612, etc.) to control a fan (or motor).
+The `'hbridge`' fan platform allows you to use a compatible `h-bridge` (L298N, DRV8871, MX1508, BTS7960, L9110S, DRV8833, TB6612, etc.) to control a fan (or motor/solenoid).
.. figure:: images/L298N_module.jpg
:align: center
@@ -25,7 +25,7 @@ The `'hbridge`' fan platform allows you to use a compatible `h-bridge` (L298N, D
# Example configuration entry
fan:
- platform: hbridge
- output: my_output_1
+ id: my_fan
name: "Living Room Fan"
pin_a: motor_forward_pin
pin_b: motor_reverse_pin
@@ -39,9 +39,9 @@ Configuration variables:
:ref:`float output