Merge pull request #2527 from esphome/bump-2022.12.0

2022.12.0
This commit is contained in:
Jesse Hills 2022-12-14 17:06:45 +13:00 committed by GitHub
commit c2c7363d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 430 additions and 39 deletions

View File

@ -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.11.5
PROJECT_NUMBER = 2022.12.0
# 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

View File

@ -1,5 +1,5 @@
ESPHOME_PATH = ../esphome
ESPHOME_REF = 2022.11.5
ESPHOME_REF = 2022.12.0
.PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1 +1 @@
2022.11.5
2022.12.0

195
changelog/2022.12.0.rst Normal file
View File

@ -0,0 +1,195 @@
ESPHome 2022.12.0 - 14th December 2022
======================================
.. seo::
:description: Changelog for ESPHome 2022.12.0.
:image: /_static/changelog-2022.12.0.png
:author: Jesse Hills
:author_twitter: @jesserockz
.. imgtable::
:columns: 3
ESP32, components/esp32, esp32.svg
Bluetooth Proxy, components/bluetooth_proxy, bluetooth.svg
SN74HC165 I/O Expander, components/sn74hc165, sn74hc595.jpg
The festive holidays are coming early and bring you an ESPHome release 1 week earlier than normal.
This release does not bring a bunch of new components like most releases, but instead the focus
has been on upgrading the core Arduino and ESP-IDF versions used for the ESP32 based devices.
Ethernet
--------
Because these core upgrade have aligned the version of ESP-IDF under the hood, ``ethernet``
is now able to be used when specifying ESP-IDF as your framework of choice.
Bluetooth Proxy
---------------
The Bluetooth Proxy has also had a whole lot of work done by :ghuser:`bdraco` under the hood to
improve the stability, speed and reliability between Home Assistant and the bluetooth devices
that get proxied through. Along with some of these bluetooth changes is a change to the
underlying flash partition table that ESPHome uses. OTA will work, but to fully take advantage
of the performance increases for bluetooth, it is best to at least one serial flash with ESPHome
2022.12.0 or later.
Full list of changes
--------------------
New Features
^^^^^^^^^^^^
- PID Climate - deadband and output sampling :esphomepr:`3254` by :ghuser:`patrickcollins12` (new-feature)
New Components
^^^^^^^^^^^^^^
- Add sn74hc165 input shift register :esphomepr:`4151` by :ghuser:`jesserockz` (new-integration)
Breaking Changes
^^^^^^^^^^^^^^^^
- Update esp32 arduino and platform versions :esphomepr:`3564` by :ghuser:`jesserockz` (notable-change) (breaking-change)
Beta Changes
^^^^^^^^^^^^
- Fix ble parsing with zero padded advertisements :esphomepr:`4162` by :ghuser:`jesserockz`
- Increase watchdog timeout when starting OTA :esphomepr:`4172` by :ghuser:`jesserockz`
- Bump esphome-dashboard to 20221213.0 :esphomepr:`4176` by :ghuser:`jesserockz`
- Remove internal pin restriction from cd74hc4067 :esphomepr:`4179` by :ghuser:`jesserockz`
- Speed up bluetooth proxy connections when using esp-idf :esphomepr:`4171` by :ghuser:`bdraco` (notable-change)
- Remove warnings when falling through switch cases on purpose :esphomepr:`4181` by :ghuser:`jesserockz`
- Revert camera config change for esp-idf :esphomepr:`4182` by :ghuser:`jesserockz`
Notable Changes
^^^^^^^^^^^^^^^
- Update esp32 arduino and platform versions :esphomepr:`3564` by :ghuser:`jesserockz` (notable-change) (breaking-change)
- Update ESP-IDF and platform version :esphomepr:`3565` by :ghuser:`jesserockz` (notable-change)
- Speed up bluetooth proxy connections when using esp-idf :esphomepr:`4171` by :ghuser:`bdraco` (notable-change)
All changes
^^^^^^^^^^^
- Bump colorama from 0.4.5 to 0.4.6 :esphomepr:`4010` by :ghuser:`dependabot[bot]`
- Bump frenck/action-yamllint from 1.3.0 to 1.3.1 :esphomepr:`4011` by :ghuser:`dependabot[bot]`
- add two new icons :esphomepr:`3963` by :ghuser:`nagyrobi`
- Move CONF_INTERRUPT_PIN to const.py :esphomepr:`4014` by :ghuser:`jesserockz`
- Bump pyupgrade from 3.2.0 to 3.2.2 :esphomepr:`4017` by :ghuser:`dependabot[bot]`
- Add reset_reason text sensor to debug component :esphomepr:`3814` by :ghuser:`kuba2k2`
- remove unused variable last_save in total_daily_energy :esphomepr:`4039` by :ghuser:`bkaufx`
- Bump base image versions to latest :esphomepr:`4016` by :ghuser:`jesserockz`
- Add number device class support :esphomepr:`4042` by :ghuser:`frenck`
- Update esp32 arduino and platform versions :esphomepr:`3564` by :ghuser:`jesserockz` (notable-change) (breaking-change)
- Update esp32 boards list :esphomepr:`4056` by :ghuser:`jesserockz`
- Add Lolin S2 Mini board :esphomepr:`3264` by :ghuser:`jhamhader`
- Add pin aliases for upesy boards :esphomepr:`3794` by :ghuser:`uPesy`
- Bump pylint from 2.15.5 to 2.15.6 :esphomepr:`4058` by :ghuser:`dependabot[bot]`
- fix display_menu recursive schema gen :esphomepr:`4045` by :ghuser:`glmnet`
- Remove manual handling of ethernet power pin :esphomepr:`4062` by :ghuser:`jesserockz`
- Bump aioesphomeapi from 11.4.3 to 12.0.0 :esphomepr:`4070` by :ghuser:`dependabot[bot]`
- Update ESP-IDF and platform version :esphomepr:`3565` by :ghuser:`jesserockz` (notable-change)
- Always use brackets around single log macros :esphomepr:`4072` by :ghuser:`jesserockz`
- Midea ir templatable code :esphomepr:`4053` by :ghuser:`reidprojects`
- Boards: Adafruit QT Py ESP32 Pico/C3/S2 :esphomepr:`4064` by :ghuser:`jenscski`
- Dont set esp32 pin drive strength unless pin is set for output :esphomepr:`4075` by :ghuser:`jesserockz`
- Don't allow debug component if you don't have at least debug logging level :esphomepr:`4076` by :ghuser:`jesserockz`
- Remove a bunch of unnecessary pylint disabling :esphomepr:`4079` by :ghuser:`jesserockz`
- Update ESP32-audioI2S library :esphomepr:`4073` by :ghuser:`jesserockz`
- Add vector includes :esphomepr:`4080` by :ghuser:`jesserockz`
- Allow manually specifying binary file to OTA :esphomepr:`4054` by :ghuser:`jesserockz`
- Fix regressed 'esphome run' :esphomepr:`4094` by :ghuser:`mmakaay`
- Make parse_characteristics and parse_descriptors lazy to reduce memory pressure :esphomepr:`4063` by :ghuser:`bdraco`
- Speed up BLE connections :esphomepr:`4093` by :ghuser:`bdraco`
- Align BLE service logging :esphomepr:`4095` by :ghuser:`bdraco`
- Suppress logging unhandled ESP_BLE_AD_TYPE_INT_RANGE :esphomepr:`4096` by :ghuser:`bdraco`
- Make sure all BLE address strings are uppercase :esphomepr:`4097` by :ghuser:`bdraco`
- Add logging for BLE connection slots :esphomepr:`4098` by :ghuser:`bdraco`
- Fix registering for gatt notify when characteristic only support indicate :esphomepr:`4092` by :ghuser:`bdraco`
- Fix descriptors not being deleted :esphomepr:`4104` by :ghuser:`bdraco`
- Improve reliability of bluetooth active connections :esphomepr:`4049` by :ghuser:`bdraco`
- Always use generated api options from aioesphomeapi :esphomepr:`4116` by :ghuser:`jesserockz`
- Fix bluetooth_gatt_write_descriptor never getting a response :esphomepr:`4112` by :ghuser:`bdraco`
- Combine the scanner failure check so we only stop the scanner once :esphomepr:`4111` by :ghuser:`bdraco`
- Reduce memory needed to send the services list :esphomepr:`4110` by :ghuser:`bdraco`
- Avoid parsing characteristics and descriptors to reduce memory pressure :esphomepr:`4109` by :ghuser:`bdraco`
- Send device address type alongside ble advertisements :esphomepr:`4115` by :ghuser:`jesserockz`
- Remove uuid lookups from BLE read/write/notify characteristics :esphomepr:`4102` by :ghuser:`bdraco`
- Active BLE connection v3 :esphomepr:`4113` by :ghuser:`bdraco`
- preprocess out proto_enum_to_string if not needed :esphomepr:`4119` by :ghuser:`jesserockz`
- Bump aioesphomeapi from 12.0.0 to 12.2.0 :esphomepr:`4120` by :ghuser:`dependabot[bot]`
- Avoid parsing services with v3 connections without cache :esphomepr:`4117` by :ghuser:`bdraco`
- FIX: Unnecessary flash writes by ModbusSwitch component :esphomepr:`3648` by :ghuser:`jpeletier`
- Speed up uuid parsing when fetching the service list :esphomepr:`4121` by :ghuser:`bdraco`
- modbus_switch: honor switch:restore_mode :esphomepr:`4122` by :ghuser:`jpeletier`
- PID Climate - deadband and output sampling :esphomepr:`3254` by :ghuser:`patrickcollins12` (new-feature)
- Allow auto setting of ble client id if there is only 1 in config :esphomepr:`4125` by :ghuser:`jesserockz`
- fix RESTORE_INVERTED switch:restore_mode :esphomepr:`4129` by :ghuser:`jpeletier`
- Bump pylint from 2.15.6 to 2.15.7 :esphomepr:`4127` by :ghuser:`dependabot[bot]`
- Allow global setting of compile process limit :esphomepr:`4081` by :ghuser:`jesserockz`
- Bump flake8 from 5.0.4 to 6.0.0 :esphomepr:`4084` by :ghuser:`dependabot[bot]`
- Bump arduino pico and update wifi methods :esphomepr:`4144` by :ghuser:`jesserockz`
- Bump aioesphomeapi from 12.2.0 to 12.2.1 :esphomepr:`4133` by :ghuser:`dependabot[bot]`
- Bump esptool from 3.3.1 to 4.4 :esphomepr:`4071` by :ghuser:`dependabot[bot]`
- Fix mismatched flake8 version in pre-commit :esphomepr:`4145` by :ghuser:`jesserockz`
- Detect BLE stack unrecoverable state :esphomepr:`4128` by :ghuser:`bdraco`
- Bump pylint from 2.15.7 to 2.15.8 :esphomepr:`4148` by :ghuser:`dependabot[bot]`
- Fix crash with bluetooth tracker and esp-idf :esphomepr:`4140` by :ghuser:`bdraco`
- Use ENTITY_CATEGORY_CONFIG for sprinkler config switches. :esphomepr:`4141` by :ghuser:`schinckel`
- fix switch initialization :esphomepr:`4153` by :ghuser:`ssieb`
- Change 4 chip limit on sn74hc595 to 256 :esphomepr:`4108` by :ghuser:`jesserockz`
- Add reports fahrenheit to tuya climate :esphomepr:`4032` by :ghuser:`jesserockz`
- Allow dashboard import to pull complete file from github :esphomepr:`3982` by :ghuser:`jesserockz`
- Invalid config for waveshare models with no full_update_every :esphomepr:`4066` by :ghuser:`Nizzle`
- Add sn74hc165 input shift register :esphomepr:`4151` by :ghuser:`jesserockz` (new-integration)
- Fixed deep sleep for ESP32C3 :esphomepr:`4143` by :ghuser:`pistifonok`
- ESP32 IDF: Override toolchain-esp32ulp with espressifs own published version :esphomepr:`4155` by :ghuser:`jesserockz`
- Add API for dashboard to get boards list :esphomepr:`4154` by :ghuser:`jesserockz`
- Bump pytest-asyncio from 0.20.1 to 0.20.2 :esphomepr:`4019` by :ghuser:`dependabot[bot]`
- Bump pyupgrade from 3.2.2 to 3.3.0 :esphomepr:`4137` by :ghuser:`dependabot[bot]`
- Bump dessant/lock-threads from 3 to 4 :esphomepr:`4150` by :ghuser:`dependabot[bot]`
- Bump aioesphomeapi from 12.2.1 to 13.0.1 :esphomepr:`4149` by :ghuser:`dependabot[bot]`
- Bump esphome-dashboard to 20221207.0 :esphomepr:`4156` by :ghuser:`jesserockz`
- Fix ble parsing with zero padded advertisements :esphomepr:`4162` by :ghuser:`jesserockz`
- Increase watchdog timeout when starting OTA :esphomepr:`4172` by :ghuser:`jesserockz`
- Bump esphome-dashboard to 20221213.0 :esphomepr:`4176` by :ghuser:`jesserockz`
- Remove internal pin restriction from cd74hc4067 :esphomepr:`4179` by :ghuser:`jesserockz`
- Speed up bluetooth proxy connections when using esp-idf :esphomepr:`4171` by :ghuser:`bdraco` (notable-change)
- Remove warnings when falling through switch cases on purpose :esphomepr:`4181` by :ghuser:`jesserockz`
- Revert camera config change for esp-idf :esphomepr:`4182` by :ghuser:`jesserockz`
Past Changelogs
---------------
- :doc:`2022.11.0`
- :doc:`2022.10.0`
- :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`

View File

@ -2,7 +2,7 @@ Changelog
=========
.. redirect::
:url: /changelog/2022.11.0.html
:url: /changelog/2022.12.0.html
.. toctree::
:glob:

View File

@ -184,6 +184,7 @@ Configuration variables:
.. note::
- See :ref:`Transmit Midea<remote_transmitter-transmit_midea>` to send custom commands, including Follow Me mode.
- See :ref:`Toshiba<toshiba>` below if you are looking for compatibility with Midea model MAP14HS1TBL or similar.

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -42,12 +42,17 @@ but there's a nice article explaining the function principle `here <https://blog
kp: 0.49460
ki: 0.00487
kd: 12.56301
output_averaging_samples: 5 # smooth the output over 5 samples
derivative_averaging_samples: 5 # smooth the derivative value over 10 samples
deadband_parameters:
threshold_high: 0.5°C # deadband within +/-0.5°C of target_temperature
threshold_low: -0.5°C
Configuration variables:
------------------------
- **sensor** (**Required**, :ref:`config-id`): The sensor that is used to measure the current
temperature.
temperature.
- **default_target_temperature** (**Required**, float): The default target temperature (setpoint)
for the control algorithm. This can be dynamically set in the frontend later.
- **heat_output** (*Optional*, :ref:`config-id`): The ID of a :ref:`float output <config-output>`
@ -67,6 +72,38 @@ Configuration variables:
``ki`` to prevent windup. Defaults to ``-1``.
- **max_integral** (*Optional*, float): The minimum value of the integral term multiplied by
``ki`` to prevent windup. Defaults to ``1``.
- **starting_integral_term** (*Optional*, float): Set the initial output, by priming the integral
term. This is useful for when your system is rebooted and you don't want to wait
for it to get back equilibrium.
- **output_averaging_samples** (*Optional*, int): average the output over this many samples. PID controllers
can be quite sensitive to small changes on the input sensor. By averaging the last X output samples,
the temperature can be more stable. However, the larger the sampling window, the less responsive the
PID controller. Defaults to ``1`` which is no sampling/averaging.
- **derivative_averaging_samples** (*Optional*, int): average the derivative term over this many samples. Many
controllers don't use the derivative term because it is sensitive to slight changes in the input sensor.
By taking an average of the derivative term it might become more useful for you. Most PID controllers call
this derivative filtering. The derivative term is used to pre-act so don't filter too much. Defaults to ``1``
which is no sampling/averaging.
- **deadband_parameters** (*Optional*): Enables a deadband to stabilise and minimise changes in the
output when the temperature is close to the target temperature. See `Deadband Setup`_.
- **threshold_low/threshold_high** (**Required**, float): Specifies a high/low
threshold defining the deadband
around the target temperature. For instance with `default_target_temperature` of ``21°C`` and
thresholds of ``+/-0.5°C``, the deadband will be
between ``20.5°C - 21.5°C``. The PID controller will limit output changes within the deadband.
- **kp_multiplier** (**Optional**, float): Set the ``kp`` gain when inside the deadband. Defaults to ``0``.
- **ki_multiplier** (**Optional**, float): Set the ``ki`` gain when inside the deadband. Defaults to ``0``.
- **kd_multiplier** (**Optional**, float): Set the ``kd`` gain when inside the deadband. Recommended this
is set to 0. Defaults to ``0``.
- **deadband_output_averaging_samples** (**Optional**, int): Typically when inside the deadband the PID Controller has
reached a state of equilibrium, so it advantageous to use a higher number of output samples
like 10-30 samples. Defaults to ``1`` which is no sampling/averaging.
- All other options from :ref:`Climate <config-climate>`.
@ -89,6 +126,76 @@ To set up a PID climate controller, you need a couple of components:
The sensor should have a short update interval. The PID update frequency is tied to the update
interval of the sensor. Set a short ``update_interval`` like ``5s`` on the sensor.
We recommend putting a filter on the sensor (see filters in :doc:`/components/sensor/index`) and
using ``output_averaging_samples`` to calm the PID sensor from a noisy input sensor.
Deadband Setup
--------------
A deadband is used to prevent the PID controller from further adjusting the power
once the temperature has settled within a range of the target temperature.
We do this by specifying a high/low threshold of the target temperature.
To understand the benefit, consider a heating/cooling HVAC which is constantly
oscillating between heating and cooling as the thermostat records very minor
changes from +0.1º to -0.1º. Clearly this is undesirable and will cause wear
and tear as the HVAC oscillates. With a deadband in place the heater won't
activate until the thermostat breaches the low_threshold and the cooler won't activate
until the thermostat breaches the high_threshold.
The most basic setup specifies the threshold around the target temperature as follows:
.. code-block:: yaml
default_target_temperature: 21°C
...
deadband_parameters:
threshold_high: 0.5°C
threshold_low: -1.0°C
In this example the deadband is between ``20.0°C - 21.5°C``. The PID controller will limit any output
variation inside this deadband. How it limits depends on how you set the `Deadband Multipliers`_.
.. figure:: images/deadband1.png
Deadband Multipliers
********************
Deadband Multipliers tell the controller how to operate when inside of the deadband.
Each of the p,i and d terms can be controlled using the kp, ki and kd multipliers. For instance, if the kp_multiplier
is set to 0.05 then the final proportional term will be set to 5% of its normal value within the deadband.
If all of the multipliers are set to 0, then the controller will not adjust power at all within the
deadband. This is the default behavior.
Most deadband implementations set kp and ki multipliers to a small gain like ``0.05`` and set
derivative to 0. This means that the PID output will calmly make minor adjustments over a 20x longer
timeframe to stay within the deadband zone.
To start with we recommend just setting the ``ki_multiplier`` to ``0.05`` (5%). Then
set ``kp_multiplier`` to ``0.05`` (5%) if the controller is falling out of the deadband too often.
.. code-block:: yaml
default_target_temperature: 21°C
...
deadband_parameters:
threshold_high: 0.5°C
threshold_low: -1.0°C
kp_multiplier: 0.0 # proportional gain turned off inside deadband
ki_multiplier: 0.05 # integral accumulates at only 5% of normal ki
kd_multiplier: 0.0 # derviative is turned off inside deadband
deadband_output_averaging_samples: 15 # average the output over 15 samples within the deadband
.. figure:: images/deadband2.png
Deadband Output Averaging Samples
*********************************
Since we expect the PID Controller to be at equilibrium while inside the deadband, we can
average the output over a longer range of samples, like 15 samples. This helps even further
with temperature and controller stability.
.. _pid-autotune:
Autotuning

View File

@ -60,6 +60,7 @@ Configuration variables:
- **temperature_multiplier** (*Optional*, float): A multiplier to modify the incoming and outgoing temperature values - :ref:`see below <temperature-multiplier>`.
- **eco_datapoint** (*Optional*, int): The datapoint id number of the eco mode state.
- **eco_temperature** (*Optional*, float): The target temperature the controller uses while the eco mode is active.
- **reports_fahrenheit** (*Optional*, boolean): Set to ``true`` if the device reports temperatures in Fahrenheit. ESPHome expects all climate temperatures to be in Celcius, otherwise unexpected conversions will take place when it is published to Home Assistant. Defaults to ``false``.
If the device has different multipliers for current and target temperatures, **temperature_multiplier** can be replaced with both of:

View File

@ -25,6 +25,8 @@ ESP heap memory (free space, maximum free block size and fragmentation level) an
- platform: debug
device:
name: "Device Info"
reset_reason:
name: "Reset Reason"
sensor:
- platform: debug
@ -70,6 +72,13 @@ Configuration variables:
- **name** (**Required**, string): The name of the sensor.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
- **reset_reason** (*Optional*): Reports the last reboot reason in a human-readable form.
Accepts these options:
- **name** (**Required**, string): The name of the sensor.
- All other options from :ref:`Text Sensor <config-text_sensor>`.
Sensor
-------
Configuration variables:

View File

@ -48,6 +48,9 @@ Configuration variables:
See https://developers.home-assistant.io/docs/core/entity/number/#properties
for a list of available options. Requires Home Assistant Core 2021.12 or newer.
Defaults to ``"auto"``.
- **device_class** (*Optional*, string): The device class for the number.
See https://developers.home-assistant.io/docs/core/entity/number/#available-device-classes
for a list of available options.
Automations:

View File

@ -207,10 +207,16 @@ This :ref:`action <config-action>` sends a 40-bit Midea code to a remote transmi
on_...:
- remote_transmitter.transmit_midea:
code: [0xA2, 0x08, 0xFF, 0xFF, 0xFF]
on_...:
- remote_transmitter.transmit_midea:
code: !lambda |-
// Send a FollowMe code with the current temperature.
return {0xA4, 0x82, 0x48, 0x7F, (uint8_t)(id(temp_sensor).state + 1)};
Configuration variables:
- **code** (**Required**, list): The 40-bit Midea code to send as a list of hex or integers.
- **code** (**Required**, list, :ref:`templatable <config-templatable>`): The 40-bit Midea code to send as a list of hex or integers.
- All other options from :ref:`remote_transmitter-transmit_action`.
``remote_transmitter.transmit_nec`` Action

66
components/sn74hc165.rst Normal file
View File

@ -0,0 +1,66 @@
SN74HC165 I/O Expander (shift register)
=======================================
.. seo::
:description: Instructions for setting up SN74HC165 shift registers as digital port expanders in ESPHome.
The SN74HC165 component allows you to use SN74HC165 shift registers as I/O expanders (Input only, use SN74HC595 for outputs)
(`datasheet <https://www.ti.com/lit/ds/symlink/sn74hc165.pdf>`__) in ESPHome. It uses 3 wires (optionally 4) for communication.
Once configured, you can use any of the 8 pins for your projects. Up-to 256 shift registers can be daisy-chained
to provide more pins, without using more GPIO pins on the controller. They are linked by connecting pin Q of the closer
shift register to the pin QH of the next shift register.
.. code-block:: yaml
# Example configuration entry
sn74hc165:
- id: sn74hc165_hub
clock_pin: GPIO16
data_pin: GPIO17
load_pin: GPIO4
clock_inhibit_pin: GPIO18
sr_count: 2
# Individual inputs
binary_sensor:
- platform: gpio
name: "SN74HC165 Pin #0"
pin:
sn74hc595: sn74hc165_hub
# Use pin number 0
number: 0
inverted: false
Configuration variables:
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC165 component.
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Serial Output (QH) input.
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock (CLK) pin
- **load_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Load input (SH/LD) pin
- **clock_inhibit_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC165 Clock Inhibit (CLK INH) pin
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``.
Pin configuration variables:
****************************
- **SN74HC165** (**Required**, :ref:`config-id`): The id of the SN74HC165 component of the pin.
- **number** (**Required**, int): The pin number.
- **inverted** (*Optional*, boolean): If received value should be treated as inverted.
Defaults to ``false``.
.. note::
Pin number 0 is Pin A on the SN74HC165 that is furthest away from the microcontroller.
See Also
--------
- :doc:`binary_sensor/gpio`
- :apiref:`SN74HC165/SN74HC165.h`
- :ghedit:`Edit`

View File

@ -8,7 +8,7 @@ The SN74HC595 component allows you to use SN74HC595 shift registers as I/O expan
(`datasheet <http://www.ti.com/lit/ds/symlink/sn74hc595.pdf>`__,
`SparkFun`_) in ESPHome. It uses 3 wires (optionally 4) for communication.
Once configured, you can use any of the 8 pins for your projects. Up-to 4 shift registers can be daisy-chained
Once configured, you can use any of the 8 pins for your projects. Up-to 256 shift registers can be daisy-chained
to provide more pins, without using more GPIO pins on the controller.
Use of the OE pin is optional. If used, the pin should be pulled up externally.
@ -50,7 +50,7 @@ Configuration variables:
- **clock_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 SRCLK (SH_CP) pin
- **latch_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 RCLK (ST_CP) pin
- **oe_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 OE pin
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 4. Defaults to ``1``.
- **sr_count** (*Optional*, int): Number of daisy-chained shift registers, up-to 256. Defaults to ``1``.
Pin configuration variables:

View File

@ -28,17 +28,6 @@ Configuration variables:
GPIO pin to use for the switch.
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **restore_mode** (*Optional*): Control how the GPIO Switch attempts to restore state on bootup.
For restoring on ESP8266s, also see ``restore_from_flash`` in the
:doc:`esp8266 section </components/esp8266>`.
- ``RESTORE_DEFAULT_OFF`` (Default) - Attempt to restore state and default to OFF if not possible to restore.
- ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON.
- ``RESTORE_INVERTED_DEFAULT_OFF`` - Attempt to restore state inverted from the previous state and default to OFF.
- ``RESTORE_INVERTED_DEFAULT_ON`` - Attempt to restore state inverted from the previous state and default to ON.
- ``ALWAYS_OFF`` - Always initialize the pin as OFF on bootup.
- ``ALWAYS_ON`` - Always initialize the pin as ON on bootup.
- **interlock** (*Optional*, list): A list of other GPIO switches in an interlock group. See
:ref:`switch-gpio-interlocking`.
- **interlock_wait_time** (*Optional*, :ref:`config-time`): For interlocking mode, set how long

View File

@ -31,6 +31,22 @@ Configuration variables:
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
a ``name`` will implicitly set this to true.
- **restore_mode** (*Optional*): Control how the switch attempts to restore state on bootup.
**NOTE** : Not all components consider **restore_mode**. Check the documentation of the specific component to understand how
this feature works for a particular component or device.
For restoring on ESP8266s, also see ``restore_from_flash`` in the
:doc:`esp8266 section </components/esp8266>`.
- ``RESTORE_DEFAULT_OFF`` - Attempt to restore state and default to OFF if not possible to restore.
- ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON.
- ``RESTORE_INVERTED_DEFAULT_OFF`` - Attempt to restore state inverted from the previous state and default to OFF.
- ``RESTORE_INVERTED_DEFAULT_ON`` - Attempt to restore state inverted from the previous state and default to ON.
- ``ALWAYS_OFF`` - Always initialize the switch as OFF on bootup.
- ``ALWAYS_ON`` - Always initialize the switch as ON on bootup.
- ``DISABLED`` - Does nothing and leaves it up to the downstream platform component to decide. For example, the component could read hardware and determine the state, or have a specific configuration option to regulate initial state.
Unless a specific platform defines another default value, the default is ``RESTORE_DEFAULT_OFF``.
- **on_turn_on** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when the switch is turned on. See :ref:`switch-on_turn_on_off_trigger`.
- **on_turn_off** (*Optional*, :ref:`Action <config-action>`): An automation to perform

View File

@ -13,6 +13,9 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **name** (**Required**, string): The name of the sensor.
- **restore_mode** (*Optional*): See :ref:`Switch <config-switch>`, since this configuration variable is inherited. The default value for this setting is ``DISABLED`` (recommended).
``DISABLED`` leaves the initial state up to the hardware: usually the state lives in the device and ESPHome does not need to remember it. The switch frontend will show an undetermined
state until the real state is retrieved from the device on the next refresh. Use any other setting if a reboot of your ESPHome device is tied to a reboot of the modbus device.
- **register_type** (**Required**): type of the modbus register.
- **address** (**Required**, int): start address of the first register in a range
- **offset** (*Optional*, int): not required in most cases

View File

@ -29,16 +29,6 @@ Configuration variables:
- **output** (**Required**, :ref:`config-id`): The ID of the output component to use.
- **name** (**Required**, string): The name for the switch.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **restore_mode** (*Optional*): Control how the switch attempts to restore state on bootup.
For restoring on ESP8266s, also see ``esp8266_restore_from_flash`` in the
:doc:`esphome section </components/esphome>`.
- ``RESTORE_DEFAULT_OFF`` (Default) - Attempt to restore state and default to OFF if not possible to restore.
- ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON.
- ``RESTORE_INVERTED_DEFAULT_OFF`` - Attempt to restore state inverted from the previous state and default to OFF.
- ``RESTORE_INVERTED_DEFAULT_ON`` - Attempt to restore state inverted from the previous state and default to ON.
- ``ALWAYS_OFF`` - Always initialize the pin as OFF on bootup.
- ``ALWAYS_ON`` - Always initialize the pin as ON on bootup.
- All other options from :ref:`Switch <config-switch>`.

View File

@ -67,9 +67,9 @@ author = "ESPHome"
# built documents.
#
# The short X.Y version.
version = "2022.11"
version = "2022.12"
# The full version, including alpha/beta/rc tags.
release = "2022.11.5"
release = "2022.12.0"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -40,6 +40,7 @@ Example configuration
# This should point to the public location of this yaml file.
dashboard_import:
package_import_url: github://esphome/esphome-project-template/project-template-esp32.yaml@v6
import_full_config: false # or true
wifi:
# Set up a wifi access point
@ -72,9 +73,11 @@ Relevant Documentation
- ``wifi`` -> ``ap`` allows you to flash a device that will not contain any
credentials and they must be set by the user via either the ``ap`` + ``captive_portal`` or
the ``esp32_improv`` / ``improv_serial`` components.
- ``dashboard_import`` -> ``package_import_url`` - This should point to the public repository containing
- ``dashboard_import``
- ``package_import_url`` - This should point to the public repository containing
the configuration for the device so that the user's ESPHome dashboard can autodetect this device and
create a minimal YAML using :ref:`config-git_packages`.
- ``import_full_config`` - This signals if ESPHome should download the entire YAML file as the user's config YAML instead of referencing the package. Set this to `true` if you are creating a tutorial to let users easily tweak the whole configuration or be able to uncomment follow-up tutorial steps.
- ``improv_serial`` - :doc:`/components/improv_serial`
See Also

View File

@ -190,8 +190,6 @@ Contributors
- `Alex Solomaha (@CyanoFresh) <https://github.com/CyanoFresh>`__
- `Luar Roji (@cyberplant) <https://github.com/cyberplant>`__
- `Aleš Komárek (@cznewt) <https://github.com/cznewt>`__
- `d-two (@d-two) <https://github.com/d-two>`__
- `dab0g (@dab0g) <https://github.com/dab0g>`__
- `Dale Higgs (@dale3h) <https://github.com/dale3h>`__
- `damanti-me (@damanti-me) <https://github.com/damanti-me>`__
- `Daniel Bjørnbakk (@danibjor) <https://github.com/danibjor>`__
@ -204,12 +202,10 @@ Contributors
- `Dav-id (@dav-id-org) <https://github.com/dav-id-org>`__
- `DAVe3283 (@DAVe3283) <https://github.com/DAVe3283>`__
- `Dave Richer (@davericher) <https://github.com/davericher>`__
- `davestubbs (@davestubbs) <https://github.com/davestubbs>`__
- `Dave T (@davet2001) <https://github.com/davet2001>`__
- `Dave Wongillies (@davewongillies) <https://github.com/davewongillies>`__
- `David De Sloovere (@DavidDeSloovere) <https://github.com/DavidDeSloovere>`__
- `David Beitey (@davidjb) <https://github.com/davidjb>`__
- `davidmonro (@davidmonro) <https://github.com/davidmonro>`__
- `David Zovko (@davidzovko) <https://github.com/davidzovko>`__
- `Davy Landman (@DavyLandman) <https://github.com/DavyLandman>`__
- `Darren Tucker (@daztucker) <https://github.com/daztucker>`__
@ -449,6 +445,7 @@ Contributors
- `Joe Gross (@joegross) <https://github.com/joegross>`__
- `Johan van der Kuijl (@johanvanderkuijl) <https://github.com/johanvanderkuijl>`__
- `Johboh (@Johboh) <https://github.com/Johboh>`__
- `John Britton (@johndbritton) <https://github.com/johndbritton>`__
- `John Erik Halse (@johnerikhalse) <https://github.com/johnerikhalse>`__
- `John Moxley (@johnmoxley) <https://github.com/johnmoxley>`__
- `JonasEr (@JonasEr) <https://github.com/JonasEr>`__
@ -610,6 +607,7 @@ Contributors
- `mnltake (@mnltake) <https://github.com/mnltake>`__
- `Matt N. (@mnoorenberghe) <https://github.com/mnoorenberghe>`__
- `Moritz Glöckl (@moritzgloeckl) <https://github.com/moritzgloeckl>`__
- `Chris Laplante (@mostthingsweb) <https://github.com/mostthingsweb>`__
- `Matthew Pettitt (@mpettitt) <https://github.com/mpettitt>`__
- `Sam Hughes (@MrEditor97) <https://github.com/MrEditor97>`__
- `Mariusz Kryński (@mrk-its) <https://github.com/mrk-its>`__
@ -643,12 +641,14 @@ Contributors
- `niklasweber (@niklasweber) <https://github.com/niklasweber>`__
- `Niorix (@Niorix) <https://github.com/Niorix>`__
- `Zvonimir Haramustek (@nitko12) <https://github.com/nitko12>`__
- `Dennis (@Nizzle) <https://github.com/Nizzle>`__
- `nldroid (@nldroid) <https://github.com/nldroid>`__
- `Niccolò Maggioni (@nmaggioni) <https://github.com/nmaggioni>`__
- `Jan Sandbrink (@NobodysNightmare) <https://github.com/NobodysNightmare>`__
- `Łukasz Śliwiński (@nonameplum) <https://github.com/nonameplum>`__
- `Greg Johnson (@notgwj) <https://github.com/notgwj>`__
- `nouser2013 (@nouser2013) <https://github.com/nouser2013>`__
- `Stephen Edgar (@ntwb) <https://github.com/ntwb>`__
- `Stanislav Meduna (@numo68) <https://github.com/numo68>`__
- `Nuno Sousa (@nunofgs) <https://github.com/nunofgs>`__
- `Maksym Lunin (@nut-code-monkey) <https://github.com/nut-code-monkey>`__
@ -747,6 +747,7 @@ Contributors
- `Jan Čermák (@sairon) <https://github.com/sairon>`__
- `sascha lammers (@sascha432) <https://github.com/sascha432>`__
- `Søren Christian Aarup (@scaarup) <https://github.com/scaarup>`__
- `Matthew Schinckel (@schinckel) <https://github.com/schinckel>`__
- `Nils Schulte (@Schnilz) <https://github.com/Schnilz>`__
- `Wolle (@schreibfaul1) <https://github.com/schreibfaul1>`__
- `Ville Skyttä (@scop) <https://github.com/scop>`__
@ -886,13 +887,13 @@ Contributors
- `Wolfgang Tremmel (@wtremmel) <https://github.com/wtremmel>`__
- `Wumpf (@Wumpf) <https://github.com/Wumpf>`__
- `wysiwyng (@wysiwyng) <https://github.com/wysiwyng>`__
- `Mike (@xsnoopy) <https://github.com/xsnoopy>`__
- `Yaroslav (@Yarikx) <https://github.com/Yarikx>`__
- `Marcin Jaworski (@yawor) <https://github.com/yawor>`__
- `Pavel (@yekm) <https://github.com/yekm>`__
- `Atsuko Ito (@yottatsa) <https://github.com/yottatsa>`__
- `Nico B (@youknow0) <https://github.com/youknow0>`__
- `Yuval Aboulafia (@yuvalabou) <https://github.com/yuvalabou>`__
- `Björn Stenberg (@zagor) <https://github.com/zagor>`__
- `david reid (@zathras777) <https://github.com/zathras777>`__
- `Zebble (@Zebble) <https://github.com/Zebble>`__
- `ZJY (@zhangjingye03) <https://github.com/zhangjingye03>`__
@ -903,4 +904,4 @@ Contributors
- `Zack Barett (@zsarnett) <https://github.com/zsarnett>`__
- `Christian Zufferey (@zuzu59) <https://github.com/zuzu59>`__
*This page was last updated December 6, 2022.*
*This page was last updated December 14, 2022.*

View File

@ -680,6 +680,7 @@ Misc Components
TCA9548A I²C Multiplexer, components/tca9548a, tca9548a.jpg
MCP23SXX I/O Expander - SPI Bus, components/mcp23Sxx, mcp230xx.svg
SX1509 I/O Expander, components/sx1509, sx1509.jpg
SN74HC165 I/O Expander, components/sn74hc165, sn74hc595.jpg
SN74HC595 I/O Expander, components/sn74hc595, sn74hc595.jpg
SIM800L, components/sim800l, sim800l.jpg
DFPlayer, components/dfplayer, dfplayer.svg