From 93b4e4195f7f9f8eb9e32ed80cc61dcbe2db8682 Mon Sep 17 00:00:00 2001 From: Casey Olson Date: Mon, 17 May 2021 00:58:45 -0700 Subject: [PATCH 1/9] Update max frequency (#1172) Not sure if this is an issue with the docs, or the linter, but the linter throws an error at 1526: `value must be at most 1525.88` --- components/output/pca9685.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/output/pca9685.rst b/components/output/pca9685.rst index 123f48b95..2bd61347b 100644 --- a/components/output/pca9685.rst +++ b/components/output/pca9685.rst @@ -37,7 +37,7 @@ Configuration variables: - **frequency** (**Required**, float): The frequency to let the component drive all PWM outputs at. Must be in range from 24Hz to - 1526Hz. + 1525.88Hz. - **address** (*Optional*, int): The I²C address of the driver. Defaults to ``0x00``. - **id** (*Optional*, :ref:`config-id`): The id to use for From cd3ee44f9d2f0dbae9aff7121a8be330f7869fb3 Mon Sep 17 00:00:00 2001 From: meijerwynand Date: Mon, 17 May 2021 11:20:23 +0200 Subject: [PATCH 2/9] Update web-api id component (#1168) --- web-api/index.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web-api/index.rst b/web-api/index.rst index a19bbd751..5ffe618af 100644 --- a/web-api/index.rst +++ b/web-api/index.rst @@ -63,7 +63,10 @@ There's also a simple REST API available which can be used to get and set the cu calls to this API follow the URL schema ``//[/?=]``. The ``domain`` is the type of the component, for example ``sensor`` or ``light``. ``id`` refers to the id of the component - this ID is created by taking the name of the component, stripping out -all non-alphanumeric characters, making everything lowercase and replacing all spaces by underscores. +all non-alphanumeric characters, making everything lowercase and replacing all spaces by underscores. +To confirm the ```` to use, you can set the :ref:`log level ` +to ``VERY_VERBOSE`` and check the ``object_id:`` in the logs. + By creating a simple GET request for a URL of the form ``//`` you will get a JSON payload describing the current state of the component. This payload is equivalent to the ones sent by the From d556c60e3fc37dced59d3896be5c3d3475c6fc3c Mon Sep 17 00:00:00 2001 From: Martin <25747549+martgras@users.noreply.github.com> Date: Mon, 17 May 2021 14:19:31 +0200 Subject: [PATCH 3/9] Fix docker build failure (#1179) * Fix docker build failure Fix the docker build error from https://github.com/esphome/issues/issues/2041 * Switch from ubuntu to python-slim Using python:slim instead of python reduces the image size from ~1.1 GB to 410MB --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0cc95621a..df93220a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,18 @@ -FROM ubuntu:xenial +FROM python:slim RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-pygments \ git \ make \ doxygen \ openssh-client \ software-properties-common \ - && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* + && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* RUN pip3 install --no-cache-dir --no-binary :all: \ sphinx EXPOSE 8000 -WORKDIR /data/esphome-docs +WORKDIR /data/esphomedocs CMD ["make", "webserver"] From d2afdce3ac3c27f5fd6a3118b99f912f30ca55c2 Mon Sep 17 00:00:00 2001 From: workingmanrob Date: Mon, 17 May 2021 10:13:26 -0400 Subject: [PATCH 4/9] Update ifan02 example with new fan speed options (#1177) --- cookbook/ifan02.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/ifan02.rst b/cookbook/ifan02.rst index d07edb802..e1193d41a 100644 --- a/cookbook/ifan02.rst +++ b/cookbook/ifan02.rst @@ -158,7 +158,7 @@ Then you need to set it up with yaml. then: - fan.turn_on: id: ifan02_fan - speed: LOW + speed: 1 - if: condition: and: @@ -168,7 +168,7 @@ Then you need to set it up with yaml. then: - fan.turn_on: id: ifan02_fan - speed: MEDIUM + speed: 2 - if: condition: and: @@ -178,7 +178,7 @@ Then you need to set it up with yaml. then: - fan.turn_on: id: ifan02_fan - speed: HIGH + speed: 3 - switch.turn_off: update_fan_speed - platform: gpio @@ -197,6 +197,7 @@ Then you need to set it up with yaml. - platform: speed output: fanoutput id: ifan02_fan + speed_count: 3 name: "iFan02 Fan" See Also From 368564e6594e3bc0facf75be3e3493c58cdb8e11 Mon Sep 17 00:00:00 2001 From: Mike <63822202+xsnoopy@users.noreply.github.com> Date: Mon, 17 May 2021 10:13:49 -0400 Subject: [PATCH 5/9] Document missing use_address in Ethernet component (#1176) Co-authored-by: Franck Nijhof --- components/ethernet.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ethernet.rst b/components/ethernet.rst index 0d6b68bdf..bd4d3271f 100644 --- a/components/ethernet.rst +++ b/components/ethernet.rst @@ -53,7 +53,9 @@ Configuration variables: - **subnet** (**Required**, IPv4 address): The subnet of the local network. - **dns1** (*Optional*, IPv4 address): The main DNS server to use. - **dns2** (*Optional*, IPv4 address): The backup DNS server to use. - +- **use_address** (*Optional*, string): Manually override what address to use to connect + to the ESP. Defaults to auto-generated value. For example, if you have changed your + static IP and want to flash OTA to the previously configured IP address. - **domain** (*Optional*, string): Set the domain of the node hostname used for uploading. For example, if it's set to ``.local``, all uploads will be sent to ``.local``. Defaults to ``.local``. From 6d4f74e9e6d80c638215fb8250fba1a87e5b40b8 Mon Sep 17 00:00:00 2001 From: klenaers Date: Mon, 17 May 2021 17:02:25 +0200 Subject: [PATCH 6/9] Lambda over multiple lines. |- added (#1173) --- cookbook/bme280_environment.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cookbook/bme280_environment.rst b/cookbook/bme280_environment.rst index 9d939abea..d06805c74 100644 --- a/cookbook/bme280_environment.rst +++ b/cookbook/bme280_environment.rst @@ -56,9 +56,10 @@ After validating the sensor is working, we can proceed and add some formulas. unit_of_measurement: 'g/m³' - platform: template name: "Dew Point" - lambda: return (243.5*(log(id(bme280_humidity).state/100)+((17.67*id(bme280_temperature).state)/ - (243.5+id(bme280_temperature).state)))/(17.67-log(id(bme280_humidity).state/100)- - ((17.67*id(bme280_temperature).state)/(243.5+id(bme280_temperature).state)))); + lambda: |- + return (243.5*(log(id(bme280_humidity).state/100)+((17.67*id(bme280_temperature).state)/ + (243.5+id(bme280_temperature).state)))/(17.67-log(id(bme280_humidity).state/100)- + ((17.67*id(bme280_temperature).state)/(243.5+id(bme280_temperature).state)))); unit_of_measurement: °C icon: 'mdi:thermometer-alert' From 1b748284f6fd88bcaf2f0e33b71d966e68330b3e Mon Sep 17 00:00:00 2001 From: Karol Zlot Date: Mon, 17 May 2021 17:03:59 +0200 Subject: [PATCH 7/9] changed LG example to existing, working code (#1171) --- components/remote_transmitter.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/remote_transmitter.rst b/components/remote_transmitter.rst index 73d18d840..8f2529a4e 100644 --- a/components/remote_transmitter.rst +++ b/components/remote_transmitter.rst @@ -133,8 +133,8 @@ This :ref:`action ` sends an LG infrared remote code to a remote on_...: - remote_transmitter.transmit_lg: - data: 0x1234567 - nbits: 28 + data: 0x20DF10EF # power on/off + nbits: 32 Configuration variables: From 0eb2dc1fe2712ed454140f6b72a6214b8a987016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Panella?= Date: Mon, 17 May 2021 10:04:34 -0500 Subject: [PATCH 8/9] GPIO Switch: simplify Momentary Switch example (#1121) Simplify case and avoid the need to use a secondary template switch. Use `on_turn_on` directly to trigger the delay and turning off afterwards --- components/switch/gpio.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/switch/gpio.rst b/components/switch/gpio.rst index 359e228d3..40dcab8f9 100644 --- a/components/switch/gpio.rst +++ b/components/switch/gpio.rst @@ -63,7 +63,7 @@ Momentary Switch ---------------- To create momentary switches, for example switches that toggle a pin for a moment, you can use -:doc:`template switches