From aecbda72ddab09a48c88020cbfec06e81a3a54df Mon Sep 17 00:00:00 2001 From: Daniel <44697375+azrael783@users.noreply.github.com> Date: Mon, 19 Jul 2021 10:04:10 +0200 Subject: [PATCH 1/7] Corrected value for "inverted" (#1309) * Corrected value for "inverted" According to the pin schema the value for "inverted" should be true or false, but not yes. * Tweak Co-authored-by: Franck Nijhof --- components/switch/gpio.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/switch/gpio.rst b/components/switch/gpio.rst index 4b404fd34..e9b0c8291 100644 --- a/components/switch/gpio.rst +++ b/components/switch/gpio.rst @@ -59,7 +59,7 @@ To create an active-low switch (one that is turned off by default), use the :ref - platform: gpio pin: number: 25 - inverted: yes + inverted: true Momentary Switch ---------------- From 55db2d535c9ebcabaf589652c9952edbce9a7734 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Mon, 19 Jul 2021 19:49:52 +0200 Subject: [PATCH 2/7] Document the cover REST calls (#1195) Co-authored-by: Franck Nijhof --- web-api/index.rst | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/web-api/index.rst b/web-api/index.rst index 5ffe618af..e09e4d538 100644 --- a/web-api/index.rst +++ b/web-api/index.rst @@ -6,7 +6,7 @@ Web Server API :image: espeasy.png Since version 1.3, ESPHome includes a built-in web server that can be used to view states -and send commands. In addition to visible the web-frontend available under the root index of the +and send commands. In addition to the web-frontend available under the root index of the web server, there's also two other features the web server currently offers: A real time event source and REST API. @@ -213,3 +213,39 @@ and ``/fan//toggle``. Turn on additionally supports these optional parameter - **speed_level**: The new speed level of the fan. Values as above. - **oscillation**: The new oscillation setting of the fan. Values as above. + +Cover +***** + +Covers are again similar to switches whose two possible states are ``OPEN`` and ``CLOSED``. They +can however be in an intermediate position, anywhere between **0.0** (fully closed) to **1.0** +(fully open). They usually take some time to move from one position to another and can also be +stopped midway. An example GET request for ``/cover/front_window_blinds`` might return: + +.. code-block:: json + + { + "id": "cover-front_window_blinds", + "state": "OPEN", + "value": 0.8, + "current_operation": "IDLE", + "tilt": 0.5 + } + +- **id**: The ID of the cover, prefixed with ``cover-``. +- **state**: ``OPEN`` or ``CLOSED``. Any position other than 0.0 is considered open. +- **value**: Current cover position as a float number. +- **current_operation**: ``OPENING``, ``CLOSING`` or ``IDLE``. +- **tilt**: (only if supported by this cover component) tilt angle from 0.0 to 1.0. + +POST requests on the other hand allow performing actions on the cover, the available +methods being ``open``, ``close``, ``stop`` and ``set``. The following parameters +can be used: + +- **position**: The target position for a ``set`` call. The ``open`` method implies + a target position of 1.0, ``close`` implies a target position of 0.0. +- **tilt**: The tilt angle to set, if supported. + +Creating a POST request to ``/cover/front_window_blinds/set?position=0.1&tilt=0.3`` will +start moving the blinds towards an almost completely closed position and a new tilt +angle. From dfa8d0a505930c92759c280d3c1238c84efc66c0 Mon Sep 17 00:00:00 2001 From: Stanislav Meduna Date: Mon, 19 Jul 2021 20:08:34 +0200 Subject: [PATCH 3/7] Add the documentation for the on_page_change display trigger (#1097) Co-authored-by: Guillermo Ruffino --- components/display/index.rst | 20 ++++++++++++++++++++ guides/automations.rst | 1 + 2 files changed, 21 insertions(+) diff --git a/components/display/index.rst b/components/display/index.rst index 41f925402..a3264dfd1 100644 --- a/components/display/index.rst +++ b/components/display/index.rst @@ -573,7 +573,27 @@ You can then switch between these with three different actions: then: ... +.. _display-on_page_change-trigger: +**on_page_change**: This automation will be triggered when the page that is shown changes. + +.. code-block:: yaml + + display: + - platform: ... + # ... + on_page_change: + - from: page1 + to: page2 + then: + lambda: |- + ESP_LOGD("display", "Page changed from 1 to 2"); + +- **from** (*Optional*, :ref:`config-id`): A page id. If set the automation is only triggered if changing from this page. Defaults to all pages. +- **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/guides/automations.rst b/guides/automations.rst index bf94a8962..473c737ce 100644 --- a/guides/automations.rst +++ b/guides/automations.rst @@ -334,6 +334,7 @@ All Triggers - :ref:`switch.on_turn_on/off ` - :ref:`sim800l.on_sms_received ` - :ref:`rf_bridge.on_code_received ` +- :ref:`display.on_page_change ` All Actions ----------- From 195cb77e834d1eb5a71afd59394233cea5fd5d0c Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 20 Jul 2021 08:22:56 +1200 Subject: [PATCH 4/7] Add initial_value to template number (#1314) --- components/number/template.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/number/template.rst b/components/number/template.rst index 7c4b4d846..ac6ec9a20 100644 --- a/components/number/template.rst +++ b/components/number/template.rst @@ -34,7 +34,9 @@ Configuration variables: number. Defaults to ``60s``. - **optimistic** (*Optional*, boolean): Whether to operate in optimistic mode - when in this mode, any command sent to the template number will immediately update the reported state. - Defaults to ``false``. + Defaults to ``false``. Cannot be used with ``lambda``. +- **initial_value** (*Optional*, float): The value to use if no ``lambda`` is used or no value + stored in RTC/flash at setup time. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - All other options from :ref:`Sensor `. From a1c2bb163cafd2abe1324eae0bdc13c415874ec9 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 20 Jul 2021 10:28:25 +1200 Subject: [PATCH 5/7] Bump version to v1.20.0b4 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index 6be47200c..bcea34505 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 = 1.20.0b3 +PROJECT_NUMBER = 1.20.0b4 # 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 d0abc81a9..aee29c15a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = v1.20.0b3 +ESPHOME_REF = v1.20.0b4 .PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png diff --git a/_static/version b/_static/version index d4293facc..2591498d3 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -1.20.0b3 \ No newline at end of file +1.20.0b4 \ No newline at end of file diff --git a/conf.py b/conf.py index 329d539c6..5ad1580ce 100644 --- a/conf.py +++ b/conf.py @@ -69,7 +69,7 @@ author = "Otto Winter" # The short X.Y version. version = "1.20" # The full version, including alpha/beta/rc tags. -release = "1.20.0b3" +release = "1.20.0b4" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From a198e86c21348829ab7db02caac7314fe817b21b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 20 Jul 2021 10:29:31 +1200 Subject: [PATCH 6/7] Update changelog for 1.20.0b4 --- changelog/v1.20.0.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog/v1.20.0.rst b/changelog/v1.20.0.rst index 59b3df3e1..09bb3a067 100644 --- a/changelog/v1.20.0.rst +++ b/changelog/v1.20.0.rst @@ -42,7 +42,7 @@ Unfortunately, some breaking changes had to be made: white channel being set to 30%, as expected. Full list of changes --------------------- +--------------------s New Features ^^^^^^^^^^^^ @@ -81,6 +81,7 @@ Beta fixes - GH Actions CI use GHCR :esphomepr:`2027` by :ghuser:`OttoWinter` - Dashboard disable assets caching :esphomepr:`2025` by :ghuser:`OttoWinter` - Improve external components error messages :esphomepr:`2026` by :ghuser:`OttoWinter` +- Number and Template Number updates :esphomepr:`2036` by :ghuser:`jesserockz` All changes ^^^^^^^^^^^ @@ -147,6 +148,7 @@ All changes - GH Actions CI use GHCR :esphomepr:`2027` by :ghuser:`OttoWinter` - Dashboard disable assets caching :esphomepr:`2025` by :ghuser:`OttoWinter` - Improve external components error messages :esphomepr:`2026` by :ghuser:`OttoWinter` +- Number and Template Number updates :esphomepr:`2036` by :ghuser:`jesserockz` Past Changelogs --------------- From ccdbb9d2ad16c6f253ffdd9e344972cadb9f0575 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 20 Jul 2021 10:29:45 +1200 Subject: [PATCH 7/7] Update supporters for 1.20.0b4 --- guides/supporters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index b0c73c958..01abe299a 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -608,4 +608,4 @@ Contributors - `San (@zhujunsan) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated July 19, 2021.* +*This page was last updated July 20, 2021.*