Merge branch 'current' into next

This commit is contained in:
Jesse Hills 2022-11-09 17:26:51 +13:00
commit ff64be2162
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
10 changed files with 28 additions and 79 deletions

View File

@ -48,6 +48,11 @@ Release 2022.10.1 - October 26
- Fixed touch release issue using the interrupt pin :esphomepr:`3925` by :ghuser:`nielsnl68`
- Add wind_speed sensor device class :esphomepr:`3941` by :ghuser:`frenck`
Release 2022.10.2 - November 1
------------------------------
- Fix bluetooth_proxy not connecting :esphomepr:`3967` by :ghuser:`jesserockz`
Full list of changes
--------------------

View File

@ -26,7 +26,8 @@ Configuration variables:
- **name** (**Required**, string): This is the name of the node. It
should always be unique in your ESPHome network. May only contain lowercase
characters, digits and hyphens, and can be at most 31 characters long.
characters, digits and hyphens, and can be at most 24 characters long by default, or 31
characters long if ``name_add_mac_suffix`` is ``false``.
See :ref:`esphome-changing_node_name`.
Advanced options:

View File

@ -56,6 +56,9 @@ Configuration variables:
- **command_throttle** (*Optional*, int): minimum time in milliseconds between 2 requests to the device. Default is 0ms
Because some modbus devices limit the rate of requests the interval between sending requests to the device can be modified.
- **update_interval** (*Optional*, :ref:`config-time`): The interval that the sensors should be checked.
Defaults to 60 seconds.
Example
-------

View File

@ -46,8 +46,6 @@ as the color temperature in kelvin will show `0`.
name: "TCS34725 Illuminance"
color_temperature:
name: "TCS34725 Color Temperature"
gain: 1x
integration_time: 2.4ms
glass_attenuation_factor: 1.0
address: 0x29
update_interval: 60s

View File

@ -273,82 +273,22 @@ Configuration variables:
Home Assistant Configuration
----------------------------
This component will not show up in the Home Assistant front-end (Overview) automatically because
Home Assistant does not support steppers natively.
You can add the stepper component code below to your Home Assistant configuration (``configuration.yaml``) to
be able to control the stepper from the front-end.
The easiest way to control your stepper from Home Assistant is to add a ``number`` to your ESPHome
configuration. See :ref:`Number <config-number>` for more information.
.. code-block:: yaml
# Add a slider control to Home Assistant to set an integer value
input_number:
stepper_control:
number:
- platform: template
name: Stepper Control
initial: 0
min: -1000
max: 1000
min_value: -100
max_value: 100
step: 1
mode: slider
# Do something when the slider changes
automation:
- alias: Write Stepper Value to ESP
trigger:
platform: state
entity_id: input_number.stepper_control
action:
# Replace livingroom with the name you gave the ESP
- service: esphome.livingroom_control_stepper
data_template:
target: '{{ trigger.to_state.state | int }}'
In the above code, "stepper_control" is the ID of a numeric input field. It must be unique and it is
used in the automation section as a reference name. The display name for this field is in
stepper_control's ``name`` key.
If you want your user interface to give you more control over your stepper controller, such as
setting the acceleration, deceleration, etc, then you can add more input fields after ``stepper_control``
but before ``automation``. They can be a simple number-entry field (mode: box) or a slider like this.
Each of these extra input fields needs an associated input parameter defined on the ESPHome device's
API service.
The automation section tells Home Assistant what to do when the slider changes. It needs a trigger
(state of the ``stepper_control`` slider) and an action. In the trigger section, ``entity_id`` must refer
back to the configuration ID that triggers the automation. For us, that is the ``stepper_control``
field in the ``input_number`` item. That's why the value is ``input_number.stepper_control``.
In the action section, the service name is vital to get right: it's the glue that connects Home Automation's
front-end to the ESPHome device configuration. While you might expect the syntax to be ``esphome.<your_device>.<api_service>``,
the correct syntax is to join the device ID to the API service ID with an underscore,
as in ``esphome.livingroom_control_stepper`` where "Livingroom" is a device in ESPHome and "control_stepper" is an
API service for that device.
The template string is used to get the "state" value from the ``target`` field (defined in the target section) on the
``input_number`` component of the Home Assistant front-end. This value is then passed to the API service as defined in
the ESPHome device's configuration. The ``data_template`` section lists one value for each of the input parameters on
the service being called by the automation. In our case, the ESPHome device has an API service with a single parameter,
"target". If you called this "my_target", then the last line above should be ``my_target: '{{ trigger.to_state.state | int }}'``.
Getting this linkage right is very important.
The following code needs to go in the ESPHome configuration file for this device. Above, we mention "API service"
a lot. This code is where that is defined. You may have already added it (or something similar). Note
that the input variable for the ``control_stepper`` service is called ``target``. That's what matches with the
automation configuration above. Also note that the variable ``target`` is defined as an integer. That means it
must be an integer number, not a string.
.. code-block:: yaml
# ESPHome configuration
api:
services:
- service: control_stepper
variables:
target: int
set_action:
then:
- stepper.set_target:
id: my_stepper
target: !lambda 'return target;'
target: !lambda 'return x;'
stepper:
- platform: ...

View File

@ -30,7 +30,7 @@ With Home Assistant 2021.6 or newer, entity state attributes can also be importe
Configuration variables:
------------------------
- **name** (**Required**, string): The name of the text sensor.
- **name** (*Optional*, string): The name of the text sensor.
- **entity_id** (**Required**, string): The entity ID to import from Home Assistant.
- **attribute** (*Optional*, string): The name of the state attribute to import from the
specified entity. The entity state is used when this option is omitted.

View File

@ -57,7 +57,9 @@ This powerful automation can be used to run automations at specific intervals at
specific times of day. The syntax is a subset of the `crontab <https://crontab.guru/>`__ syntax.
There are two ways to specify time intervals: Either with using the ``seconds:``, ``minutes:``, ...
keys as seen below or using a cron expression like ``* /5 * * * *``.
keys as seen below or using a cron alike expression like ``* /5 * * * *``.
Be aware normal cron implementations does not know about seconds like this esphome implementation, therefore you got 6 fields (seconds,minutes,hours,dayofmonth,month,dayofweek).
Basically, the automation engine looks at your configured time schedule every second and
evaluates if the automation should run.

View File

@ -5,7 +5,7 @@ Generic Sonoff
:description: Instructions for using generic Sonoff devices with ESPHome.
:image: sonoff.svg
In principle ESPHome supports all Sonoff devices, but as these devices are quite cheap
ESPHome supports Sonoff devices with ESP based chips inside, but as these devices are quite cheap
and shipping from China takes a long time, I've only set up dedicated guides for the
:doc:`Sonoff S20 <sonoff_s20>` and :doc:`Sonoff 4CH <sonoff_4ch>`.

View File

@ -845,7 +845,7 @@ This can't be used in a lambda as it would block all functioning of the device.
This :ref:`condition <config-condition>` allows you to check if a given script is running.
In case scripts are run in ``parallel``, this condition only tells you if at least one script
of the given id is running, not how many.
of the given id is running, not how many. Not designed for use with :ref:`while <while_action>`, instead try :ref:`script.wait <script-wait_action>`.
.. code-block:: yaml

View File

@ -219,7 +219,7 @@ Contributors
- `Mickaël Le Baillif (@demikl) <https://github.com/demikl>`__
- `Dennis (@dennisvbussel) <https://github.com/dennisvbussel>`__
- `dentra (@dentra) <https://github.com/dentra>`__
- `Davide Depau (@Depau) <https://github.com/Depau>`__
- `Davide Depau (@depau) <https://github.com/depau>`__
- `dependabot[bot] (@dependabot[bot]) <https://github.com/dependabot[bot]>`__
- `Joeri Colman (@depuits) <https://github.com/depuits>`__
- `Destix (@Destix) <https://github.com/Destix>`__
@ -390,6 +390,8 @@ Contributors
- `imgbot[bot] (@imgbot[bot]) <https://github.com/imgbot[bot]>`__
- `ImSorryButWho (@ImSorryButWho) <https://github.com/ImSorryButWho>`__
- `Lorenzo Ortiz (@Infinitte) <https://github.com/Infinitte>`__
- `Dom (@Ing-Dom) <https://github.com/Ing-Dom>`__
- `Ingurum (@Ingurum) <https://github.com/Ingurum>`__
- `Ivo Roefs (@Ironirc) <https://github.com/Ironirc>`__
- `irtimaled (@irtimaled) <https://github.com/irtimaled>`__
- `Ingo Theiss (@itn3rd77) <https://github.com/itn3rd77>`__
@ -662,7 +664,6 @@ Contributors
- `Otto Winter (@OttoWinter) <https://github.com/OttoWinter>`__
- `Ben Owen (@owenb321) <https://github.com/owenb321>`__
- `Oxan van Leeuwen (@oxan) <https://github.com/oxan>`__
- `Pack3tL0ss (@Pack3tL0ss) <https://github.com/Pack3tL0ss>`__
- `Pablo Clemente Maseda (@paclema) <https://github.com/paclema>`__
- `Derrick Lyndon Pallas (@pallas) <https://github.com/pallas>`__
- `Panuruj Khambanonda (PK) (@panuruj) <https://github.com/panuruj>`__
@ -753,7 +754,6 @@ Contributors
- `sherbang (@sherbang) <https://github.com/sherbang>`__
- `Shish (@shish) <https://github.com/shish>`__
- `SiliconAvatar (@SiliconAvatar) <https://github.com/SiliconAvatar>`__
- `SirSydom (@SirSydom) <https://github.com/SirSydom>`__
- `Derek Hageman (@Sizurka) <https://github.com/Sizurka>`__
- `Stephen Tierney (@sjtrny) <https://github.com/sjtrny>`__
- `Niklas Wagner (@Skaronator) <https://github.com/Skaronator>`__
@ -896,4 +896,4 @@ Contributors
- `Zack Barett (@zsarnett) <https://github.com/zsarnett>`__
- `Christian Zufferey (@zuzu59) <https://github.com/zuzu59>`__
*This page was last updated October 26, 2022.*
*This page was last updated November 1, 2022.*