Skip to content

Commit 415991f

Browse files
authored
Merge branch 'esphome:next' into next
2 parents 207b242 + e870b4c commit 415991f

22 files changed

+445
-72
lines changed

_static/changelog-2023.11.0.png

133 KB
Loading

changelog/2023.11.0.rst

+298
Large diffs are not rendered by default.

changelog/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Changelog
22
=========
33

44
.. redirect::
5-
:url: /changelog/2023.10.0.html
5+
:url: /changelog/2023.11.0.html
66

77
.. toctree::
88
:glob:

components/climate/haier.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ Configuration variables:
106106
- **protocol** (*Optional*, string): Defines protocol of communication with AC. Possible values: hon or smartair2. Default value is smartair2.
107107
- **name** (**Required**, string): The name of the climate device.
108108
- **wifi_signal** (*Optional*, boolean): If true - send wifi signal level to AC.
109-
- **answer_timeout** (*Optional*, :ref:`config-time`): Responce timeout. Default value is 150ms.
109+
- **answer_timeout** (*Optional*, :ref:`config-time`): Responce timeout. Default value is 200ms.
110+
- **alternative_swing_control** (*Optional*, boolean): (supported by smartAir2 only) If true - use alternative values to control swing mode. Use only if the original control method is not working for your AC.
111+
- **control_packet_size** (*Optional*, int): (supported only by hOn) Define the size of the control packet. Can help with some newer models of ACs that use bigger packets. Default value: 10.
112+
- **control_method** (*Optional*, list): (supported only by hOn) Defines control method (should be supported by AC). Supported values: MONITOR_ONLY - no control, just monitor status, SET_GROUP_PARAMETERS - set all AC parameters with one command (default method), SET_SINGLE_PARAMETER - set each parameter individually (this method is supported by some new ceiling ACs like AD71S2SM3FA)
110113
- **display** (*Optional*, boolean): Can be used to set AC display off.
111114
- **beeper** (*Optional*, boolean): Can be used to disable beeping on commands from AC. Supported only by hOn protocol.
112115
- **outdoor_temperature** (*Optional*): Temperature sensor for outdoor temperature. Supported only by hOn protocol.

components/display/ssd1306.rst

+10-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Over I²C
1212

1313
The ``ssd1306_i2c`` display platform allows you to use
1414
SSD1306 (`datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf>`__,
15-
`Adafruit <https://www.adafruit.com/product/326>`__), SSD1305 (`datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1305.pdf>`__)
15+
`Adafruit <https://www.adafruit.com/product/326>`__), SSD1305 (`datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1305.pdf>`__),
16+
SH1107 (`datasheet <https://cdn-learn.adafruit.com/assets/assets/000/094/580/original/SH1107_datasheet.pdf>`__,
17+
`Adafruit <https://www.adafruit.com/product/4650>`__)
1618
and SH1106 (`datasheet <https://www.elecrow.com/download/SH1106%20datasheet.pdf>`__,
1719
`electrodragon <https://www.electrodragon.com/product/1-3-12864-blue-oled-display-iicspi/>`__)
1820
displays with ESPHome. Note that this component is for displays that are connected via the :ref:`I²C Bus <i2c>`.
@@ -58,6 +60,7 @@ Configuration variables:
5860
- ``SH1106 96x16``
5961
- ``SH1106 64x48``
6062
- ``SH1107 128x64``
63+
- ``SH1107 128x128``
6164
- ``SSD1305 128x32``
6265
- ``SSD1305 128x64``
6366

@@ -71,8 +74,8 @@ Configuration variables:
7174
Defaults to ``false``.
7275
- **flip_x** (*Optional*, boolean): Flip the horizontal axis on the screen. Defaults to ``true``.
7376
- **flip_y** (*Optional*, boolean): Flip the vertical axis on the screen. Defaults to ``true``.
74-
- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``-32~32``. Defaults to ``0``.
75-
- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``-32~32``. Defaults to ``0``.
77+
- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``0~128``. Defaults to ``0``.
78+
- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``0~128``. Defaults to ``0``.
7679
- **invert** (*Optional*, boolean): Invert all pixel state on the display. Defaults to ``false``.
7780
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
7881
See :ref:`display-engine` for more information.
@@ -138,6 +141,7 @@ Configuration variables:
138141
- ``SH1106 96x16``
139142
- ``SH1106 64x48``
140143
- ``SH1107 128x64``
144+
- ``SH1107 128x128``
141145
- ``SSD1305 128x32``
142146
- ``SSD1305 128x64``
143147

@@ -152,8 +156,8 @@ Configuration variables:
152156
Defaults to ``false``.
153157
- **flip_x** (*Optional*, boolean): Flip the horizontal axis on the screen. Defaults to ``true``.
154158
- **flip_y** (*Optional*, boolean): Flip the vertical axis on the screen. Defaults to ``true``.
155-
- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``-32~32``. Defaults to ``0``.
156-
- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``-32~32``. Defaults to ``0``.
159+
- **offset_x** (*Optional*, int): Set this option if some horizontal pixel is missing. Numbers are only allowed between ``0~128``. Defaults to ``0``.
160+
- **offset_y** (*Optional*, int): Set this option if some vertical pixel is missing. Numbers are only allowed between ``0~128``. Defaults to ``0``.
157161
- **invert** (*Optional*, boolean): Invert all pixel state on the display. Defaults to ``false``.
158162
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
159163
See :ref:`display-engine` for more information.
@@ -168,6 +172,7 @@ See Also
168172

169173
- :doc:`index`
170174
- :apiref:`ssd1306_base/ssd1306_base.h`
175+
- `SH110x Library <https://github.com/adafruit/Adafruit_SH110x>`__ by `Adafruit <https://www.adafruit.com/>`__
171176
- `SSD1306 Library <https://github.com/adafruit/Adafruit_SSD1306>`__ by `Adafruit <https://www.adafruit.com/>`__
172177
- `SSD1305 Library <https://github.com/adafruit/Adafruit_SSD1305>`__ by `Adafruit <https://www.adafruit.com/>`__
173178
- :ghedit:`Edit`

components/display/tm1637.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ Configuration variables:
4646
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``1s``.
4747
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
4848

49-
.. _display-tm1637_lambda:
50-
5149
Binary Sensor
5250
-------------
5351

@@ -79,6 +77,8 @@ Configuration variables:
7977
0 to 15.
8078
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
8179

80+
.. _display-tm1637_lambda:
81+
8282
Rendering Lambda
8383
----------------
8484

components/esp32.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ Configuration variables:
2323
choose a generic board from Espressif such as ``esp32dev``.
2424
- **framework** (*Optional*): Options for the underlying framework used by ESPHome.
2525
See :ref:`esp32-arduino_framework` and :ref:`esp32-espidf_framework`.
26+
- **flash_size** (*Optional*, string): The amount of flash memory available on the ESP32 board/module. One of ``2MB``,
27+
``4MB``, ``8MB``, ``16MB`` or ``32MB``. Defaults to ``4MB``. **Warning: specifying a size larger than that available
28+
on your board will cause the ESP32 to fail to boot.**
29+
- **partitions** (*Optional*, filename): The name of (optionally including the path to) the file containing the
30+
partitioning scheme to be used. When not specified, partitions are automatically generated based on ``flash_size``.
2631
- **variant** (*Optional*, string): The variant of the ESP32 that is used on this board. One of ``esp32``,
27-
``esp32s2``, ``esp32s3``, ``esp32c3`` and ``esp32h2``. Defaults to the variant that is detected from the board, if
32+
``esp32s2``, ``esp32s3``, ``esp32c3`` and ``esp32h2``. Defaults to the variant that is detected from the board; if
2833
a board that's unknown to ESPHome is used, this option is mandatory.
2934

3035
.. note::
3136

32-
Support for the ESP32-S2 and ESP32-C3 is still in development and there could be issues.
37+
Support for ESP32 variants such as the S2, S3 and C3 is still in development and there could be issues.
3338

3439
GPIO Pin Numbering
3540
------------------

components/esp32_ble_tracker.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Configuration variables:
147147
``on_ble_manufacturer_data_advertise`` Trigger
148148
************************************************
149149

150-
This automation will be triggered when a Bluetooth advertising with manufcaturer data is received. A
150+
This automation will be triggered when a Bluetooth advertising with manufacturer data is received. A
151151
variable ``x`` of type ``std::vector<uint8_t>`` is passed to the automation for use in lambdas.
152152

153153
.. code-block:: yaml

components/fan/hbridge.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The ``hbridge`` fan platform allows you to use a compatible *h-bridge* (L298N, D
3838
pin_a: motor_forward_pin
3939
pin_b: motor_reverse_pin
4040
# enable_pin: motor_enable
41-
decay_mode: slow # slow decay mode (braking) or fast decay (coasting).
41+
decay_mode: slow # slow decay mode (coasting) or fast decay (braking).
4242
4343
Configuration variables:
4444
------------------------

components/fan/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Increments through speed levels of the fan with the given ID when executed. If t
147147
id: fan_1
148148
off_speed_cycle: true
149149
# Shorthand:
150-
- fan.cycle_speed:: fan_1
150+
- fan.cycle_speed: fan_1
151151
152152
Configuration options:
153153

components/sensor/ld2420.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Module Pinouts
103103
104104
number:
105105
- platform: ld2420
106-
timeout:
106+
presence_timeout:
107107
name: Detection Presence Timeout
108108
min_gate_distance:
109109
name: Detection Gate Minimum

components/sensor/wifi_signal.rst

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ To additionally display signal strength in percentage use the :ref:`copy-sensor`
4242
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
4343
unit_of_measurement: "Signal %"
4444
entity_category: "diagnostic"
45+
device_class: ""
4546
4647
Configuration variables:
4748
------------------------

components/servo.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Advanced Options:
5656
This is useful if you have an absolute servo motor and it goes back to its 0 position at startup.
5757
Defaults to ``false``.
5858
- **auto_detach_time** (*Optional*, :ref:`config-time`): The time after reaching the target value when the servo will be detached`, if set to zero, servo will not be detached. Defaults to ``0s``.
59-
- **transition_length** (*Optional*, :ref:`config-time`): The time needed for a full movement (-1.0 to 1.0). This will effectively limit the speed of the servo, the larger the value, the slowest the servo will move. Defaults to `` 0s``
59+
- **transition_length** (*Optional*, :ref:`config-time`): The time needed for a full movement (-1.0 to 1.0). This will effectively limit the speed of the servo, the larger the value, the slowest the servo will move. Defaults to ``0s``.
6060
This can slow down the servo to avoid loud noises or just make the movement not jerking.
6161

6262
.. note::

components/text/template.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ using :ref:`lambdas <config-lambda>`.
2222
Configuration variables:
2323
------------------------
2424

25-
- **min_lenngth** (**Required**, float): The minimum length this text can be.
26-
- **max_length** (**Required**, float): The maximum length this text can be.
25+
- **min_length** (*Optional*, int): The minimum length this text can be. Defaults to ``0``.
26+
- **max_length** (*Optional*, int): The maximum length this text can be. Defaults to ``255``.
2727
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`):
2828
Lambda to be evaluated every update interval to get the current value of the text.
2929
- **set_action** (*Optional*, :ref:`Action <config-action>`): The action that should
@@ -36,9 +36,10 @@ Configuration variables:
3636
Cannot be used with ``lambda``. Defaults to ``false``.
3737
- **restore_value** (*Optional*, boolean): Saves and loads the state to RTC/Flash.
3838
Cannot be used with ``lambda``. Defaults to ``false``.
39-
- **initial_value** (*Optional*, float): The value to set the state to on setup if not
39+
- **initial_value** (*Optional*, String): The value to set the state to on setup if not
4040
restored with ``restore_value``.
4141
Cannot be used with ``lambda``.
42+
Defaults to the empty string.
4243
- All other options from :ref:`Text <config-text>`.
4344

4445

components/voice_assistant.rst

+10
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Configuration:
3737
- **media_player** (*Optional*, :ref:`config-id`): The :doc:`media_player </components/media_player/index>` to use
3838
to output the response. Cannot be used with ``speaker`` above.
3939
- **use_wake_word** (*Optional*, boolean): Enable wake word on the assist pipeline. Defaults to ``false``.
40+
- **on_intent_start** (*Optional*, :ref:`Automation <automation>`): An automation to perform when intent processing starts.
41+
- **on_intent_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform when intent processing ends.
4042
- **on_listening** (*Optional*, :ref:`Automation <automation>`): An automation to
4143
perform when the voice assistant microphone starts listening.
4244
- **on_start** (*Optional*, :ref:`Automation <automation>`): An automation to
@@ -48,12 +50,20 @@ Configuration:
4850
- **on_stt_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform
4951
when the voice assistant has finished speech-to-text. The resulting text is
5052
available to automations as the variable ``x``.
53+
- **on_stt_vad_start** (*Optional*, :ref:`Automation <automation>`): An automation to perform when voice activity
54+
detection starts speech-to-text processing.
55+
- **on_stt_vad_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform when voice activity
56+
detection ends speech-to-text processing.
5157
- **on_tts_start** (*Optional*, :ref:`Automation <automation>`): An automation to perform
5258
when the voice assistant has started text-to-speech. The text to be spoken is
5359
available to automations as the variable ``x``.
5460
- **on_tts_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform
5561
when the voice assistant has finished text-to-speech. A URL containing the audio response
5662
is available to automations as the variable ``x``.
63+
- **on_tts_stream_start** (*Optional*, :ref:`Automation <automation>`): An automation to perform when audio stream
64+
(voice response) playback starts. Requires ``speaker`` to be configured.
65+
- **on_tts_stream_end** (*Optional*, :ref:`Automation <automation>`): An automation to perform when audio stream
66+
(voice response) playback ends. Requires ``speaker`` to be configured.
5767
- **on_error** (*Optional*, :ref:`Automation <automation>`): An automation to perform
5868
when the voice assistant has encountered an error. The error code and message are available to
5969
automations as the variables ``code`` and ``message``.

components/xl9535.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Pin configuration variables:
5050
****************************
5151

5252
- **xl9535** (**Required**, :ref:`config-id`): The id of the ``xl9535`` component of the pin.
53-
- **number** (**Required**, int): The pin number.
53+
- **number** (**Required**, int): The pin number. Valid numbers are 0-7 and 10-17.
5454
- **inverted** (*Optional*, boolean): If all read and written values
5555
should be treated as inverted. Defaults to ``false``.
5656
- **mode** (*Optional*, string): A pin mode to set for the pin at. One of ``INPUT`` or ``OUTPUT``.

cookbook/lambda_magic.rst

+35
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,41 @@ In this example a :doc:`/components/cover/time_based` is used with the GPIO conf
365365
- switch.turn_off: open_cover
366366
- switch.turn_off: close_cover
367367
368+
Update numeric values from text input
369+
-------------------------------------
370+
371+
Sometimes it may be more confortable to use a :doc:`/components/text/template` to change some numeric values from the user interface.
372+
ESPHome has some nice `helper functions <https://github.com/esphome/esphome/blob/dev/esphome/core/helpers.h>`__ among which
373+
theres's one to convert text to numbers.
374+
375+
In the example below we have a text input and a template sensor which can be updated from the text input field. What the lambda
376+
does, is to parse and convert the text string to a number - which only succeedes if the entered string contains characters
377+
represesenting a float number (such as digits, ``-`` and ``.``). If the entered string contains any other characters, the lambda
378+
will return ``NaN``, which corresponds to ``unknown`` sensor state.
379+
380+
.. code-block:: yaml
381+
382+
text:
383+
- platform: template
384+
name: "Number type in"
385+
optimistic: true
386+
min_length: 0
387+
max_length: 16
388+
mode: text
389+
on_value:
390+
then:
391+
- sensor.template.publish:
392+
id: num_from_text
393+
state: !lambda |-
394+
auto n = parse_number<float>(x);
395+
return n.has_value() ? n.value() : NAN;
396+
397+
sensor:
398+
- platform: template
399+
id: num_from_text
400+
name: "Number from text"
401+
402+
368403
See Also
369404
--------
370405

guides/configuration-types.rst

+15-14
Original file line numberDiff line numberDiff line change
@@ -331,20 +331,6 @@ your configuration file. This can be used to create generic 'template' configura
331331
files (like the ``example.yaml`` above) which can be used for multiple devices,
332332
using substitutions which are provided on the command line.
333333

334-
Extend
335-
------
336-
337-
To make changes or add additional configuration to included configurations ``!extend config_id`` can be used, where ``config_id`` is the ID of the configuration to modify.
338-
For example to set a specific update interval on a common uptime sensor that is shared between configurations:
339-
340-
.. code-block:: yaml
341-
342-
<<: !include common.yaml
343-
344-
sensor:
345-
- id: !extend uptime_sensor
346-
update_interval: 10s
347-
348334
.. _config-packages:
349335

350336
Packages
@@ -543,6 +529,21 @@ platform, it could be constructed like this:
543529
- switch.turn_off: open_${door_location}_door_switch
544530
- switch.turn_off: close_${door_location}_door_switch
545531
532+
Extend
533+
------
534+
535+
To make changes or add additional configuration to included configurations ``!extend config_id`` can be used, where ``config_id`` is the ID of the configuration to modify.
536+
For example to set a specific update interval on a common uptime sensor that is shared between configurations:
537+
538+
.. code-block:: yaml
539+
540+
packages:
541+
common: !include common.yaml
542+
543+
sensor:
544+
- id: !extend uptime_sensor
545+
update_interval: 10s
546+
546547
547548
See Also
548549
--------

guides/contributing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ loader. These are:
614614
create the necessary C++ source code.
615615
- ``DEPENDENCIES``: Mark the component to depend on other components. If the user hasn't explicitly
616616
added these components in their configuration, a validation error will be generated.
617-
- ``AUTO_LOAD``: Automatically load an integration if the user hasn't added it manually.
617+
- ``AUTO_LOAD``: Automatically load a component if the user hasn't added it manually.
618618
- ``MULTI_CONF``: Mark this component to accept an array of configurations. If this is an
619619
integer instead of a boolean, validation will only permit the given number of entries.
620620
- ``CONFLICTS_WITH``: Mark a list of components as conflicting with this integration. If the user

0 commit comments

Comments
 (0)