From 62faed82eeb31d1a8debcaeafe0e9471c3a7e3e1 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 14 Sep 2022 17:02:22 +1200 Subject: [PATCH 01/43] Bump version to 2022.10.0-dev --- Doxygen | 2 +- _static/version | 2 +- conf.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index 5ddb529a7..03b72da52 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 = 2022.9.0-dev +PROJECT_NUMBER = 2022.10.0-dev # 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/_static/version b/_static/version index 446fb1931..26257e6ba 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.9.0-dev \ No newline at end of file +2022.10.0-dev \ No newline at end of file diff --git a/conf.py b/conf.py index 4da200808..19fb5dd39 100644 --- a/conf.py +++ b/conf.py @@ -66,9 +66,9 @@ author = "ESPHome" # built documents. # # The short X.Y version. -version = "2022.9" +version = "2022.10" # The full version, including alpha/beta/rc tags. -release = "2022.9.0-dev" +release = "2022.10.0-dev" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From e9fc4a9086fc23252de1d6ad07717c420d28a960 Mon Sep 17 00:00:00 2001 From: Matus Ivanecky Date: Wed, 14 Sep 2022 21:43:13 +0200 Subject: [PATCH 02/43] Added docs for new SIM800L features (#2284) Co-authored-by: Guillermo Ruffino --- components/sim800l.rst | 207 ++++++++++++++++++++++++++++++----------- 1 file changed, 154 insertions(+), 53 deletions(-) diff --git a/components/sim800l.rst b/components/sim800l.rst index 5cea41c1c..58b7f0a17 100644 --- a/components/sim800l.rst +++ b/components/sim800l.rst @@ -9,10 +9,11 @@ Sim800L Component Component/Hub ------------- -The ``SIM800L`` Component provides the ability to dial, send and receive SMS text messages. The device must be -connected via a :doc:`UART bus ` supporting both receiving and transmitting line. -The UART bus must be configured at the same speed of the module which is by default 9600bps. -The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``. +The ``SIM800L`` Component provides the ability to dial, answer calls, send/receive SMS text messages and +send/receive USSD codes. The device must be connected via a :doc:`UART bus ` +supporting both receiving and transmitting line. The UART bus must be configured at the same speed +of the module which is by default 9600bps. The required connection wires are ``+VCC``, ``GND``, +``RX`` and ``TX``. .. warning:: @@ -43,16 +44,6 @@ The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``. format: "Received '%s' from %s" args: [ 'message.c_str()', 'sender.c_str()' ] - sensor: - - platform: sim800l - rssi: - name: "Sim800L RSSI" - - binary_sensor: - - platform: sim800l - registered: - name: "Sim800L Registered" - logger: baud_rate: 0 # disable uart logger on esp 8266 @@ -62,10 +53,25 @@ Configuration variables: - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **on_sms_received** (*Optional*, :ref:`Automation `): An action to be performed when an SMS is received. See :ref:`sim800l-on_sms_received`. +- **on_incoming_call** (*Optional*, :ref:`Automation `): An action to be + performed when a call is received. See :ref:`sim800l-on_incoming_call`. +- **on_call_connected** (*Optional*, :ref:`Automation `): An action to be + performed when a call is connected, either because an outgoing call accepted is + accepted or an incoming call answered. +- **on_call_disconnected** (*Optional*, :ref:`Automation `): An action to be + performed when a call is disconnected. + Sensor ------ +.. code-block:: yaml + + sensor: + - platform: sim800l + rssi: + name: "Sim800L RSSI" + Configuration variables: - **rssi** (*Optional*): The informed Received signal strength indication (RSSI) in dBm. @@ -78,6 +84,13 @@ Configuration variables: Binary Sensor ------------- +.. code-block:: yaml + + binary_sensor: + - platform: sim800l + registered: + name: "Sim800L Registered" + Configuration variables: - **registered** (*Optional*): Indicates if the SIM800L has successfully registered in the cellular network. @@ -103,6 +116,42 @@ under the variables named ``message`` and ``sender`` respectively. id(sms_sender).publish_state(sender); id(sms_message).publish_state(message); +.. _sim800l-on_incoming_call: + +``on_incoming_call`` Trigger +---------------------------- + +This automation triggers every time the SIM800L sends a RING / Caller ID message, this message +is sent several times per call, presumably every time the phone "RINGs". The automation provides +a ``caller_id`` string parameter which received information. The phone call is neither accepted +or rejected. + +.. code-block:: yaml + + on_incoming_call: + - logger.log: + format: "Incoming call from '%s'" + args: ["caller_id.c_str()"] + - lambda: |- + id(caller_id_text_sensor).publish_state(caller_id); + - sim800l.disconnect + - homeassistant.event: + event: esphome.incoming_call_event + data: + payload: !lambda 'return id(caller_id_text_sensor).state;' + + +``on_ussd_received`` Trigger +---------------------------- + +With this configuration option you can write complex automations whenever the ussd code from network +has been received. + +.. code-block:: yaml + + on_ussd_received: + + .. _sim800l-send_sms_action: @@ -134,18 +183,11 @@ Configuration options: - **message** (**Required**, string, :ref:`templatable `): The message content. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the SIM800L if you have multiple components. -.. note:: - - This action can also be written in :ref:`lambdas `: - - .. code-block:: cpp - - id(sim800l1).send_sms("+15551234567", "The message content"); .. _sim800l-dial_action: ``sim800l.dial`` Action ---------------------------- +----------------------- Dial to a phone recipient using this action in automations. @@ -161,13 +203,41 @@ Configuration options: - **recipient** (**Required**, string, :ref:`templatable `): The number to dial. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the SIM800L if you have multiple components. -.. note:: - This action can also be written in :ref:`lambdas `: +``sim800l.connect`` Action +-------------------------- - .. code-block:: cpp +Answers an incoming call. - id(sim800l1).dial("+15551234567"); +.. code-block:: yaml + + on_...: + then: + - sim800l.connect + + +``sim800l.disconnect`` Action +----------------------------- + +Disconnects a call, either dialed in or received. + +.. code-block:: yaml + + on_...: + then: + - sim800l.disconnect + + +``sim800l.send_ussd`` Action +---------------------------- + +Sends a ussd code to the network. + +.. code-block:: yaml + + on_...: + then: + - sim800l.send_ussd Getting started with Home Assistant @@ -180,28 +250,46 @@ on Home Assistant and will also setup a service so you can send messages and dia api: services: - - service: send_sms - variables: - recipient: string - message: string - then: - - sim800l.send_sms: - recipient: !lambda 'return recipient;' - message: !lambda 'return message;' - - service: dial - variables: - recipient: string - then: - - sim800l.dial: - recipient: !lambda 'return recipient;' + - service: send_sms + variables: + recipient: string + message: string + then: + - sim800l.send_sms: + recipient: !lambda 'return recipient;' + message: !lambda 'return message;' + - service: dial + variables: + recipient: string + then: + - sim800l.dial: + recipient: !lambda 'return recipient;' + - service: connect + then: + - sim800l.connect + - service: disconnect + then: + - sim800l.disconnect + - service: send_ussd + variables: + ussdCode: string + then: + - sim800l.send_ussd: + ussd: !lambda 'return ussdCode;' text_sensor: - - platform: template - id: sms_sender - name: "Sms Sender" - - platform: template - id: sms_message - name: "Sms Message" + - platform: template + id: sms_sender + name: "Sms Sender" + - platform: template + id: sms_message + name: "Sms Message" + - platform: template + id: caller_id_text_sensor + name: "Caller ID" + - platform: template + id: ussd_message + name: "Ussd Code" uart: baud_rate: 9600 @@ -210,9 +298,22 @@ on Home Assistant and will also setup a service so you can send messages and dia sim800l: on_sms_received: - - lambda: |- - id(sms_sender).publish_state(sender); - id(sms_message).publish_state(message); + - lambda: |- + id(sms_sender).publish_state(sender); + id(sms_message).publish_state(message); + on_incoming_call: + - lambda: |- + id(caller_id_text_sensor).publish_state(caller_id); + on_call_connected: + - logger.log: + format: Call connected + on_call_disconnected: + - logger.log: + format: Call disconnected + on_ussd_received: + - lambda: |- + id(ussd_message).publish_state(ussd); + Now your latest received SMS and sender number will be displayed by the text sensors. @@ -238,10 +339,10 @@ Relay management commands received from an authorized sender: sim800l: on_sms_received: - - lambda: |- - if ( (id(sms_sender).state == "+79991234567") && ( (id(sms_message).state == "relay_1_on") OR (id(sms_message).state == "Relay_1_on") ) ) { - id(relay_1).turn_on(); - } + - lambda: |- + if ( (id(sms_sender).state == "+79991234567") && ( (id(sms_message).state == "relay_1_on") OR (id(sms_message).state == "Relay_1_on") ) ) { + id(relay_1).turn_on(); + } switch: - platform: gpio id: relay_1 From 6873e425d4cb727c84a036cb541bf8a962b923e3 Mon Sep 17 00:00:00 2001 From: Michael Davidson Date: Mon, 26 Sep 2022 12:59:08 +1000 Subject: [PATCH 03/43] Remove deprecated settings and document new default_preset (#2292) * Remove deprecated settings and document new default_preset * Lint fixes * More lint fixes * Index note * Fix incorrect plural --- components/climate/thermostat.rst | 135 +++++++++++++++++------------- 1 file changed, 76 insertions(+), 59 deletions(-) diff --git a/components/climate/thermostat.rst b/components/climate/thermostat.rst index 66e62fa8b..322a0837c 100644 --- a/components/climate/thermostat.rst +++ b/components/climate/thermostat.rst @@ -52,8 +52,6 @@ modes that Home Assistant offers. - platform: thermostat name: "Thermostat Climate Controller" sensor: my_temperature_sensor - default_target_temperature_low: 20 °C - default_target_temperature_high: 22 °C min_cooling_off_time: 300s min_cooling_run_time: 300s min_heating_off_time: 300s @@ -66,6 +64,11 @@ modes that Home Assistant offers. idle_action: - switch.turn_off: air_cond - switch.turn_off: heater + default_preset: Home + preset: + - name: Home + default_target_temperature_low: 20 °C + default_target_temperature_high: 22 °C .. code-block:: yaml @@ -74,7 +77,6 @@ modes that Home Assistant offers. - platform: thermostat name: "Thermostat Climate Controller" sensor: my_temperature_sensor - default_target_temperature_low: 20 °C min_heating_off_time: 300s min_heating_run_time: 300s min_idle_time: 30s @@ -82,6 +84,11 @@ modes that Home Assistant offers. - switch.turn_on: heater idle_action: - switch.turn_off: heater + default_preset: Home + preset: + - name: Home + default_target_temperature_low: 20 °C + .. code-block:: yaml @@ -90,7 +97,6 @@ modes that Home Assistant offers. - platform: thermostat name: "Thermostat Climate Controller" sensor: my_temperature_sensor - default_target_temperature_high: 22 °C min_cooling_off_time: 300s min_cooling_run_time: 300s min_idle_time: 30s @@ -98,6 +104,11 @@ modes that Home Assistant offers. - switch.turn_on: air_cond idle_action: - switch.turn_off: air_cond + default_preset: Home + preset: + - name: Home + default_target_temperature_high: 22 °C + Controller Behavior and Hysteresis @@ -158,45 +169,6 @@ The thermostat controller uses the sensor to determine whether it should heat or - **sensor** (**Required**, :ref:`config-id`): The sensor that is used to measure the current temperature. -Default Target Temperatures and Mode -************************************ - -These configuration items determine default values the thermostat controller should use when it starts. - -- **default_mode** (*Optional*, *Deprecated*, climate mode): The default climate mode the controller should - use if it is unable to restore it from memory. One of: - - - ``off`` (default) - - ``heat_cool`` - - ``cool`` - - ``heat`` - - ``dry`` - - ``fan_only`` - - ``auto`` - -This value is used the first time your device starts after ESPHome is initially installed onto it. Add -this option into your configuration if you want your thermostat component to start in a climate mode other -than ``off``. If this option is not configured, you'll need to manually change the climate mode later via -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 - 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 - 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`` -**must be specified.** - -.. 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 ` which allows 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`. - Heating and Cooling Actions *************************** @@ -315,22 +287,6 @@ Set Point Options/Behavior - **supplemental_heating_delta** (*Required with* ``supplemental_heating_action``, float): When the temperature difference between the lower set point and the current temperature exceeds this value, ``supplemental_heating_action`` will be called immediately. -- **away_config** (*Optional*, *Deprecated*): Additionally specify target temperature range settings for away mode. - Away mode can be used to have a second set of target temperatures (for example, while the user is - away or sleeping/at night). - - - **default_target_temperature_low** (*Optional*, float): The default low target temperature for the control - algorithm when Away mode is selected. This can be dynamically set in the frontend later. - - **default_target_temperature_high** (*Optional*, float): The default high target temperature for the control - algorithm when Away mode is selected. This can be dynamically set in the frontend later. - -**If configured, at least one of** ``default_target_temperature_low`` **and** ``default_target_temperature_high`` -**must be specified in the away mode configuration.** - -.. note:: - - **away_config** is deprecated and will be removed in a future release. You should migrate your configuration - to using a :ref:`preset ` which allows for more flexibility and customisation .. _thermostat-preset: @@ -422,6 +378,67 @@ experience and automation. preset_change: - logger.log: Preset has been changed! +Default Preset +************** + +These configuration items determine default values the thermostat controller should use when it starts. + +- **default_preset** (*Optional*, string): The name of the preset to use by default. Must match a preset + as per :ref:`preset `. +- **on_boot_restore_from**: (*Optional*, on_boot_restore_from): Controls what the thermostat will do when + it first boots. One of: + + - ``memory`` (default): The thermostat will restore any settings from last time it was running. + - ``default_preset``: The thermostat will always switch to the preset specified by **default_preset** + +.. note:: + + You can specify a ``default_preset`` and set ``on_boot_restore_from`` to ``memory``. In this mode when + the settings from last boot cannot be retrieved, for any reason, then the specified ``default_preset`` + will be applied. + +.. code-block:: yaml + + # This climate controller, on first boot, will switch to "My Startup Preset". Subsequent boots would + # restore to whatever mode it was in prior to the reboot + climate: + - platform: thermostat + name: "From Memory Thermostat" + default_preset: My Startup Preset + on_boot_restore_from: memory + preset: + - name: My Startup Preset + default_target_temperature_low: 17 + default_target_temperature_high: 26 + fan_mode: OFF + swing_mode: OFF + mode: OFF + # Custom preset + - name: A custom preset + default_target_temperature_low: 21 + default_target_temperature_high: 23 + fan_mode: HIGH + mode: HEAT_COOL + + # This climate controller will always switch to "Every Start Preset" + climate: + - platform: thermostat + name: "Default Preset Thermostat" + default_preset: Every Start Preset + on_boot_restore_from: default_preset + preset: + - name: Every Start Preset + default_target_temperature_low: 17 + default_target_temperature_high: 26 + fan_mode: OFF + swing_mode: OFF + mode: OFF + # Custom preset + - name: A custom preset + default_target_temperature_low: 21 + default_target_temperature_high: 23 + fan_mode: HIGH + mode: HEAT_COOL Additional Actions/Behavior *************************** From d08cbe45234ec24439ffb31d098ed53324d57565 Mon Sep 17 00:00:00 2001 From: Michael Haas Date: Sat, 1 Oct 2022 08:14:32 +0200 Subject: [PATCH 04/43] Fix typo --- components/display/max7219digit.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/display/max7219digit.rst b/components/display/max7219digit.rst index 7c3370f65..dd4db5f13 100644 --- a/components/display/max7219digit.rst +++ b/components/display/max7219digit.rst @@ -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 From 946211c10ada717bc90b7731490bcb5774f0facb Mon Sep 17 00:00:00 2001 From: ShellAddicted Date: Wed, 5 Oct 2022 03:31:15 +0200 Subject: [PATCH 05/43] mqtt: MbedTLS doesn't like wildcard certificates (#2336) --- components/mqtt.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/components/mqtt.rst b/components/mqtt.rst index fab2d1529..03468b841 100644 --- a/components/mqtt.rst +++ b/components/mqtt.rst @@ -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: | From 86829a7eeb591cba52f30019dea697545163710d Mon Sep 17 00:00:00 2001 From: Patrick ZAJDA Date: Wed, 5 Oct 2022 03:31:51 +0200 Subject: [PATCH 06/43] Add id and teleinfo_id to teleinfo configuration variables (#2340) --- components/sensor/teleinfo.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/sensor/teleinfo.rst b/components/sensor/teleinfo.rst index 28d56e6cb..c601a44c5 100644 --- a/components/sensor/teleinfo.rst +++ b/components/sensor/teleinfo.rst @@ -107,10 +107,13 @@ In teleinfo platform: - **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component ` 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 `. @@ -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 `. From efcbf7174de4cc9243f4306d6ac6bf4c85352ca2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 15:42:14 +1300 Subject: [PATCH 07/43] Bump actions/checkout from 3.0.2 to 3.1.0 (#2341) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker.yml | 2 +- .github/workflows/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5224afbe5..daa239940 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Checkout source code - uses: actions/checkout@v3.0.2 + uses: actions/checkout@v3.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c9431c34c..ac9abb35e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.0.2 + - uses: actions/checkout@v3.1.0 - name: Set up Python 3.8 uses: actions/setup-python@v4 with: From 9d18aa67a44027f6929e2fef2461ec4f97ac70d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Oct 2022 15:42:39 +1300 Subject: [PATCH 08/43] Bump actions/stale from 5 to 6 (#2315) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 65c990cf3..7fbfe33a3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -16,7 +16,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v5 + - 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@v5 + - uses: actions/stale@v6 with: days-before-pr-stale: -1 days-before-pr-close: -1 From 11558249ee39e6a3e95dfa0c757bcb25c4dc2ff9 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:31:24 +1300 Subject: [PATCH 09/43] Add min_version docs (#2342) --- components/esphome.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/components/esphome.rst b/components/esphome.rst index d96877639..8b1cce9eb 100644 --- a/components/esphome.rst +++ b/components/esphome.rst @@ -50,6 +50,8 @@ Advanced options: - **name** (**Required**, string): Name of the project - **version** (**Required**, string): Version of the project +- **min_version** (*Optional*, string): The minimum ESPHome version required to compile this configuration. + See :ref:`esphome-min_version`. Old-style platform options, which have been moved to the platform-specific :doc:`esp32 ` and :doc:`esp8266 ` sections but are still accepted here for compatibility reasons (usage not @@ -129,11 +131,11 @@ too many WiFi/MQTT connection attempts, Over-The-Air updates being applied or th 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**. + 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. + 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 `. .. _esphome-on_loop: @@ -337,6 +339,14 @@ should be ``author_name.project_name``. name: "jesse.leds_party" version: "1.0.0" +.. _esphome-min_version: + +Minimum ESPHome version +----------------------- + +This allows YAML files to specify the minimum version of ESPHome required to compile. +This is useful in the case of packages where a published package might use features only +available in a newer version of ESPHome. This allows for a more friendly error message. See Also -------- From ba2210f994e1ec6560886c7117f14fbc2dad0c76 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:17:47 +1300 Subject: [PATCH 10/43] Active connection config for bluetooth_proxy (#2345) --- components/bluetooth_proxy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bluetooth_proxy.rst b/components/bluetooth_proxy.rst index 7eab63a75..3e5bb8b44 100644 --- a/components/bluetooth_proxy.rst +++ b/components/bluetooth_proxy.rst @@ -34,7 +34,7 @@ Configuration: bluetooth_proxy: -No configuration variables. +- **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``. Requires Home Assistant 2022.10 or later. See Also -------- From 6ed0330463daea68a9d0362ca5bf0bff5a386909 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:17:47 +1300 Subject: [PATCH 11/43] Active connection config for bluetooth_proxy (#2345) --- components/bluetooth_proxy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bluetooth_proxy.rst b/components/bluetooth_proxy.rst index 7eab63a75..3e5bb8b44 100644 --- a/components/bluetooth_proxy.rst +++ b/components/bluetooth_proxy.rst @@ -34,7 +34,7 @@ Configuration: bluetooth_proxy: -No configuration variables. +- **active** (*Optional*, boolean): Enables proxying active connections. Defaults to ``false``. Requires Home Assistant 2022.10 or later. See Also -------- From 0f5e6173dfad11977e3fe341bfd5727abab29d57 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:22:04 +1300 Subject: [PATCH 12/43] Bump version to 2022.9.3 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index ad4eec867..6ffc42b4e 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 = 2022.9.2 +PROJECT_NUMBER = 2022.9.3 # 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 5cf191459..f33f58911 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2022.9.2 +ESPHOME_REF = 2022.9.3 .PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify diff --git a/_static/version b/_static/version index 115c3bdfe..6cfd5aff8 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.9.2 \ No newline at end of file +2022.9.3 \ No newline at end of file diff --git a/conf.py b/conf.py index aa806744b..d3879b685 100644 --- a/conf.py +++ b/conf.py @@ -68,7 +68,7 @@ author = "ESPHome" # The short X.Y version. version = "2022.9" # The full version, including alpha/beta/rc tags. -release = "2022.9.2" +release = "2022.9.3" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 61e20c751e34a9d529fd764057f6f27d55239b1b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:25:11 +1300 Subject: [PATCH 13/43] Update changelog for 2022.9.3 --- changelog/2022.9.0.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/changelog/2022.9.0.rst b/changelog/2022.9.0.rst index 02480c5c1..c148f816a 100644 --- a/changelog/2022.9.0.rst +++ b/changelog/2022.9.0.rst @@ -36,6 +36,12 @@ A new Factory Reset switch and button has been added this release, allowing rese 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 ------------------------------- @@ -46,6 +52,11 @@ 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` + Full list of changes -------------------- From f9417ed0195acda6e78cc6461e20de56c27d508b Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 6 Oct 2022 09:25:47 +1300 Subject: [PATCH 14/43] Update supporters for 2022.9.3 --- guides/supporters.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index a08d89c08..f88577d73 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -129,7 +129,6 @@ Contributors - `Mauricio Bonani (@bonanitech) `__ - `Casey Olson (@bookcasey) `__ - `BoukeHaarsma23 (@BoukeHaarsma23) `__ -- `Patrik Hermansson (@bphermansson) `__ - `brambo123 (@brambo123) `__ - `Bram Kragten (@bramkragten) `__ - `Brad Davidson (@brandond) `__ @@ -578,6 +577,7 @@ Contributors - `Marco Lusini (@met67) `__ - `Martin Flasskamp (@MFlasskamp) `__ - `Michael Gorven (@mgorven) `__ +- `Michael Haas (@mhaas) `__ - `Michaël Arnauts (@michaelarnauts) `__ - `Micha Nordmann (@Michanord) `__ - `Midbin (@Midbin) `__ @@ -617,6 +617,7 @@ Contributors - `H. Árkosi Róbert (@nagyrobi) `__ - `Viktor Nagy (@nagyv) `__ - `Oskar Napieraj (@napieraj) `__ +- `Patrick ZAJDA (@Nardol) `__ - `Nate Lust (@natelust) `__ - `ueno (@nayuta-ueno) `__ - `Nazar Mokrynskyi (@nazar-pc) `__ @@ -771,7 +772,6 @@ Contributors - `Spegs21 (@Spegs21) `__ - `Stephan Peijnik-Steinwender (@speijnik) `__ - `Eric Lind (@sperly) `__ -- `Paul Krischer (@SqyD) `__ - `Samuel Sieb (@ssieb) `__ - `Stefan Staub (@sstaub) `__ - `St4n (@St4n) `__ @@ -840,6 +840,7 @@ Contributors - `Gediminas Šaltenis (@trylika) `__ - `Tuan (@tuanpmt) `__ - `tubalainen (@tubalainen) `__ +- `tube0013 (@tube0013) `__ - `Alexey Vlasov (@turbulator) `__ - `Seppel Hardt (@tuxBurner) `__ - `TVDLoewe (@TVDLoewe) `__ @@ -897,4 +898,4 @@ Contributors - `Zack Barett (@zsarnett) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated September 29, 2022.* +*This page was last updated October 6, 2022.* From b86e35a4b80d20705fd96a4c6527d96d778a881c Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:34:40 +1300 Subject: [PATCH 15/43] Bump version to 2022.9.4 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index 6ffc42b4e..2adbb8086 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 = 2022.9.3 +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 diff --git a/Makefile b/Makefile index f33f58911..e0b0f8e33 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2022.9.3 +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 diff --git a/_static/version b/_static/version index 6cfd5aff8..a5c715fbc 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.9.3 \ No newline at end of file +2022.9.4 \ No newline at end of file diff --git a/conf.py b/conf.py index d3879b685..f459985ab 100644 --- a/conf.py +++ b/conf.py @@ -68,7 +68,7 @@ author = "ESPHome" # The short X.Y version. version = "2022.9" # The full version, including alpha/beta/rc tags. -release = "2022.9.3" +release = "2022.9.4" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 747c527833b51996330eaa64beb1d910ab2a5a65 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:35:03 +1300 Subject: [PATCH 16/43] Update changelog for 2022.9.4 --- changelog/2022.9.0.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog/2022.9.0.rst b/changelog/2022.9.0.rst index c148f816a..79edc788f 100644 --- a/changelog/2022.9.0.rst +++ b/changelog/2022.9.0.rst @@ -57,6 +57,13 @@ 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 -------------------- From 1986a9e26fbdf72d16bcc1ebe794d39c95079bf7 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 7 Oct 2022 16:35:38 +1300 Subject: [PATCH 17/43] Update supporters for 2022.9.4 --- guides/supporters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index f88577d73..82b15e606 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -898,4 +898,4 @@ Contributors - `Zack Barett (@zsarnett) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated October 6, 2022.* +*This page was last updated October 7, 2022.* From e09caf5c8c85bc311f4b71bf7aa1516faa3dc5fa Mon Sep 17 00:00:00 2001 From: polgarc <29740673+polgarc@users.noreply.github.com> Date: Sun, 9 Oct 2022 23:38:44 +0200 Subject: [PATCH 18/43] Fix broken links --- components/sensor/sgp4x.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/sensor/sgp4x.rst b/components/sensor/sgp4x.rst index 8d49d2ff3..313a5cc3b 100644 --- a/components/sensor/sgp4x.rst +++ b/components/sensor/sgp4x.rst @@ -6,7 +6,7 @@ SGP40 Volatile Organic Compound Sensor and SGP41 VOC and NOx Sensor :image: sgp40.jpg The ``sgp4x`` sensor platform allows you to use your Sensirion SGP40 -(`datasheet `__) or SGP41 +(`datasheet `__) or SGP41 (`datasheet `__) with ESPHome. The type of sensor used is automatically detected. The :ref:`I²C Bus ` is required to be set up in your configuration for this sensor to work. @@ -41,7 +41,7 @@ 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 `__ + - **algorithm_tuning** (*Optional*): The VOC algorithm can be customized by tuning 6 different parameters. For more details see `Engineering Guidelines for SEN5x `__ - **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 @@ -57,7 +57,7 @@ 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 `__ + - **algorithm_tuning** (*Optional*): The NOx algorithm can be customized by tuning 5 different parameters.For more details see `Engineering Guidelines for SEN5x `__ - **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 From 90645afd579dc36cb1f43de43ac1c082a92ca9bd Mon Sep 17 00:00:00 2001 From: NP v/d Spek Date: Mon, 10 Oct 2022 23:10:27 +0200 Subject: [PATCH 19/43] Update xpt2046 documentation (#2259) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- _redirects | 1 + .../images/xpt2046-full.jpg | Bin components/touchscreen/index.rst | 2 +- .../xpt2046.rst | 116 +++--------------- 4 files changed, 20 insertions(+), 99 deletions(-) rename components/{binary_sensor => touchscreen}/images/xpt2046-full.jpg (100%) rename components/{binary_sensor => touchscreen}/xpt2046.rst (62%) diff --git a/_redirects b/_redirects index f6b61f081..7ed3fa34a 100644 --- a/_redirects +++ b/_redirects @@ -3,3 +3,4 @@ # Moved components # e.g: /components/sensors/abc.html /components/sensors/xyz.html 301 /components/sensor/sgp40.html /components/sensor/sgp4x.html 301 +/components/binary_sensor/xpt2046.html /components/touchscreen/xpt2046.html 301 diff --git a/components/binary_sensor/images/xpt2046-full.jpg b/components/touchscreen/images/xpt2046-full.jpg similarity index 100% rename from components/binary_sensor/images/xpt2046-full.jpg rename to components/touchscreen/images/xpt2046-full.jpg diff --git a/components/touchscreen/index.rst b/components/touchscreen/index.rst index 4949cbdd0..5efa2da00 100644 --- a/components/touchscreen/index.rst +++ b/components/touchscreen/index.rst @@ -80,7 +80,7 @@ See Also - :ref:`Binary Sensor Filters ` - :doc:`Inkplate 6 Plus ` - :doc:`EKTF2232 ` -- :doc:`XPT2046 ` +- :doc:`XPT2046 ` - :apiref:`touchscreen/touchscreen.h` - :apiref:`touchscreen/binary_sensor/touchscreen_binary_sensor.h` - :ghedit:`Edit` diff --git a/components/binary_sensor/xpt2046.rst b/components/touchscreen/xpt2046.rst similarity index 62% rename from components/binary_sensor/xpt2046.rst rename to components/touchscreen/xpt2046.rst index 82fc5a3b1..44b15f296 100644 --- a/components/binary_sensor/xpt2046.rst +++ b/components/touchscreen/xpt2046.rst @@ -1,5 +1,5 @@ -XPT2046 Touch Screen Controller -================================== +XPT2046 Touch Screen Controller (Updated version) +================================================== .. seo:: :description: Instructions for setting up XPT2046 touch screen controller with ESPHome @@ -8,10 +8,7 @@ XPT2046 Touch Screen Controller .. _xpt2046-component: -Component/Hub -------------- - -The ``xpt2046`` component allows using the touch screen controllers +The ``xpt2046`` touchscreen platform allows using the touch screen controllers based on the XPT2046 chip (`datasheet `__, `AZ-Delivery`_) with ESPHome. Many cheap LCD displays contain this controller. @@ -28,32 +25,20 @@ The :ref:`SPI ` is required to be set up in your configuration for this sen .. code-block:: yaml # Example configuration entry - xpt2046: + touchscreen: + platform: xpt2046 id: touchscreen cs_pin: 17 - irq_pin: 16 + interupt_pin: 16 update_interval: 50ms report_interval: 1s threshold: 400 - dimension_x: 240 - dimension_y: 320 calibration_x_min: 3860 calibration_x_max: 280 calibration_y_min: 340 calibration_y_max: 3860 swap_x_y: false - binary_sensor: - - platform: xpt2046 - xpt2046_id: touchscreen - id: touch_key0 - x_min: 80 - x_max: 160 - y_min: 106 - y_max: 212 - on_state: - - lambda: 'ESP_LOGI("main", "key0: %s", (x ? "touch" : "release"));' - Configuration variables: ------------------------ @@ -66,12 +51,12 @@ Base Configuration: - **cs_pin** (*Optional*, :ref:`Pin Schema `): The chip select pin. Often marked ``T_CS`` on the board. -- **irq_pin** (*Optional*, :ref:`Pin Schema `): The touch detection pin. +- **interupt_pin** (*Optional*, :ref:`Pin Schema `): The touch detection pin. Often marked ``T_IRQ`` on the board. If not specified the component will use polling - via SPI. + via SPI. This key is renamed from **irq_pin** - **update_interval** (*Optional*, :ref:`config-time`): The interval to check the - sensor. If ``irq_pin`` is specified the touch will be detected nearly instantaneously and this setting + sensor. If ``interupt_pin`` is specified the touch will be detected nearly instantaneously and this setting will be used only for the release detection. Defaults to ``50ms``. - **report_interval** (*Optional*, :ref:`config-time`): The interval to periodically @@ -79,12 +64,6 @@ Base Configuration: - **threshold** (*Optional*, int): The value to detect the touch or release. Defaults to ``400``. -- **dimension_x** (*Optional*, int): The dimension of the display in the horizontal - direction. Usually in pixels but a percentage can be useful as well. Defaults to ``100``. - -- **dimension_y** (*Optional*, int): The dimension of the display in the vertical - direction. Usually in pixels but a percentage can be useful as well. Defaults to ``100``. - - **calibration_x_min** (*Optional*, int): The raw value corresponding to the left (or top if ``swap_x_y`` is specified) edge of the display. See :ref:`xpt2046-calibration` for the process to calibrate the touch screen. Defaults to ``0``. @@ -100,65 +79,8 @@ Base Configuration: - **swap_x_y** (*Optional*, boolean): If true the x and y axes are swapped. Defaults to ``false``. -- **on_state** (*Optional*, :ref:`Automation `): An automation to perform - when the touch screen is pressed or released. See :ref:`xpt2046-on_state`. +- All other options from :ref:`config-touchscreen`. -.. _xpt2046-on_state: - -``on_state`` Action -------------------- - -This automation will be triggered when the XPT2046 touch screen detects a touch, a release -or periodically each ``report_interval`` while touched. - -This trigger provides three arguments: ``x`` and ``y`` are of the type int and specify the -coordinates of the touch and a bool ``touched`` specifying whether a touch or release was -detected. - -Additionally to the coordinates, the touch status and the raw values needed for the calibration -can be accessed as member variables. - -The following code - -.. code-block:: yaml - - xpt2046: - on_state: - - lambda: |- - ESP_LOGI("main", "args x=%d, y=%d, touched=%s", x, y, (touched ? "touch" : "release")); - ESP_LOGI("main", "member x=%d, y=%d, touched=%d, x_raw=%d, y_raw=%d, z_raw=%d", - id(touchscreen).x, - id(touchscreen).y, - (int) id(touchscreen).touched, - id(touchscreen).x_raw, - id(touchscreen).y_raw, - id(touchscreen).z_raw - ); - -produces - -.. code-block:: none - - [20:17:37][I][main:065]: args x=145, y=261, touched=touch - [20:17:37][I][main:073]: member x=145, y=261, touched=1, x_raw=1686, y_raw=3218, z_raw=424 - [20:17:37][I][main:065]: args x=145, y=261, touched=release - [20:17:37][I][main:073]: member x=145, y=261, touched=0, x_raw=0, y_raw=0, z_raw=0 - -Binary Sensor -------------- - -The ``xpt2046`` binary sensor allows you to setup areas on the touch screen as virtual -buttons. First, setup a :ref:`xpt2046-component` and then use this binary sensor platform -to create individual binary sensors for each virtual button. - -- **name** (*Optional*, string): The name for the binary sensor. -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. -- **xpt2046_id** (*Optional*, :ref:`config-id`): Specify the ID of the component the sensor is part of. Useful when you have more than one touch screen. -- **x_min** (**Required**, int): Left coordinate of the screen area to be detected as the virtual button. -- **x_max** (**Required**, int): Right coordinate of the screen area to be detected as the virtual button. -- **y_min** (**Required**, int): Top coordinate of the screen area to be detected as the virtual button. -- **y_max** (**Required**, int): Bottom coordinate of the screen area to be detected as the virtual button. -- All other options from :ref:`Binary Sensor `. .. _xpt2046-calibration: @@ -168,7 +90,7 @@ Calibration To match the point of the touch to the display coordinates the touch screen has to be calibrated. The XPT2046 component returns raw values in the 0 to 4095 range. Those raw values are available as the ``x_raw`` and ``y_raw`` member variables and for example write them out as in the example -:ref:`xpt2046-on_state`. The goal of the calibration is to identify the raw values corresponding +:ref:`touchscreen-on_touch`. The goal of the calibration is to identify the raw values corresponding to the edges of the screen. The calibration assumes a display oriented in a way that you will be using it, i.e. your @@ -179,16 +101,13 @@ values nor ``swap_x_y``. .. code-block:: yaml # Touchscreen - xpt2046: + touchscreen: + platform: xpt2046 id: touchscreen cs_pin: 17 - irq_pin: 16 - dimension_x: 240 - dimension_y: 320 - on_state: + on_touch: - lambda: |- - if (touched) - ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%d", + ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d", id(touchscreen).x, id(touchscreen).y, id(touchscreen).x_raw, @@ -230,7 +149,8 @@ The vertical direction is fine. The configuration would thus be .. code-block:: yaml - xpt2046: + touchscreen: + platform: xpt2046 calibration_x_min: 3848 calibration_x_max: 281 calibration_y_min: 347 @@ -250,7 +170,7 @@ Note that the touch screen is not extremely precise and there might be nonlinear or similar errors so don't expect a pixel-perfect precision. You can verify the touchpoint using a display lambda similar to the following. -.. code-block:: none +.. code-block:: yaml display: - platform: ili9341 From 093657e25aac206c52f0c439e27fb3b05e14ac5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Tue, 11 Oct 2022 17:07:17 +0200 Subject: [PATCH 20/43] Changed `relay_1` to `light_1` To avoid confusion that a relay can be set at 50%. --- components/output/index.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/components/output/index.rst b/components/output/index.rst index 12ab21389..c200ff88c 100644 --- a/components/output/index.rst +++ b/components/output/index.rst @@ -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 ----------------- @@ -136,3 +136,4 @@ Full Output Index :glob: * +- :ghedit:`Edit` From 36651f3a2847b33621367b43276592dda563a5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Tue, 11 Oct 2022 17:12:24 +0200 Subject: [PATCH 21/43] Update index.rst --- components/output/index.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/output/index.rst b/components/output/index.rst index c200ff88c..2dc33f38d 100644 --- a/components/output/index.rst +++ b/components/output/index.rst @@ -129,11 +129,13 @@ Full Output Index - :doc:`/components/fan/speed` - :apiref:`binary_output.h `, :apiref:`float_output.h ` -- :ghedit:`Edit` .. toctree:: :maxdepth: 1 :glob: * + - :ghedit:`Edit` + + From af9abec4f4ba1219abac6af69aaf754e07192006 Mon Sep 17 00:00:00 2001 From: RoboMagus <68224306+RoboMagus@users.noreply.github.com> Date: Wed, 12 Oct 2022 04:24:00 +0200 Subject: [PATCH 22/43] Update docs for ble_client RSSI sensor (#2339) --- components/sensor/ble_client.rst | 40 ++++++++++++++++++++++---------- cookbook/ble_itag.rst | 7 ++++++ 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/components/sensor/ble_client.rst b/components/sensor/ble_client.rst index d859dcf76..db0683786 100644 --- a/components/sensor/ble_client.rst +++ b/components/sensor/ble_client.rst @@ -6,7 +6,7 @@ BLE Client Sensor :image: bluetooth.svg The ``ble_client`` component is a sensor platform that can -query BLE devices for specific values of service characteristics. +query BLE devices for RSSI or specific values of service characteristics. For more information on BLE services and characteristics, see :doc:`/components/ble_client`. @@ -21,6 +21,7 @@ For more information on BLE services and characteristics, see sensor: - platform: ble_client + type: characteristic ble_client_id: itag_black name: "iTag battery level" service_uuid: '180f' @@ -28,20 +29,34 @@ For more information on BLE services and characteristics, see icon: 'mdi:battery' unit_of_measurement: '%' + - platform: ble_client + type: rssi + ble_client_id: itag_black + name: "iTag RSSI" + Configuration variables: ------------------------ -- **ble_client_id** (**Required**, :ref:`config-id`): ID of the associated BLE client. -- **service_uuid** (**Required**, UUID): UUID of the service on the device. -- **characteristic_uuid** (**Required**, UUID): UUID of the service's characteristic to query. -- **descriptor_uuid** (*Optional*, UUID): UUID of the characteristic's descriptor to query. -- **id** (*Optional*, :ref:`config-id`): The ID to use for code generation, and for reference by dependent components. -- **lambda** (*Optional*, :ref:`lambda `): The lambda to use for converting a raw data - reading to a sensor value. See :ref:`ble-sensor-lambda` for more information. -- **notify** (*Optional*, boolean): Instruct the server to send notifications for this - characteristic. -- **update_interval** (*Optional*, :ref:`config-time`): The interval to poll the device. -- All other options from :ref:`Sensor `. +- **type** (**Required**): One of ``rssi``, ``characteristic``. + + rssi options: + + - **update_interval** (*Optional*, :ref:`config-time`): The interval to poll the device. + - All other options from :ref:`Sensor `. + + characteristic options: + + - **ble_client_id** (**Required**, :ref:`config-id`): ID of the associated BLE client. + - **service_uuid** (**Required**, UUID): UUID of the service on the device. + - **characteristic_uuid** (**Required**, UUID): UUID of the service's characteristic to query. + - **descriptor_uuid** (*Optional*, UUID): UUID of the characteristic's descriptor to query. + - **id** (*Optional*, :ref:`config-id`): The ID to use for code generation, and for reference by dependent components. + - **lambda** (*Optional*, :ref:`lambda `): The lambda to use for converting a raw data + reading to a sensor value. See :ref:`ble-sensor-lambda` for more information. + - **notify** (*Optional*, boolean): Instruct the server to send notifications for this + characteristic. + - **update_interval** (*Optional*, :ref:`config-time`): The interval to poll the device. + - All other options from :ref:`Sensor `. Automations: @@ -64,6 +79,7 @@ variable ``x`` of type ``std::vector``. The function must return a sing sensor: - platform: ble_client + type: characteristic ble_client_id: t_sensor name: "Temperature Sensor 32bit float" ... diff --git a/cookbook/ble_itag.rst b/cookbook/ble_itag.rst index cbffa953c..a797ad550 100644 --- a/cookbook/ble_itag.rst +++ b/cookbook/ble_itag.rst @@ -55,6 +55,7 @@ Configuration example: # a notification is received, the corresponding binary_sensor # is briefly toggled. - platform: ble_client + type: characteristic ble_client_id: itag_black name: "Black iTag btn" service_uuid: 'ffe0' @@ -73,12 +74,18 @@ Configuration example: # support this characteristic, you will see 'Unknown' in the # HA frontend. - platform: ble_client + type: characteristic ble_client_id: itag_black name: "Black iTag Battery" service_uuid: '180f' characteristic_uuid: '2a19' icon: 'mdi:battery' unit_of_measurement: '%' + # This entry queries polls the RSSI when the tag is connected. + - platform: ble_client + type: rssi + ble_client_id: itag_black + name: "Black iTag RSSI" Explanation ----------- From 89fad3a06c699d82e06f388d18c4e4b7f4e299d1 Mon Sep 17 00:00:00 2001 From: Chris Feenstra <73584137+cfeenstra1024@users.noreply.github.com> Date: Wed, 12 Oct 2022 04:30:00 +0200 Subject: [PATCH 23/43] Add support for ZHLT01 heatpump IR protocol (#2199) Co-authored-by: Chris Feenstra --- components/climate/climate_ir.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/climate/climate_ir.rst b/components/climate/climate_ir.rst index e23d18755..6773d5c4b 100644 --- a/components/climate/climate_ir.rst +++ b/components/climate/climate_ir.rst @@ -102,7 +102,7 @@ This platform utilises the library's generic one-size-fits-all API, which might 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``, ``electroluxyal``, ``fuego``, ``fujitsu_awyz``, ``gree``, ``greeya``, ``greeyac``, ``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`` +- **protocol** (**Required**, string): Choose one of Arduino-HeatpumpIR's supported protcols: ``aux``, ``ballu``, ``carrier_mca``, ``carrier_nqv``, ``daikin_arc417``, ``daikin_arc480``, ``daikin``, ``electroluxyal``, ``fuego``, ``fujitsu_awyz``, ``gree``, ``greeya``, ``greeyac``, ``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``, ``zhlt01`` - **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. @@ -120,6 +120,8 @@ Additional configuration must be specified for this platform: internal temperature sensor; a value of 2 minutes seems to work well. See :doc:`/components/sensor/index` for more information. + - The ``zhlt01`` protocol supports multiple AC brands: Eurom, Chigo, Tristar, Tecnomaster, Elgin, Geant, Tekno, Topair, Proma, Sumikura, JBS, Turbo Air, Nakatomy, Celestial Air, Ager, Blueway, Airlux, etc. + .. _ir-receiver_id: Using a Receiver From efb6f17ca8a6a89a2eb02ac08ab1a28e500f31dd Mon Sep 17 00:00:00 2001 From: definitio <37266727+definitio@users.noreply.github.com> Date: Wed, 12 Oct 2022 22:26:31 +0300 Subject: [PATCH 24/43] Do not requre CS pin for st7789v (#2354) --- components/display/st7789v.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/display/st7789v.rst b/components/display/st7789v.rst index 037b06d19..dc9bb4e1b 100644 --- a/components/display/st7789v.rst +++ b/components/display/st7789v.rst @@ -63,7 +63,7 @@ Configuration variables: - ``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 `): The CS pin. +- **cs_pin** (*Optional*, :ref:`Pin Schema `): The CS pin. - **dc_pin** (**Required**, :ref:`Pin Schema `): The DC pin. - **reset_pin** (**Required**, :ref:`Pin Schema `): The RESET pin. - **height** (*Optional*, int): When ``model`` is set to "Custom", use this to specify the ``height`` of the display From a3f8684aa8246ce452fc25fc9a3601475fa5cb2d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Oct 2022 09:18:46 +1300 Subject: [PATCH 25/43] Bump version to 2022.10.0b1 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index 03b72da52..c4c02d87e 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 = 2022.10.0-dev +PROJECT_NUMBER = 2022.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 299496721..c528eff8b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = dev +ESPHOME_REF = 2022.10.0b1 .PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify diff --git a/_static/version b/_static/version index 26257e6ba..8fe056a25 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.10.0-dev \ No newline at end of file +2022.10.0b1 \ No newline at end of file diff --git a/conf.py b/conf.py index 19fb5dd39..d30031941 100644 --- a/conf.py +++ b/conf.py @@ -68,7 +68,7 @@ author = "ESPHome" # The short X.Y version. version = "2022.10" # The full version, including alpha/beta/rc tags. -release = "2022.10.0-dev" +release = "2022.10.0b1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 1909d19a12ce9f5a0449cf7bdeffb46481d942b3 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Oct 2022 09:34:42 +1300 Subject: [PATCH 26/43] Update changelog for 2022.10.0b1 --- changelog/2022.10.0.rst | 107 ++++++++++++++++++++++++++++++++++++++++ changelog/index.rst | 2 +- 2 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 changelog/2022.10.0.rst diff --git a/changelog/2022.10.0.rst b/changelog/2022.10.0.rst new file mode 100644 index 000000000..64ca95611 --- /dev/null +++ b/changelog/2022.10.0.rst @@ -0,0 +1,107 @@ +ESPHome 2022.10.0 - 19th October 2022 +===================================== + +.. seo:: + :description: Changelog for ESPHome 2022.10.0. + :image: /_static/changelog-2022.9.0.png + :author: Jesse Hills + :author_twitter: @jesserockz + +This month we have been busy upgrading the Bluetooth Proxy support for Home Assistant, +and this meant there are many PRs awaiting reviews for new components that were unable to be +reviewed and merged in time. + +Python Version 3.9 +------------------ + +ESPHome now requires Python 3.9 or newer. This is taken care of if you use the Home Assistant addon +or docker image. If using pip, you will need to upgrade your Python version manually before ESPHome will +upgrade. + +BLE Client Sensors +------------------ + +Due to adding a new RSSI sensor to the ``ble_client`` sensor platform, a new ``type`` configuration variable. +You will get a validation error when you try to install and you have not added a ``type`` to your +existing configurations. + +XPT2046 Touchscreen +------------------- + +The ``xpt2046`` touchscreen component has been updated to be a platform of ``touchscreen`` instead of a +top level component. This requires a small change to your configuration, see :doc:`/components/touchscreen/xpt2046` +for the new way to configure. + + +Full list of changes +-------------------- + +Breaking Changes +^^^^^^^^^^^^^^^^ + +- Thermostat remove deprecated config :esphomepr:`3643` by :ghuser:`MrMDavidson` (breaking-change) +- Bump python min to 3.9 :esphomepr:`3871` by :ghuser:`jesserockz` (breaking-change) +- Refactor xpt2046 to be a touchscreen platform :esphomepr:`3793` by :ghuser:`nielsnl68` (breaking-change) +- Add ble RSSI sensor for connected devices :esphomepr:`3860` by :ghuser:`RoboMagus` (breaking-change) + +All changes +^^^^^^^^^^^ + +- Update mcp23s17.cpp :esphomepr:`3797` by :ghuser:`pawel3410` +- Allow CORS for web_server :esphomepr:`3819` by :ghuser:`zhzhzhy` +- Dont fail fast on CI for docker :esphomepr:`3832` by :ghuser:`jesserockz` +- Thermostat remove deprecated config :esphomepr:`3643` by :ghuser:`MrMDavidson` (breaking-change) +- Add support for parsing the short local name in the tracker :esphomepr:`3854` by :ghuser:`bdraco` +- Add display GPIO setup instruction for Aliexpress display :esphomepr:`3851` by :ghuser:`kbx81` +- fix dump preset string type :esphomepr:`3863` by :ghuser:`glmnet` +- Bump CI to python 3.9 :esphomepr:`3869` by :ghuser:`jesserockz` +- Add cg.with_local_variable :esphomepr:`3577` by :ghuser:`jpeletier` +- Fix time/automation (cron) wdt crash when time jumps ahead too much :esphomepr:`3844` by :ghuser:`jpeletier` +- Bump pyupgrade from 2.37.3 to 3.0.0 :esphomepr:`3867` by :ghuser:`dependabot[bot]` +- Add min_version to esphome config :esphomepr:`3866` by :ghuser:`jesserockz` +- Bump python min to 3.9 :esphomepr:`3871` by :ghuser:`jesserockz` (breaking-change) +- Bump pylint from 2.15.2 to 2.15.3 :esphomepr:`3870` by :ghuser:`dependabot[bot]` +- Add new sensor device classes :esphomepr:`3895` by :ghuser:`jesserockz` +- Refactor xpt2046 to be a touchscreen platform :esphomepr:`3793` by :ghuser:`nielsnl68` (breaking-change) +- Proxy friendly host url resolution for `use_address` with path. :esphomepr:`3653` by :ghuser:`RoboMagus` +- Update webserver index file :esphomepr:`3896` by :ghuser:`jesserockz` +- Correctly set ble_write UUIDs based on their lengths. :esphomepr:`3885` by :ghuser:`RoboMagus` +- Fix default unit for ble_rssi sensor :esphomepr:`3874` by :ghuser:`RoboMagus` +- Exposing coordinates from touchscreen binary sensor :esphomepr:`3891` by :ghuser:`gpambrozio` +- Fix type annotation on `extract_registry_entry_config` :esphomepr:`3623` by :ghuser:`quentinmit` +- Add ble RSSI sensor for connected devices :esphomepr:`3860` by :ghuser:`RoboMagus` (breaking-change) +- Fix pulse_meter filter logic :esphomepr:`3321` by :ghuser:`cstaahl` +- Add support for ZHLT01 heatpump IR protocol :esphomepr:`3655` by :ghuser:`cfeenstra1024` +- Send GATT error events to HA :esphomepr:`3884` by :ghuser:`jesserockz` +- Do not require CS pin for ST7789V :esphomepr:`3888` by :ghuser:`definitio` + +Past Changelogs +--------------- + +- :doc:`2022.9.0` +- :doc:`2022.8.0` +- :doc:`2022.6.0` +- :doc:`2022.5.0` +- :doc:`2022.4.0` +- :doc:`2022.3.0` +- :doc:`2022.2.0` +- :doc:`2022.1.0` +- :doc:`2021.12.0` +- :doc:`2021.11.0` +- :doc:`2021.10.0` +- :doc:`2021.9.0` +- :doc:`2021.8.0` +- :doc:`v1.20.0` +- :doc:`v1.19.0` +- :doc:`v1.18.0` +- :doc:`v1.17.0` +- :doc:`v1.16.0` +- :doc:`v1.15.0` +- :doc:`v1.14.0` +- :doc:`v1.13.0` +- :doc:`v1.12.0` +- :doc:`v1.11.0` +- :doc:`v1.10.0` +- :doc:`v1.9.0` +- :doc:`v1.8.0` +- :doc:`v1.7.0` diff --git a/changelog/index.rst b/changelog/index.rst index db152813d..babc04499 100644 --- a/changelog/index.rst +++ b/changelog/index.rst @@ -2,7 +2,7 @@ Changelog ========= .. redirect:: - :url: /changelog/2022.9.0.html + :url: /changelog/2022.10.0.html .. toctree:: :glob: From 305886fe23c10a855cd1abab9fc89bc5708a697f Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 13 Oct 2022 09:35:22 +1300 Subject: [PATCH 27/43] Update supporters for 2022.10.0b1 --- guides/supporters.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index 82b15e606..e0208cb7b 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -152,6 +152,7 @@ Contributors - `Ciprian Constantinescu (@cciprian5) `__ - `Marco (@cdrfun) `__ - `Cellie (@CelliesProjects) `__ +- `Chris Feenstra (@cfeenstra1024) `__ - `Kostas Chatzikokolakis (@chatziko) `__ - `chris-jennings (@chris-jennings) `__ - `Chris (@chrismaki) `__ @@ -483,10 +484,8 @@ Contributors - `Kevin Lewis (@kll) `__ - `Koen Vervloesem (@koenvervloesem) `__ - `Petr Vraník (@konikvranik) `__ -- `korellas (@korellas) `__ - `Kevin Pelzel (@kpelzel) `__ - `Karl Q. (@kquinsland) `__ -- `krahabb (@krahabb) `__ - `Kodey Converse (@krconv) `__ - `KristopherMackowiak (@KristopherMackowiak) `__ - `kroimon (@kroimon) `__ @@ -699,6 +698,7 @@ Contributors - `Qc (@qc24) `__ - `Karol Zlot (@qqgg231) `__ - `Tommy Jonsson (@quazzie) `__ +- `Quentin Smith (@quentinmit) `__ - `Quinn Hosler (@quinnhosler) `__ - `Johannes Rebling (@r0oland) `__ - `Richard Kuhnt (@r15ch13) `__ @@ -898,4 +898,4 @@ Contributors - `Zack Barett (@zsarnett) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated October 7, 2022.* +*This page was last updated October 13, 2022.* From 7212f4beb1e2bf8bf75ba98c79bd5ddfcee76bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 12 Oct 2022 23:14:43 +0200 Subject: [PATCH 28/43] Add components.json (#2362) --- components.py | 33 +++++++++++++++++++++++++++++++++ conf.py | 3 ++- schema_doc.py | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 components.py diff --git a/components.py b/components.py new file mode 100644 index 000000000..07f2dc2e6 --- /dev/null +++ b/components.py @@ -0,0 +1,33 @@ +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/"): + app.compoents_output[pagename] = { + "title": context["title"], + "url": context["pageurl"] + } + + +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)) diff --git a/conf.py b/conf.py index f459985ab..716290824 100644 --- a/conf.py +++ b/conf.py @@ -39,7 +39,8 @@ sys.path.append(os.path.abspath(".")) extensions = [ "github", "seo", - "sitemap", + "components", + "sitemap" ] # Add any paths that contain templates here, relative to this directory. diff --git a/schema_doc.py b/schema_doc.py index 7bd78c886..c69f451d5 100644 --- a/schema_doc.py +++ b/schema_doc.py @@ -13,7 +13,7 @@ from docutils import nodes # This file is not processed by default as extension unless added. # To add this extension from command line use: -# -Dextensions=github,seo,sitemap,schema_doc" +# -Dextensions=github,seo,sitemap,components,schema_doc" # also for improve performance running old version # -d_build/.doctrees-schema From 0af410446844160006e91216afa3a8054dd85cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 14 Oct 2022 12:34:22 +0200 Subject: [PATCH 29/43] Adjust components output (#2364) --- components.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components.py b/components.py index 07f2dc2e6..b68655c56 100644 --- a/components.py +++ b/components.py @@ -21,10 +21,19 @@ def setup(app): def add_component_details(app, pagename, templatename, context, doctree): """As each page is built, collect page details for the output.""" if pagename.startswith("components/"): - app.compoents_output[pagename] = { + page_key = pagename[11:].replace("/", "_") + component_name = pagename.split("/")[-1] + page_data = { "title": context["title"], - "url": context["pageurl"] + "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): From 7b3d45873adf3386dcf5e1e9512ff48c12d91d66 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 15 Oct 2022 08:37:12 +1300 Subject: [PATCH 30/43] Bump version to 2022.10.0b2 --- Doxygen | 2 +- Makefile | 2 +- _static/version | 2 +- conf.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doxygen b/Doxygen index c4c02d87e..69e5f6584 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 = 2022.10.0b1 +PROJECT_NUMBER = 2022.10.0b2 # 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 c528eff8b..efdeb64fb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2022.10.0b1 +ESPHOME_REF = 2022.10.0b2 .PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify diff --git a/_static/version b/_static/version index 8fe056a25..850ebcc76 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.10.0b1 \ No newline at end of file +2022.10.0b2 \ No newline at end of file diff --git a/conf.py b/conf.py index 459c3bb1f..f0d2514ab 100644 --- a/conf.py +++ b/conf.py @@ -69,7 +69,7 @@ author = "ESPHome" # The short X.Y version. version = "2022.10" # The full version, including alpha/beta/rc tags. -release = "2022.10.0b1" +release = "2022.10.0b2" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From ec015f324000c8a037879a20b4f1c9ae4a03f355 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 15 Oct 2022 08:38:06 +1300 Subject: [PATCH 31/43] Update changelog for 2022.10.0b2 --- changelog/2022.10.0.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changelog/2022.10.0.rst b/changelog/2022.10.0.rst index 64ca95611..c58c659c7 100644 --- a/changelog/2022.10.0.rst +++ b/changelog/2022.10.0.rst @@ -44,6 +44,14 @@ Breaking Changes - Refactor xpt2046 to be a touchscreen platform :esphomepr:`3793` by :ghuser:`nielsnl68` (breaking-change) - Add ble RSSI sensor for connected devices :esphomepr:`3860` by :ghuser:`RoboMagus` (breaking-change) +Beta Changes +^^^^^^^^^^^^ + +- fix never calling preset change trigger :esphomepr:`3864` by :ghuser:`glmnet` +- Modbus QWORD fix :esphomepr:`3856` by :ghuser:`dudanov` +- Send true and not RSSI in ble_presence :esphomepr:`3904` by :ghuser:`fjouault` +- Remove address type map from bluetooth proxy :esphomepr:`3905` by :ghuser:`jesserockz` + All changes ^^^^^^^^^^^ @@ -74,6 +82,10 @@ All changes - Add support for ZHLT01 heatpump IR protocol :esphomepr:`3655` by :ghuser:`cfeenstra1024` - Send GATT error events to HA :esphomepr:`3884` by :ghuser:`jesserockz` - Do not require CS pin for ST7789V :esphomepr:`3888` by :ghuser:`definitio` +- fix never calling preset change trigger :esphomepr:`3864` by :ghuser:`glmnet` +- Modbus QWORD fix :esphomepr:`3856` by :ghuser:`dudanov` +- Send true and not RSSI in ble_presence :esphomepr:`3904` by :ghuser:`fjouault` +- Remove address type map from bluetooth proxy :esphomepr:`3905` by :ghuser:`jesserockz` Past Changelogs --------------- From 69aa967e7995fd68bba5529952c2de14157193d6 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 15 Oct 2022 08:38:44 +1300 Subject: [PATCH 32/43] Update supporters for 2022.10.0b2 --- guides/supporters.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guides/supporters.rst b/guides/supporters.rst index e0208cb7b..408149585 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -298,6 +298,7 @@ Contributors - `Christian Ferbar (@ferbar) `__ - `FeuerSturm (@FeuerSturm) `__ - `Frank Riley (@fhriley) `__ +- `Frédéric Jouault (@fjouault) `__ - `fkirill (@fkirill) `__ - `Sean Vig (@flacjacket) `__ - `Diego Elio Pettenò (@Flameeyes) `__ @@ -453,7 +454,6 @@ Contributors - `Javier Peletier (@jpeletier) `__ - `jsuanet (@jsuanet) `__ - `James Szalay (@jtszalay) `__ -- `junnikokuki (@junnikokuki) `__ - `Justahobby01 (@Justahobby01) `__ - `Mike Ryan (@justfalter) `__ - `Justin Gerhardt (@justin-gerhardt) `__ @@ -465,7 +465,6 @@ Contributors - `Kris (@K-r-i-s-t-i-a-n) `__ - `Harald Nagel (@k7hpn) `__ - `kaegi (@kaegi) `__ -- `kahrendt (@kahrendt) `__ - `Karol Zlot (@karolzlot) `__ - `Kattni (@kattni) `__ - `Krasimir Nedelchev (@kaykayehnn) `__ @@ -898,4 +897,4 @@ Contributors - `Zack Barett (@zsarnett) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated October 13, 2022.* +*This page was last updated October 15, 2022.* From fc68e6919600d64b3f7ce9118d2a274262c0d9d9 Mon Sep 17 00:00:00 2001 From: James Lakin Date: Tue, 18 Oct 2022 19:51:32 +0100 Subject: [PATCH 33/43] Fix Gitpod launch command to use live-html target (#2367) --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index b7d6d5eb2..e7dd5be20 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,4 +4,4 @@ ports: tasks: - before: pip3 install -r requirements.txt - command: make webserver + command: make live-html From af298372b870f5f17fe0967dfd7322496be3ca1b Mon Sep 17 00:00:00 2001 From: James Lakin Date: Tue, 18 Oct 2022 19:52:00 +0100 Subject: [PATCH 34/43] Add breadcrumbs to the top of pages (#2368) --- _static/custom.css | 4 ++++ _templates/layout.html | 11 +++++++++++ devices/index.rst | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_static/custom.css b/_static/custom.css index 5df279829..052882239 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -186,3 +186,7 @@ div.index-shields { margin-left: 32px; } } + +.breadcrumbs li { + display: inline; +} diff --git a/_templates/layout.html b/_templates/layout.html index d44b65a33..c24609924 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -27,6 +27,17 @@ {% endblock %} +{% block relbar_top %} + {% if parents|length > 0 %} + + {% endif %} +{% endblock %} + {% block footer %}