Merge pull request #1130 from esphome/bump-1.17.0

1.17.0
This commit is contained in:
Jesse Hills 2021-05-04 10:53:03 +12:00 committed by GitHub
commit c949a6c93c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
129 changed files with 4654 additions and 1347 deletions

25
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args:
- --safe
- --quiet
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
- pydocstyle==5.1.1
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: no-commit-to-branch
args:
- --branch=current
- --branch=next
- --branch=beta

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 = 1.16.2
PROJECT_NUMBER = 1.17.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 = v1.16.2
ESPHOME_REF = v1.17.0
.PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png

View File

@ -1 +1 @@
1.16.2
1.17.0

View File

@ -2,7 +2,7 @@ Changelog
=========
.. redirect::
:url: /changelog/v1.16.0.html
:url: /changelog/v1.17.0.html
.. toctree::
:glob:

View File

@ -29,7 +29,7 @@ Changelog - Version 1.14.0 - November 1
SGP30, components/sensor/sgp30, sgp30.jpg
Tx20, components/sensor/tx20, tx20.jpg
VL53L0x, components/sensor/vl53l0x, vl53l0x.svg
VL53L0x, components/sensor/vl53l0x, vl53l0x.png
Xiaomi CGG1, components/sensor/xiaomi_cgg1, xiaomi_cgg1.jpg
Xiaomi LYWSD02, components/sensor/xiaomi_lywsd02, xiaomi_lywsd02.jpg
ZyAura, components/sensor/zyaura, zgm053.jpg

199
changelog/v1.17.0.rst Normal file
View File

@ -0,0 +1,199 @@
Changelog - Version 1.17.0 - 4th May 2021
===============================================
.. seo::
:description: Changelog for ESPHome version 1.17.0.
:image: /_static/changelog-1.17.0.png
:author: ESPHome
:author_twitter: @esphome_
.. imgtable::
:columns: 4
Inkbird IBS-TH1 Mini, components/sensor/inkbird_ibsth1_mini, inkbird_isbth1_mini.jpg
MCP4725, components/output/mcp4725, mcp4725.jpg
Xiaomi Miscale, components/sensor/xiaomi_miscale, xiaomi_miscale.jpg
Xiaomi Miscale2, components/sensor/xiaomi_miscale2, xiaomi_miscale2.jpg
Midea Air Conditioner, components/climate/midea_ac, midea.svg
Addressable Light Display, components/display/addressable_light, addressable_light.jpg
Pulse Meter, components/sensor/pulse_meter, pulse.svg
So, ESPHome was acquired by Nabu Casa. That was big and unexpected, but awesome news for the project as now I have been hired
by Nabu Casa full-time to work on ESPHome. I know I said this is the last release, but hopefully now that it is literally
my job, the releases will move to a (yet to be defined) schedule.
A lot of fixes and updates to exisitng components in this release, and a couple of new integrations and features too. Check them out
if you have the hardware but could not use it before.
Hopefully I can get some help and pointers from the Nabu Casa team to tidy up these release notes and make them all fancy and
actually something to look forward to reading.
Jesse
New Features
------------
- esphome: Vl53l0x change address :esphomepr:`1126` by :ghuser:`kkellner` (new-feature)
- esphome: Background calibration & ABC commands for SenseAir S8 :esphomepr:`1623` by :ghuser:`nmaggioni` (new-feature)
- esphome: Add trigger for http actions to receive the status code :esphomepr:`1599` by :ghuser:`jesserockz` (new-feature)
New Integrations
----------------
- esphome: Adding support for the Inkbird IBS-TH1 Mini sensor :esphomepr:`1099` by :ghuser:`fkirill` (new-integration)
- esphome: Add MCP4725 DAC Component :esphomepr:`1418` by :ghuser:`JJK801` (new-integration)
- esphome: Add Xiaomi Miscale v1 and v2 :esphomepr:`1368` by :ghuser:`dckiller51` (new-integration)
- esphome: Add support for the SM300D2 7-in-1 sensor module :esphomepr:`1524` by :ghuser:`moritzgloeckl` (new-integration)
- esphome: Midea climate support :esphomepr:`1328` by :ghuser:`dudanov` (new-integration)
- esphome: Add addressable_light display platform :esphomepr:`1272` by :ghuser:`justfalter` (new-integration) (notable-change)
- esphome: Implement pulse_meter as an improvement on pulse_counter and pulse_width for meters :esphomepr:`1434` by :ghuser:`stevebaxter` (new-integration)
Breaking Changes
----------------
- esphome: MCP23XXX Refactor :esphomepr:`1560` by :ghuser:`jesserockz` (breaking-change)
Notable Changes
---------------
- esphome: Device class attribute for sensor component :esphomepr:`1525` by :ghuser:`marecabo` (notable-change)
- esphome: Add default device classes to sensor components :esphomepr:`1533` by :ghuser:`marecabo` (notable-change)
- esphome: Add addressable_light display platform :esphomepr:`1272` by :ghuser:`justfalter` (new-integration) (notable-change)
All changes
-----------
- esphome: Bump voluptuous from 0.12.0 to 0.12.1 :esphomepr:`1411` by :ghuser:`dependabot[bot]`
- esphome: add http request tests :esphomepr:`1448` by :ghuser:`glmnet`
- esphome: codegen: Lambda improvements :esphomepr:`1476` by :ghuser:`balrog-kun`
- docs: Add options to control pulse duration on Climate_IR_LG Component :docspr:`963` by :ghuser:`mhentschke`
- esphome: Add options to control pulse duration on Climate_IR_LG Component :esphomepr:`1470` by :ghuser:`mhentschke`
- esphome: Adding support for the Inkbird IBS-TH1 Mini sensor :esphomepr:`1099` by :ghuser:`fkirill` (new-integration)
- docs: Adding documentation for Inkbird IBS-TH1 Mini sensor :docspr:`657` by :ghuser:`fkirill`
- esphome: Add config validator location :esphomepr:`1490` by :ghuser:`glmnet`
- esphome: Add MCP4725 DAC Component :esphomepr:`1418` by :ghuser:`JJK801` (new-integration)
- docs: Add MCP4725 docs :docspr:`889` by :ghuser:`JJK801`
- docs: Fix format consistency :docspr:`989` by :ghuser:`glmnet`
- esphome: Added codeowners to max7219digit :esphomepr:`1487` by :ghuser:`rspaargaren`
- esphome: Correct Native API Wire Format Documentation :esphomepr:`1528` by :ghuser:`justin-gerhardt`
- esphome: st7735_conf_fixes :esphomepr:`1530` by :ghuser:`SenexCrenshaw`
- docs: ST7735 Changed configuration items to snake_case :docspr:`1000` by :ghuser:`SenexCrenshaw`
- esphome: Device class attribute for sensor component :esphomepr:`1525` by :ghuser:`marecabo` (notable-change)
- docs: Add doc for device_class attribute of sensor :docspr:`996` by :ghuser:`marecabo`
- docs: Add sleep duration to enter deep sleep action :docspr:`995` by :ghuser:`nuttytree`
- esphome: Add duration option to action start deep sleep :esphomepr:`1526` by :ghuser:`nuttytree`
- esphome: fix substitution losing track of document range :esphomepr:`1547` by :ghuser:`glmnet`
- docs: Update esp32_camera.rst :docspr:`1020` by :ghuser:`lukaszrud`
- docs: Fix format next :docspr:`1023` by :ghuser:`glmnet`
- docs: Add another project to diy.rst :docspr:`1019` by :ghuser:`shish`
- docs: Update esphome-configs URL :docspr:`1018` by :ghuser:`shish`
- docs: Icon is ignored by HA when device class is set :docspr:`1011` by :ghuser:`marecabo`
- docs: Update pid.rst :docspr:`1006` by :ghuser:`boradwell`
- docs: Mention that Hyperion.NG works with E1.31 :docspr:`975` by :ghuser:`rradar`
- esphome: Add Xiaomi Miscale v1 and v2 :esphomepr:`1368` by :ghuser:`dckiller51` (new-integration)
- docs: Add docs for Xiaomi Miscale v1 and v2 :docspr:`1021` by :ghuser:`dckiller51`
- docs: Add missing closing parenthesis in example :docspr:`1029` by :ghuser:`lepinkainen`
- docs: Update Inkplate.rst :docspr:`1026` by :ghuser:`jakommo`
- docs: typo in st7735 model number :docspr:`1025` by :ghuser:`wjcarpenter`
- docs: Fix mcp23sXX id config :docspr:`1017` by :ghuser:`jesserockz`
- docs: Update bme680.rst :docspr:`1007` by :ghuser:`wifwucite`
- docs: Sim800l dial :docspr:`1027` by :ghuser:`spilin`
- esphome: Add dial support for sim800l component :esphomepr:`1558` by :ghuser:`spilin`
- esphome: Climate IR LG -keep previous temp and fan if swing :esphomepr:`1556` by :ghuser:`Otamay`
- esphome: Vl53l0x change address :esphomepr:`1126` by :ghuser:`kkellner` (new-feature)
- docs: Update vl53l0x docs :docspr:`679` by :ghuser:`kkellner`
- esphome: tuya: Use queue for sending command messages :esphomepr:`1404` by :ghuser:`stubs12`
- esphome: Replace substitutions in substitutions first :esphomepr:`1567` by :ghuser:`edenhaus`
- esphome: Added heater to climate_ir_lg :esphomepr:`1555` by :ghuser:`Otamay`
- esphome: More yaml validation :esphomepr:`1568` by :ghuser:`glmnet`
- esphome: Add default device classes to sensor components :esphomepr:`1533` by :ghuser:`marecabo` (notable-change)
- docs: Document recurring data in uart switch :docspr:`986` by :ghuser:`gabe565`
- esphome: Add support for recurring data in uart switch :esphomepr:`1514` by :ghuser:`gabe565`
- esphome: Added samsung36 ir protocol :esphomepr:`1438` by :ghuser:`tuxBurner`
- docs: Added remote samsung36 protocol docs :docspr:`904` by :ghuser:`tuxBurner`
- docs: Add IWOOLE Table Lamp cookbook entry :docspr:`947` by :ghuser:`Deinara`
- docs: Update uart.rst example to read all available characters :docspr:`1031` by :ghuser:`RoganDawes`
- esphome: ADC fix: GPIO0 not usable as output if ADC_VCC is used :esphomepr:`1557` by :ghuser:`ferbar`
- esphome: Add constants for device classes of binary_sensor :esphomepr:`1549` by :ghuser:`marecabo`
- esphome: fix path on windows escape :esphomepr:`1573` by :ghuser:`glmnet`
- esphome: Migrate ESPColor to Color :esphomepr:`1551` by :ghuser:`SenexCrenshaw`
- docs: Migrate ESPColor to Color :docspr:`1036` by :ghuser:`SenexCrenshaw`
- esphome: Add support for the SM300D2 7-in-1 sensor module :esphomepr:`1524` by :ghuser:`moritzgloeckl` (new-integration)
- docs: Added documentation for the SM300D2 sensor :docspr:`993` by :ghuser:`moritzgloeckl`
- esphome: changed color temp from float to int :esphomepr:`1522` by :ghuser:`codyjamestechnical`
- esphome: Bump pytest-cov from 2.10.1 to 2.11.1 :esphomepr:`1483` by :ghuser:`dependabot[bot]`
- esphome: Bump colorlog from 4.6.2 to 4.7.2 :esphomepr:`1473` by :ghuser:`dependabot[bot]`
- esphome: pins: Add three new boards :esphomepr:`1576` by :ghuser:`balrog-kun`
- esphome: Bump pytest from 6.2.1 to 6.2.2 :esphomepr:`1574` by :ghuser:`dependabot[bot]`
- esphome: Bump pytz from 2020.5 to 2021.1 :esphomepr:`1575` by :ghuser:`dependabot[bot]`
- esphome: Fix for waveshare 2.13in-ttgo-b73 :esphomepr:`1543` by :ghuser:`nikito7`
- docs: Added new blogpost :docspr:`1038` by :ghuser:`pieterbrink123`
- esphome: Add min/max filters :esphomepr:`1569` by :ghuser:`gabe565`
- docs: Document new min/max filters :docspr:`1032` by :ghuser:`gabe565`
- esphome: Bump pylint from 2.6.0 to 2.7.2 :esphomepr:`1582` by :ghuser:`dependabot[bot]`
- esphome: Extend 'uart:' with 'invert:' for esp32 :esphomepr:`1586` by :ghuser:`needspeed`
- docs: Uart invert option for ESP32 :docspr:`1039` by :ghuser:`Mynasru`
- esphome: Bump platformio from 5.0.4 to 5.1.0 :esphomepr:`1581` by :ghuser:`dependabot[bot]`
- esphome: fix servo warning :esphomepr:`1591` by :ghuser:`glmnet`
- docs: add-black :docspr:`1044` by :ghuser:`glmnet`
- esphome: add-black :esphomepr:`1593` by :ghuser:`glmnet`
- esphome: MCP23XXX Refactor :esphomepr:`1560` by :ghuser:`jesserockz` (breaking-change)
- docs: Update MCP23XXX docs with interrupts and pin schemas :docspr:`1028` by :ghuser:`jesserockz`
- esphome: Improve error checking: too many component id candidates :esphomepr:`1570` by :ghuser:`glmnet`
- esphome: Schema dump :esphomepr:`1564` by :ghuser:`glmnet`
- docs: Dump schema :docspr:`1030` by :ghuser:`glmnet`
- docs: Update i2c.rst :docspr:`1043` by :ghuser:`webeling67`
- docs: Update rf_bridge.rst :docspr:`1042` by :ghuser:`samnewman86`
- esphome: Inkplate 6 Optimizations :esphomepr:`1592` by :ghuser:`Sizurka`
- docs: Fix RF Bridge link to Portisch Repo :docspr:`1045` by :ghuser:`jesserockz`
- docs: pin schema and other fixes :docspr:`1047` by :ghuser:`glmnet`
- esphome: schema-dump-pins :esphomepr:`1596` by :ghuser:`glmnet`
- docs: Adding that mpr121_id is a valid option for binary_sensor :docspr:`966` by :ghuser:`minideezel`
- esphome: change lcd clear() to clear the buffer :esphomepr:`1600` by :ghuser:`ssieb`
- esphome: PN532 - don't read extra page and fix size :esphomepr:`1565` by :ghuser:`ssieb`
- docs: schema-filters :docspr:`1052` by :ghuser:`glmnet`
- esphome: Fix component_tests config :esphomepr:`1608` by :ghuser:`madron`
- esphome: Added receive for Fujitsu ACs :esphomepr:`1577` by :ghuser:`alex-richards`
- esphome: Change COLOR_ON to be 255 values instead of 1 :esphomepr:`1594` by :ghuser:`jesserockz`
- esphome: a4988 wait 1ms when coming out of sleep :esphomepr:`1597` by :ghuser:`WeekendWarrior1`
- docs: Remove cs_pin from rc522 i2c example :docspr:`1059` by :ghuser:`jesserockz`
- esphome: Support fan speed levels :esphomepr:`1541` by :ghuser:`blejdfist`
- docs: Documentation for fan speed levels :docspr:`1056` by :ghuser:`blejdfist`
- docs: Add CLI logs section :docspr:`1060` by :ghuser:`Tmin10`
- esphome: Add option to suffix name with mac address :esphomepr:`1615` by :ghuser:`jesserockz`
- esphome: Midea climate support :esphomepr:`1328` by :ghuser:`dudanov` (new-integration)
- docs: Midea Climate support :docspr:`804` by :ghuser:`dudanov`
- docs: Add docs for `name_add_mac_suffix` config :docspr:`1058` by :ghuser:`jesserockz`
- esphome: SPI transfer fix. Use write when no miso pin is set :esphomepr:`1563` by :ghuser:`SenexCrenshaw`
- esphome: SPI Improvements :esphomepr:`1617` by :ghuser:`SenexCrenshaw`
- esphome: Add addressable_light display platform :esphomepr:`1272` by :ghuser:`justfalter` (new-integration) (notable-change)
- docs: Add docs for addressable_light display :docspr:`755` by :ghuser:`justfalter`
- esphome: Implement pulse_meter as an improvement on pulse_counter and pulse_width for meters :esphomepr:`1434` by :ghuser:`stevebaxter` (new-integration)
- esphome: e131: fix issue 1579: limitation of maximum light count :esphomepr:`1619` by :ghuser:`docteurzoidberg`
- docs: Add documentation for pulse_meter :docspr:`900` by :ghuser:`stevebaxter`
- esphome: Bump platformio from 5.1.0 to 5.1.1 :esphomepr:`1618` by :ghuser:`dependabot[bot]`
- esphome: Fix pulse-meter with device_class and black :esphomepr:`1621` by :ghuser:`jesserockz`
- esphome: Declare Color objects in main.cpp :esphomepr:`1395` by :ghuser:`kbx81`
- esphome: Add 2.13in-ttgo-b1 waveshare epaper module. :esphomepr:`1326` by :ghuser:`matikij`
- docs: Add docs for ttgo-b1 version (next branch) :docspr:`808` by :ghuser:`matikij`
- esphome: Bump flake8 from 3.8.4 to 3.9.0 :esphomepr:`1612` by :ghuser:`dependabot[bot]`
- esphome: Bundle platformio lib_deps in docker images :esphomepr:`1625`
- esphome: Bump protobuf from 3.13.0 to 3.15.6 :esphomepr:`1607` by :ghuser:`dependabot[bot]`
- esphome: Bump pyyaml from 5.3.1 to 5.4.1 :esphomepr:`1482` by :ghuser:`dependabot[bot]`
- esphome: Switch docker images to debian :esphomepr:`1626`
- esphome: Background calibration & ABC commands for SenseAir S8 :esphomepr:`1623` by :ghuser:`nmaggioni` (new-feature)
- docs: SenseAir: background calibration & ABC commands :docspr:`1066` by :ghuser:`nmaggioni`
- esphome: Add trigger for http actions to receive the status code :esphomepr:`1599` by :ghuser:`jesserockz` (new-feature)
- docs: Add docs for http_request on_response trigger :docspr:`1049` by :ghuser:`jesserockz`
- docs: Fix typo lambada -> lambda in multiple display compoments :docspr:`1071` by :ghuser:`rheinz`
- docs: Consistent spelling of "ID" :docspr:`1068` by :ghuser:`spacegaier`
- docs: Change GREYSCALE to GRAYSCALE :docspr:`1073` by :ghuser:`adrienbrault`
- docs: SPI: fix Example :docspr:`1076` by :ghuser:`ferbar`
- docs: Update diy.rst :docspr:`1106` by :ghuser:`electrofun-smart`
- docs: Make changelog banner dismissable :docspr:`1113` by :ghuser:`manutenfruits`
- docs: Correct typo: "between between" -> "between" :docspr:`1109` by :ghuser:`janosrusiczki`
- docs: Update canbus.rst :docspr:`1115` by :ghuser:`meijerwynand`
- docs: Update diy.rst :docspr:`1114` by :ghuser:`murilobaliego`
- docs: Update email addresses :docspr:`1122` by :ghuser:`jesserockz`

View File

@ -40,7 +40,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **mac_address** (*Optional*, MAC Address): The MAC address to track for this
binary sensor. Either this or ``service_uuid`` has to be present.
- **service_uuid** (*Optional*, string) 16 bit, 32 bit, or 128 bit BLE Service UUID
- **service_uuid** (*Optional*, string): 16 bit, 32 bit, or 128 bit BLE Service UUID
which can be tracked if the device randomizes the MAC address. Either
this or ``mac_address`` has to be present.
- **id** (*Optional*, :ref:`config-id`): Manually specify

View File

@ -85,23 +85,40 @@ of these entries matters!)
return {};
}
Supported filters:
``invert``
**********
- **invert**: Simple filter that just inverts every value from the binary sensor.
- **delayed_on**: When a signal ON is received, wait for the specified time period until publishing
an ON state. If an OFF value is received while waiting, the ON action is discarded. Or in other words:
Only send an ON value if the binary sensor has stayed ON for at least the specified time period.
**Useful for debouncing push buttons**.
- **delayed_off**: When a signal OFF is received, wait for the specified time period until publishing
an OFF state. If an ON value is received while waiting, the OFF action is discarded. Or in other words:
Only send an OFF value if the binary sensor has stayed OFF for at least the specified time period.
**Useful for debouncing push buttons**.
- **delayed_on_off**: Only send an ON or OFF value if the binary sensor has stayed in the same state
for at least the specified time period.
**Useful for debouncing binary switches**.
- **lambda**: Specify any :ref:`lambda <config-lambda>` for more complex filters. The input value from
the binary sensor is ``x`` and you can return ``true`` for ON, ``false`` for OFF, and ``{}`` to stop
the filter chain.
Simple filter that just inverts every value from the binary sensor.
``delayed_on``
**************
(**Required**, :ref:`config-time`): When a signal ON is received, wait for the specified time period until publishing
an ON state. If an OFF value is received while waiting, the ON action is discarded. Or in other words:
Only send an ON value if the binary sensor has stayed ON for at least the specified time period.
**Useful for debouncing push buttons**.
``delayed_off``
***************
(**Required**, :ref:`config-time`): When a signal OFF is received, wait for the specified time period until publishing
an OFF state. If an ON value is received while waiting, the OFF action is discarded. Or in other words:
Only send an OFF value if the binary sensor has stayed OFF for at least the specified time period.
**Useful for debouncing push buttons**.
``delayed_on_off``
******************
(**Required**, :ref:`config-time`): Only send an ON or OFF value if the binary sensor has stayed in the same state
for at least the specified time period.
**Useful for debouncing binary switches**.
``lambda``
**********
Specify any :ref:`lambda <config-lambda>` for more complex filters. The input value from
the binary sensor is ``x`` and you can return ``true`` for ON, ``false`` for OFF, and ``{}`` to stop
the filter chain.
Binary Sensor Automation
------------------------

View File

@ -6,6 +6,11 @@ MPR121 Capacitive Touch Sensor
:image: mpr121.jpg
:keywords: MPR121
.. _mpr121-component:
Component/Hub
-------------
The ``mpr121`` sensor platform allows you to use your MPR121
(`datasheet <https://cdn-learn.adafruit.com/downloads/pdf/adafruit-mpr121-12-key-capacitive-touch-sensor-breakout-tutorial.pdf>`__,
`Adafruit`_) Capacitive Touch Sensor with ESPHome. The :ref:`I²C <i2c>` is
@ -43,8 +48,6 @@ Configuration variables:
The configuration is made up of two parts: The central component, and individual Binary sensors per channel.
Base Configuration:
- **address** (*Optional*, integer): The I²C address of the sensor. Defaults to ``0x5A``.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor.
- **touch_debounce** (*Optional*, integer): The minimum length before a touch is recognized. Range is from 0 to 7.
@ -55,12 +58,21 @@ Base Configuration:
and should be between 5 and 30 (lower = more sensitive). Defaults to 12. Typically the touch threshold is a little bigger than the release threshold.
- **release_threshold** (*Optional*, integer): The release defines the sensitivity for touch detection and should be between 5 and 30. Defaults to 6.
Binary Sensor Configuration:
Binary Sensor
-------------
- **name** (**Optional**, string): The name for the binary sensor.
The ``mpr121`` binary sensor allows you to use your MPR121 with ESPHome.
First, setup a :ref:`mpr121-component` and then use this binary sensor platform to create individual
binary sensors for each touch sensor.
Configuration variables:
- **name** (*Optional*, string): The name for the binary sensor.
- **mpr121_id** (*Optional*, :ref:`config-id`): The ID of the MPR121 defined above. Useful for multiple MPR121's on the I²C bus
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **channel** (*Required*, integer): The channel number at the MPR121 the touchkey is connected to.
- **channel** (**Required**, integer): The channel number at the MPR121 the touchkey is connected to.
- **touch_threshold** (*Optional*, integer): A per-channel override of the global touch_threshold value. If not specified, uses the global value.
- **release_threshold** (*Optional*, integer): A per-channel override of the global release_threshold value. If not specified, uses the global value.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.

View File

@ -28,14 +28,62 @@ You will need to switch the dip switches located on the module according to the
SPI is usually switch 1 OFF and switch 2 ON and I²C is usually switch 1 ON and switch 2 OFF.
You will need to have the :ref:`SPI Bus <spi>` or the :ref:`I²C Bus <i2c>` configured depending on your choice.
Over SPI
--------
The ``pn532_spi`` component allows you to use PN532 NFC/RFID controllers
(`datasheet <https://cdn-shop.adafruit.com/datasheets/pn532ds.pdf>`__, `Adafruit <https://www.adafruit.com/product/364>`__)
with ESPHome. This component is a global hub that establishes the connection to the PN532 via :ref:`SPI <spi>` and
outputs its data. Using the :ref:`PN532 binary sensors <pn532-tag>` you can then
create individual binary sensors that track if an NFC/RFID tag is currently detected by the PN532.
.. code-block:: yaml
# Example configuration for SPI (choose which one!)
pn532_spi:
cs_pin: D3
update_interval: 1s
# Example configuration for I²C (choose which one!)
binary_sensor:
- platform: pn532
uid: 74-10-37-94
name: "PN532 NFC Tag"
Configuration variables:
************************
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
is connected to.
- **update_interval** (*Optional*, :ref:`config-time`): The duration of each scan on the PN532. This affects the
duration that the individual binary sensors stay active when they're found.
If a device is not found within this time window, it will be marked as not present. Defaults to 1s.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a tag is read. See :ref:`pn532-on_tag`.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.
.. figure:: images/pn532-spi.jpg
:align: center
:width: 80.0%
Example for hooking up the PN532 via SPI. Notice the position of the two switches on the right.
.. _pn532-on_tag:
Over I²C
--------
The ``pn532`` component allows you to use PN532 NFC/RFID controllers
(`datasheet <https://cdn-shop.adafruit.com/datasheets/pn532ds.pdf>`__, `Adafruit <https://www.adafruit.com/product/364>`__)
with ESPHome. This component is a global hub that establishes the connection to the PN532 via :ref:`I²C <i2c>` and
outputs its data. Using the :ref:`PN532 binary sensors <pn532-tag>` you can then
create individual binary sensors that track if an NFC/RFID tag is currently detected by the PN532.
.. code-block:: yaml
pn532_i2c:
update_interval: 1s
@ -47,29 +95,18 @@ You will need to have the :ref:`SPI Bus <spi>` or the :ref:`I²C Bus <i2c>` conf
Configuration variables:
************************
- **cs_pin** (**Required for SPI**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
is connected to.
- **update_interval** (*Optional*, :ref:`config-time`): The duration of each scan on the PN532. This affects the
duration that the individual binary sensors stay active when they're found.
If a device is not found within this time window, it will be marked as not present. Defaults to 1s.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a tag is read. See :ref:`pn532-on_tag`.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component <spi>` if you want
to use multiple I²C buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.
.. figure:: images/pn532-spi.jpg
:align: center
:width: 80.0%
Example for hooking up the PN532 via SPI. Notice the position of the two switches on the right.
.. _pn532-on_tag:
``on_tag``
----------
``on_tag`` Action
-----------------
This automation will be triggered when the PN532 module responds with a tag. This will only be triggered
if the tag is changed or goes away for one cycle of ``update_interval``.
@ -120,8 +157,8 @@ Alternatively you could also send the value directly to Home Assistant via a
.. _pn532-tag:
NFC/RFID Tag
------------
``pn532`` Binary Sensor
-----------------------
The ``pn532`` binary sensor platform lets you track if an NFC/RFID tag with a given
unique id (``uid``) is currently being detected by the PN532 or not.

View File

@ -8,30 +8,32 @@ RC522 RFID
.. _rc522-component:
Component/Hub
-------------
The ``rc522`` component allows you to use RC522 RFID controllers
(`datasheet <hthttps://www.nxp.com/docs/en/data-sheet/MFRC522.pdff>`__, `Ali Express <https://es.aliexpress.com/item/1260729519.html>`__)
with ESPHome. This component is a global hub that establishes the connection to the RC522 via either :ref:`SPI <spi>` or
:ref:`I²C <i2c>` and outputs its data. Using the :ref:`RC522 binary sensors <rc522-tag>` you can then
create individual binary sensors that track if an RFID tag is currently detected by the RC522.
.. figure:: images/rc522-full.jpg
:align: center
:width: 60.0%
with ESPHome. ESPHome can read the tag UID from it, every RFID tag comes with a unique
UID value. Each known tag can be associated to a binary sensor, or you can use the tag information directly.
See :ref:`rc522-setting_up_tags` for information on how to setup individual binary sensors for this component.
The RC522 supports SPI, I²C and UART communication protocols, ESPHome can use either SPI or I²C.
Component/Hub
-------------
* If you have a module like the image above, it can only be used in SPI mode (`unless hacked <https://forum.arduino.cc/index.php?topic=442750.0>`__)
and you need to have an :ref:`SPI bus <spi>` in your configuration with both the **miso_pin** and **mosi_pin** set.
* If you have a RC522 which communicates via I²C like in the M5 Stack then you need to have an :ref:`I²C <i2c>` bus configured.
SPI Option
**********
.. figure:: images/rc522-full.jpg
:align: center
:width: 60.0%
Over SPI
--------
The ``rc522_spi`` component allows you to use RC522 RFID controllers with ESPHome. This component is a global hub that
establishes the connection to the RC522 via :ref:`SPI <spi>` (also avilable over I²C). Using the
:ref:`RC522 binary sensors <rc522-tag>` you can then create individual binary sensors that track if
an RFID tag is currently detected by the RC522.
.. code-block:: yaml
@ -45,8 +47,29 @@ SPI Option
uid: 74-10-37-94
name: "RC522 RFID Tag"
I²C Option
**********
Configuration variables:
************************
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
is connected to.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a tag is read. See
:ref:`rc522-on_tag`.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin connected to the RST line. Some tests
shows the RC522 working okay without this.
- **update_interval** (*Optional*, :ref:`config-time`): The duration of each scan on the RC522. This affects the
duration that the individual binary sensors stay active when they're found.
If a device is not found within this time window, it will be marked as not present. Defaults to ``1s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.
Over I²C
--------
The ``rc522_i2c`` component allows you to use RC522 RFID controllers with ESPHome. This component is a global hub that
establishes the connection to the RC522 via :ref:`I²C <i2c>` (also avilable over SPI). Using the
:ref:`RC522 binary sensors <rc522-tag>` you can then create individual binary sensors that track if
an RFID tag is currently detected by the RC522.
.. code-block:: yaml
@ -62,36 +85,24 @@ I²C Option
Configuration variables:
************************
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x28``.
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component <i2c>` if you want
to use multiple I²C buses.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a tag is read. See
:ref:`rc522-on_tag`.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin connected to the RST line. Some tests
shows the RC522 working okay without this.
- **update_interval** (*Optional*, :ref:`config-time`): The duration of each scan on the RC522. This affects the
duration that the individual binary sensors stay active when they're found.
If a device is not found within this time window, it will be marked as not present. Defaults to ``1s``.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a tag is read. See
:ref:`rc522-on_tag`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.
SPI Only:
^^^^^^^^^
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that the chip select line
is connected to.
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
I²C Only:
^^^^^^^^^
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x2C``.
- **i2c_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`I²C Component <i2c>` if you want
to use multiple I²C buses.
.. _rc522-on_tag:
``on_tag``
----------
``on_tag`` Action
-----------------
This automation will be triggered when the RC522 module responds with a tag. Please note that this
can be called quite often (with an interval of ``update_interval``) as it's triggered repeatedly
@ -123,8 +134,8 @@ using :ref:`api-homeassistant_tag_scanned_action`.
.. _rc522-tag:
RFID Tag
--------
``rc522`` Binary Sensor
-----------------------
The ``rc522`` binary sensor platform lets you track if an RFID tag with a given
unique id (``uid``) is currently being detected by the RC522 or not.

View File

@ -83,8 +83,8 @@ using :ref:`api-homeassistant_tag_scanned_action`.
.. _rdm6300-tag:
NFC/RFID Tag
------------
``rdm6300`` Binary Sensor
-------------------------
The ``rdm6300`` binary sensor platform lets you track if an NFC/RFID tag with a given
unique id (``uid``) is currently being detected by the RDM6300 or not.

View File

@ -22,8 +22,8 @@ There are two types of this sensor:
.. _RobotDyn: https://www.tinytronics.nl/shop/nl/sensoren/touch/robotdyn-touch-module-ttp229-lsf-16-kanaals
``ttp229_lsf`` Type
-------------------
``ttp229_lsf`` Component
------------------------
.. code-block:: yaml
@ -40,19 +40,20 @@ Configuration variables:
The configuration is made up of two parts: The central component, and individual Binary sensors per channel.
Base Configuration:
- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this sensor.
Binary Sensor Configuration:
``ttp229_lsf`` Binary Sensor
----------------------------
Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **channel** (**Required**, integer): The channel number at the TTP229 the touchkey is connected to.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
``ttp229_bsf`` Type
-------------------
``ttp229_bsf`` Component
------------------------
.. code-block:: yaml
@ -79,7 +80,10 @@ Base Configuration:
SCL pin is connected to.
- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this component.
Binary Sensor Configuration:
``ttp229_bsf`` Binary Sensor
----------------------------
Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **channel** (**Required**, integer): The channel number at the TTP229 the touchkey is connected to.

View File

@ -56,9 +56,9 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **can_id** (**Required**, integer): default *can id* used for transmitting frames.
- **use_extended_id** (*Optional*, boolean): default *False* identifies the type of *can_id*:
- **use_extended_id** (*Optional*, boolean): default *False* identifies the type of *can_id*:
*False*: Standard 11 bits IDs, *True*: Extended 29 bits ID
- **bit_rate** (*Optional*, one of the supported bitrates= defaults to ``125KBPS``.
- **bit_rate** (*Optional*, enum): One of the supported bitrates. Defaults to ``125KBPS``.
- 5KBPS
- 10KBPS
@ -80,7 +80,7 @@ Configuration variables:
Automations:
- **on_frame** (*Optional*, :ref:`Automation <automation>`): An automation to perform when ability
CAN Frame is received. See below.
CAN Frame is received. See :ref:`canbus-on-frame`.
.. _canbus-on-frame:
@ -107,8 +107,8 @@ This automation will be triggered when a can frame is received. A variable ``x`
then:
light.toggle: light1
Transmit Frame Action
*********************
``canbus.send`` Action
**********************
The can bus can transmit frames by means of the ``canbus.send`` action.
There are several forms to use it:
@ -132,23 +132,26 @@ There are several forms to use it:
Configuration variables:
- **data** (*Required*, binary data): Data to transmit, up to 8 bytes or
- **data** (**Required**, binary data): Data to transmit, up to 8 bytes or
characters are supported by can bus per frame.
- **canbus_id** (*Optional*): Optionally set the can bus id to use for transmitting
the frame. Not needed if you are using only 1 can bus.
- **can_id** (*Optional*, int): Allows to override the can id configured in
the can bus device.
- **use_extended_id** (*Optional*, boolean): default *False* identifies the type of *can_id*:
- **use_extended_id** (*Optional*, boolean): default *False* identifies the type of *can_id*:
*False*: Standard 11 Bit IDs, *True*: Extended 29Bit ID
MCP2515
-------
MCP2515 Component
-----------------
The MCP2515 is a spi device and therefore you must first add the configuration for the spi bus to your file.
You need to have an :ref:`SPI bus <spi>` in your configuration with both the **mosi_pin** and **miso_pin** set.
For wiring up the MSP2515 please refer to the section below.
Configuration variables:
************************
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Is used to tell the receiving SPI device
when it should listen for data on the SPI bus. Each device has an individual ``CS`` line.
Sometimes also called ``SS``.
@ -217,7 +220,7 @@ Standard IDs and Extended IDs can coexist on the same segment.
- seconds: /1
then:
- canbus.send:
# Extended ID explicit
# Extended ID explicit
use_extended_id: True
can_id: 0x100
data: [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]
@ -290,11 +293,11 @@ Buttons are connected on the CAN-Node and also the motor is connected via CAN.
.. epigraph::
| **Button 1:** ID 0x50B - 1 byte payload
| **Button 1:** ID 0x50B - 1 byte payload
| (0: Button release, 1: Button down, 2: long down, 3: long release, 4 double click)
| **Button 2:** ID 0x50C - 1 byte payload
| **Button 2:** ID 0x50C - 1 byte payload
| (0: Button release, 1: Button down, 2: long down, 3: long release, 4 double click)
| **Motor:** ID 0x51A - 1 byte payload
| **Motor:** ID 0x51A - 1 byte payload
| (0: off, 1: open, 2: close)
.. code-block:: yaml

View File

@ -66,8 +66,8 @@ Do note that the actions are only called when the current temperature leaves the
idle_action:
- switch.turn_off: heater
Configuration variables
-----------------------
Configuration variables:
------------------------
- **sensor** (**Required**, :ref:`config-id`): The sensor that is used to measure the current temperature.
- **default_target_temperature_low** (**Required**, float): The default low target temperature for

View File

@ -15,30 +15,30 @@ as your remote unit would do.
There is a growing list of compatible units. If your unit is not listed below you can fill a feature
request so it will be added (see FAQ).
+------------------------+---------------------+----------------------+------------------------------------+
| Name | Platform name | Supports receiver | |
| | | | |
+========================+=====================+======================+====================================+
| Coolix | ``coolix`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
| Daikin | ``daikin`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
| Fujitsu General | ``fujitsu_general`` | | |
+------------------------+---------------------+----------------------+------------------------------------+
| Mitsubishi | ``mitsubishi`` | | |
+------------------------+---------------------+----------------------+------------------------------------+
| TCL112, Fuego | ``tcl112`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
| Toshiba | ``toshiba`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
| Yashima | ``yashima`` | | |
+------------------------+---------------------+----------------------+------------------------------------+
| Whirlpool | ``whirlpool`` | yes | :ref:`more info<model_whirlpool>` |
+------------------------+---------------------+----------------------+------------------------------------+
| LG | ``climate_ir_lg`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
| Hitachi | ``hitachi_ac344`` | yes | |
+------------------------+---------------------+----------------------+------------------------------------+
+---------------------------------------+---------------------+----------------------+
| Name | Platform name | Supports receiver |
| | | |
+=======================================+=====================+======================+
| Coolix | ``coolix`` | yes |
+---------------------------------------+---------------------+----------------------+
| Daikin | ``daikin`` | yes |
+---------------------------------------+---------------------+----------------------+
| Fujitsu General | ``fujitsu_general`` | |
+---------------------------------------+---------------------+----------------------+
| Mitsubishi | ``mitsubishi`` | |
+---------------------------------------+---------------------+----------------------+
| TCL112, Fuego | ``tcl112`` | yes |
+---------------------------------------+---------------------+----------------------+
| Toshiba | ``toshiba`` | yes |
+---------------------------------------+---------------------+----------------------+
| Yashima | ``yashima`` | |
+---------------------------------------+---------------------+----------------------+
| :ref:`Whirlpool<climate_ir_whirlpool>`| ``whirlpool`` | yes |
+---------------------------------------+---------------------+----------------------+
| :ref:`LG<climate_ir_lg>` | ``climate_ir_lg`` | yes |
+---------------------------------------+---------------------+----------------------+
| Hitachi | ``hitachi_ac344`` | yes |
+---------------------------------------+---------------------+----------------------+
This component requires that you have setup a :doc:`/components/remote_transmitter`.
@ -110,19 +110,48 @@ IR receiver.
name: "Living Room AC"
receiver_id: rcvr
.. _model_whirlpool:
.. _climate_ir_whirlpool:
Whirlpool
---------
``whirlpool`` Climate
---------------------
Additional configuration is available for this model
Configuration variables:
- **model** (*Optional*, string): There are two valid models
* ``MODEL_DG11J1_3A``: Temperature range is from 18 to 32 (default)
* ``MODEL_DG11J1_91``: Temperature range is from 16 to 30
-* ``DG11J1-3A``: Temperature range is from 18 to 32 (default)
-* ``DG11J1-91``: Temperature range is from 16 to 30
.. _climate_ir_lg:
``climate_ir_lg`` Climate
-------------------------
Additional configuration is available for this platform
Configuration variables:
- **header_high** (*Optional*, :ref:`config-time`): time for the high part of the header for the LG protocol. Defaults to ``8000us``
- **header_low** (*Optional*, :ref:`config-time`): time for the low part of the header for the LG protocol. Defaults to ``4000us``
- **bit_high** (*Optional*, :ref:`config-time`): time for the high part of any bit in the LG protocol. Defaults to ``600us``
- **bit_one_low** (*Optional*, :ref:`config-time`): time for the low part of a '1' bit in the LG protocol. Defaults to ``1600us``
- **bit_zero_low** (*Optional*, :ref:`config-time`): time for the low part of a '0' bit in the LG protocol. Defaults to ``550us``
.. code-block:: yaml
# Example configuration entry
climate:
- platform: climate_ir_lg
name: "AC"
sensor: room_temperature
header_high: 3265us # AC Units from LG in Brazil, for example use these timings
header_low: 9856us
See Also
--------

View File

@ -0,0 +1,115 @@
Midea Air Conditioner
=====================
.. seo::
:description: Instructions for setting up a Midea climate device
:image: air-conditioner.png
The ``midea_ac`` component creates a Midea air conditioner climate device.
This component requires a auto-loaded ``midea-dongle`` component, that use hardware UART.
.. note::
This protocol also used by some vendors:
- `Electrolux <https://www.electrolux.ru/>`_
- `Qlima <https://www.qlima.com/>`_
- `Artel <https://www.artelgroup.com/>`_
- `Carrier <https://www.carrier.com/>`_
- `Comfee <http://www.comfee-russia.ru/>`_
- `Inventor <https://www.inventorairconditioner.com/>`_
- and maybe others
Example of hardware implementation is `Midea Open Dongle <https://github.com/dudanov/midea-open-dongle>`_ in free `KiCad <https://kicad-pcb.org>`_ format.
.. code-block:: yaml
# Example configuration entry
# Disable logging over UART (required)
logger:
baud_rate: 0
# UART settings for Midea dongle (required)
uart:
tx_pin: 1
rx_pin: 3
baud_rate: 9600
# Optional (if you want modify settings)
midea_dongle:
strength_icon: true
# Main settings
climate:
- platform: midea_ac
name: "My Midea AC"
visual:
min_temperature: 18 °C
max_temperature: 25 °C
temperature_step: 0.1 °C
beeper: true
swing_horizontal: true
swing_both: true
outdoor_temperature:
name: "Temp"
power_usage:
name: "Power"
humidity_setpoint:
name: "Hum"
Configuration variables:
------------------------
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **midea_dongle_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the ``midea_dongle`` if you want to use multiple devices.
- **name** (**Required**, string): The name of the climate device.
- **outdoor_temperature** (*Optional*): The information for the outdoor temperature
sensor.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **power_usage** (*Optional*): The information for the current power consumption
sensor.
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity_setpoint** (*Optional*): The information for the humidity indoor
sensor (experimental).
- **name** (**Required**, string): The name of the sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **beeper** (*Optional*, boolean): Beeper feedback on command. Defaults to ``False``.
- **swing_horizontal** (*Optional*, boolean): Enable **swing horizontal** option. Defaults to ``False``.
- **swing_both** (*Optional*, boolean): Enable **swing both** option. Defaults to ``False``.
- All other options from :ref:`Climate <config-climate>`.
Configuration variables of midea-dongle component:
**************************************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :doc:`../uart` if you want
to use multiple UART buses.
- **strength_icon** (*Optional*, boolean): Set if your device have signal strength icon
and you want to use this feature. By default, on connected state, icon show maximum signal quality. Defaults to ``False``.
Acknowledgments:
----------------
Thanks to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories:
* `Mac Zhou <https://github.com/mac-zhou/midea-msmart>`_
* `NeoAcheron <https://github.com/NeoAcheron/midea-ac-py>`_
* `Rene Klootwijk <https://github.com/reneklootwijk/node-mideahvac>`_
See Also
--------
- :doc:`/components/climate/index`
- :apiref:`climate/midea_ac.h`
- :ghedit:`Edit`

View File

@ -215,8 +215,8 @@ Configuration variables:
``climate.pid.set_control_parameters`` Action
---------------------------------------------
This action sets new values for the control parameters of the PID controller. This can be
used to manually tune the PID controller. Make sure to take update the values you want on
This action sets new values for the control parameters of the PID controller. This can be
used to manually tune the PID controller. Make sure to take update the values you want on
the YAML file! They will reset on the next reboot.
.. code-block:: yaml
@ -247,14 +247,14 @@ conditions to avoid the control loop to overshoot (or undershoot) a target.
on_...:
# Basic
- climate.pid.reset_integral_term: pid_climate
- climate.pid.reset_integral_term: pid_climate
Configuration variables:
- **id** (**Required**, :ref:`config-id`): ID of the PID Climate being reset.
PID Climate Sensor
------------------
``pid`` Sensor
--------------
Additionally, the PID climate platform provides an optional sensor platform to monitor
the calculated PID parameters to help finding good PID values.

View File

@ -133,8 +133,7 @@ Examples:
Got all that? Great. Let's take a closer look at some configuration.
Configuration Variables
-----------------------
Configuration Variables:
The thermostat controller uses the sensor to determine whether it should heat or cool.

View File

@ -48,11 +48,11 @@ Configuration variables:
- **switch_datapoint** (**Required**, int): The datapoint id number of the climate switch.
- **target_temperature_datapoint** (**Required**, int): The datapoint id number of the target temperature.
- **current_temperature_datapoint** (**Required**, int): The datapoint id number of the current temperature.
- **temperature_multiplier** (**Optional**, float): A multiplier to modify the incoming and outgoing temperature values - :ref:`see below <temperature-multiplier>`.
- **temperature_multiplier** (*Optional*, float): A multiplier to modify the incoming and outgoing temperature values - :ref:`see below <temperature-multiplier>`.
If the device has different multipliers for current and target temperatures, **temperature_multiplier** can be replaced with both of:
- **current_temperature_multiplier** (**Optional**, float): A multiplier to modify the current temperature value.
- **target_temperature_multiplier** (**Optional**, float): A multiplier to modify the target temperature value.
- **current_temperature_multiplier** (*Optional*, float): A multiplier to modify the current temperature value.
- **target_temperature_multiplier** (*Optional*, float): A multiplier to modify the target temperature value.
- All other options from :ref:`Climate <config-climate>`.
.. _temperature-multiplier:

View File

@ -22,7 +22,7 @@ a bunch of useful information like reset reason, free heap size, ESPHome version
logger:
level: debug
There are no configuration variables for this component.
No configuration variables.
See Also
--------

View File

@ -33,9 +33,8 @@ Configuration variables:
- **run_duration** (*Optional*, :ref:`config-time`): The time duration the node should be active, i.e. run code.
- **sleep_duration** (*Optional*, :ref:`config-time`): The time duration to stay in deep sleep mode.
- **wakeup_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`):
Only on ESP32. A pin to wake up to once in deep sleep mode. Use the inverted property to wake up
to LOW signals.
- **wakeup_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Only on ESP32. A pin to wake up to once
in deep sleep mode. Use the inverted property to wake up to LOW signals.
- **wakeup_pin_mode** (*Optional*): Only on ESP32. Specify how to handle waking up from a ``wakeup_pin`` if
the wakeup pin is already in the state with which it would wake up when attempting to enter deep sleep.
See :ref:`deep_sleep-esp32_wakeup_pin_mode`. Defaults to ``IGNORE``
@ -84,6 +83,11 @@ This action makes the given deep sleep component enter deep sleep immediately.
on_...:
then:
- deep_sleep.enter: deep_sleep_1
sleep_duration: 20min
Configuration options:
- **sleep_duration** (*Optional*, :ref:`config-time`): The time duration to stay in deep sleep mode.
.. _deep_sleep-prevent_action:
@ -111,7 +115,7 @@ Useful for keeping the ESP active during data transfer or OTA updating (See note
it will no longer enter deep sleep mode and you can upload your OTA update.
Remember to turn "OTA mode" off again after the OTA update by sending a MQTT message with the payload
``OFF``. To enter the the deep sleep again after the OTA update send a message on the topic ``livingroom/sleep_mode``
``OFF``. To enter the the deep sleep again after the OTA update send a message on the topic ``livingroom/sleep_mode``
with payload ``ON``. Deep sleep will start immediately. Don't forget to delete the payload before the node
wakes up again.

View File

@ -21,10 +21,10 @@ Overview
--------
The module can be powered by the 3.3V output of a NodeMCU. For communication you can connect only
the ``tx_pin`` of the ``uart`` bus to the module's ``RX`` but if you need feedback of playback active
the ``tx_pin`` of the ``uart`` bus to the module's ``RX`` but if you need feedback of playback active
you will also need to connect the ``rx_pin`` to the module's ``TX``.
For best quality audio a powered stereo speaker can be connected to the modules ``DAC_R``,
``DAC_I`` and ``GND``, alternatively the module features a built-in 3W audio amplifier, in that case
``DAC_L`` and ``GND``, alternatively the module features a built-in 3W audio amplifier, in that case
the pins ``SPK_1`` and ``SPK_2`` should be connected to one passive speaker and a 5V 1A power supply
will be required.
@ -115,8 +115,8 @@ Configuration options:
-------------------------------
Plays files inside numbered folders, folders must be numbered from 1 and with leading
zeros. Like `01`, `02`, ... etc. Files inside the folders must be numbered with two
leading zeros, like `001.mp3`, `002.mp3`, ... etc.
zeros. Like ``01``, ``02``, ... etc. Files inside the folders must be numbered with two
leading zeros, like ``001.mp3``, ``002.mp3``, ... etc.
Folder numbers can range from 1 to 99 and file name from 1 to 255 or folder number
from 1 to 10 and file number from 1 to 1000.
@ -178,7 +178,7 @@ Changes volume.
Configuration options:
- **volume** (**Required**, int, :ref:`templatable <config-templatable>`): The volume value.
Valid values goes from 0 to 30.
Valid values goes from ``0`` to ``30``.
``dfplayer.set_eq`` Action
--------------------------

View File

@ -0,0 +1,146 @@
Addressable Light
=================
.. seo::
:description: Instructions for setting up displays using addressable lights and LED matrix
:image: addressable_light.jpg
The ``addressable_light`` display platform allows to display text and graphics on an addressable
light that has been arranged in a display matrix.
The display requires that an :apiclass:`AddressableLight <light::AddressableLight>` component, such as
:doc:`/components/light/fastled` or :doc:`/components/light/neopixelbus`, be defined.
.. figure:: images/addressable_light.jpg
:align: center
:width: 75.0%
WS2812B Addressable Light Display
.. code-block:: yaml
light:
- platform: fastled_clockless
chipset: WS2812B
pin: GPIO4
num_leds: 64
rgb_order: GRB
name: "led_matrix"
id: led_matrix_light
default_transition_length: 0s
color_correct: [50%, 50%, 50%]
restore_mode: ALWAYS_ON
display:
- platform: addressable_light
id: led_matrix_display
addressable_light_id: led_matrix_light
width: 8
height: 8
rotation: 180°
update_interval: 16ms
lambda: |-
// Draw a bulls-eye pattern
Color red = Color(0xFF0000);
Color green = Color(0x00FF00);
Color blue = Color(0x0000FF);
it.rectangle(0, 0, 8, 8, red);
it.rectangle(1, 1, 6, 6, green);
it.rectangle(2, 2, 4, 4, blue);
it.rectangle(3, 3, 2, 2, red);
Configuration variables:
------------------------
- **addressable_light_id** (**Required**, :ref:`config-id`): The id of the addressable light component to use
as a display.
- **width** (**Required**, int): The width of the LED matrix in pixels.
- **height** (**Required**, int): The height of the LED matrix in pixels.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to call the lambda to update the display.
Defaults to ``16ms``.
- **pixel_mapper** (*Optional*, :ref:`lambda <config-lambda>`): A lambda that returns the integer address of the LED
given the supplied the ``x`` and ``y`` pixel coordinate. By default, a left-to-right direct pixel mapper is used.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
``it`` will be an instance of :apiclass:`DisplayBuffer <display::DisplayBuffer>`.
See :ref:`display-engine` for more information.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. note::
When enabled (the default, but also via ``it.set_enabled(true)``), any effect currently running on the
addressable light will be disabled. When disabled (``it.set_enabled(false)``), the last configured effect will
be restored.
While the display is enabled, it is still possible to control the parent addressable light component in some
limited capacity. Changing the brightness will still work, but changing the color will have no affect. It is not
adivsable to enable any effects (ex: rainbow, color wipe, etc) while the display is enabled, as this will cause a
great deal of flickering while the effect competes with the display for rendering.
pixel_mapper
------------
An addressable LED matrix is just an addressable LED strip laid out in a matrix -- the path often snaking
down-up-down, left-right-left, or whichever way the manufacturer has chosen. Like an addressable LED strip,
each pixel on a matrix is addressed as an offset from the first pixel (0). The job of the pixel mapper is
to translate a logical x-y pixel coordinate to the address of the expected physical LED.
Determining the correct algorithm for the pixel mapper for your matrix will hopefully only require some graph paper and a little bit of math.
Default
*******
The default pixel mapper assumes that the led matrix is addressed starting with the top left LED, moving to the right, and
then starting with the left-most row of the next row.
.. figure:: images/addressable_light_pixel_map_default.png
:align: center
:width: 75.0%
Default pixel_mapper as used with a 4x4 led matrix
BTF-Lighting 8x32 WS2812B Flexible LED Matrix
*********************************************
The following image illustrates the path the addressable strip takes through the common the BTF-Lighting 8x32 matrix.
.. figure:: images/addressable_light_pixel_map_8x32.png
:align: center
:width: 75.0%
LED layout for BTF-Lighting 8x32 WS2812B Flexible LED Matrix
Below is a definition that includes a pixel_mapper suitable for these 8x32 matrices.
.. code-block:: yaml
display:
- platform: addressable_light
id: led_matrix_32x8_display
addressable_light_id: led_matrix_32x8
width: 32
height: 8
pixel_mapper: |-
if (x % 2 == 0) {
return (x * 8) + y;
}
return (x * 8) + (7 - y);
rotation: 0°
update_interval: 16ms
See Also
--------
- :apiref:`addressable_light/addressable_light_display.h`
- :doc:`/components/light/index`
- :doc:`/components/light/fastled`
- :doc:`/components/light/neopixelbus`
- :doc:`/components/light/partition`
- :ghedit:`Edit`

View File

@ -33,13 +33,13 @@ beyond the typical SPI connections, it is better suited for use with the ESP32.
dc_pin: 27
led_pin: 32 ### see note below ###
reset_pin: 33
lambda: |-
it.fill(COLOR_BLACK);
it.print(0, 0, id(my_font), id(my_red), TextAlign::TOP_LEFT, "Hello World!");
Configuration variables
***********************
Configuration variables:
************************
- **model** (**Required**): The model of the display. Options are:

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -321,11 +321,41 @@ use any string you pass it, like ``"ON"`` or ``"OFF"``.
Displaying Time
***************
With ESPHome you can also display the current time using the NTP protocol. Please see the example :ref:`here <strftime>`.
You can display current time using a time component. Please see the example :ref:`here <strftime>`.
.. _config-color:
Color
*****
When using RGB-capable displays in ESPHome you may wish to use custom colors.
A ``color`` component exists for just this purpose:
.. code-block:: yaml
color:
- id: my_light_red
red: 100%
green: 20%
blue: 25%
white: 0%
Configuration variables:
- **red** (*Optional*, percentage): The percentage of the red component. Defaults to ``100%``.
- **green** (*Optional*, percentage): The percentage of the green component. Defaults to ``100%``.
- **blue** (*Optional*, percentage): The percentage of the blue component. Defaults to ``100%``.
- **white** (*Optional*, percentage): The percentage of the white component. Defaults to ``100%``.
RGB displays use red, green, and blue, while grayscale displays may use white.
Images
******
Use this component to store graphical images on the device, you can then draw the images on compatible displays.
.. code-block:: yaml
image:
@ -338,7 +368,7 @@ Configuration variables:
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the image file.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the image later
in your display code.
- **resize** (*Optional*, int): If set, this will resize the image to fit inside the given dimensions ``WIDTHxHEIGHT``
- **resize** (*Optional*, string): If set, this will resize the image to fit inside the given dimensions ``WIDTHxHEIGHT``
and preserve the aspect ratio.
- **type** (*Optional*): Specifies how to encode image internally. Defaults to ``BINARY``.
@ -388,8 +418,8 @@ as the additional parameters.
Animation
*********
Animation inherits all options from the image component.
It adds an additional method to change the shown picture of a gif.
Allows to use animated images on displays. Animation inherits all options from the image component.
It adds an additional lambda method: ``next_frame()`` to change the shown picture of a gif.
.. code-block:: yaml
@ -426,6 +456,30 @@ This can be combined with all Lambdas:
lambda: |-
id(my_animation).next_frame();
Configuration variables:
^^^^^^^^^^^^^^^^^^^^^^^^
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the gif file.
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the animation later
in your display code.
- **resize** (*Optional*, string): If set, this will resize all the frames to fit inside the given dimensions ``WIDTHxHEIGHT``
and preserve the aspect ratio.
- **type** (*Optional*): Specifies how to encode each frame internally. Defaults to ``BINARY``.
- ``BINARY``: Two colors, suitable for 1 color displays or 2 color image in color displays. Uses 1 bit
per pixel, 8 pixels per byte.
- ``GREYSCALE``: Full scale grey. Uses 8 bits per pixel, 1 pixel per byte.
- ``RGB24``: Full RGB color stored. Uses 3 bytes per pixel.
- **dither** (*Optional*): Specifies which dither method used to process each frame, only used in GREYSCALE and BINARY type image.
Defaults to ``NONE``. You can read more about it `here <https://pillow.readthedocs.io/en/stable/reference/Image.html?highlight=Dither#PIL.Image.Image.convert>`__
and `here <https://en.wikipedia.org/wiki/Dither>`__.
- ``NONE``: Every pixel convert to its nearest color.
- ``FLOYDSTEINBERG``: Uses Floyd-Steinberg dither to approximate the original image luminosity levels.
.. _display-pages:
Display Pages
@ -495,6 +549,7 @@ You can then switch between these with three different actions:
- display.page.show_next: my_display
- component.update: my_display
See Also
--------

View File

@ -0,0 +1,277 @@
Inkplate 6
==========
.. seo::
:description: Instructions for setting up Inkplate E-Paper displays in ESPHome.
:image: inkplate.jpg
All-in-one e-paper display ``Inkplate 6``
Inkplate 6 is a powerful, Wi-Fi enabled ESP32 based six-inch e-paper display recycled from a Kindle e-reader. Its main feature is simplicity.
Learn more at `Inkplate's website <https://inkplate.io/>`__
.. figure:: images/inkplate.jpg
:align: center
:width: 75.0%
Inkplate 6
.. code-block:: yaml
# Example minimal configuration entry
mcp23017:
- id: mcp23017_hub
address: 0x20
display:
- platform: inkplate6
id: inkplate_display
greyscale: false
partial_updating: false
update_interval: 60s
ckv_pin: 32
sph_pin: 33
gmod_pin:
mcp23017: mcp23017_hub
number: 1
gpio0_enable_pin:
mcp23017: mcp23017_hub
number: 8
oe_pin:
mcp23017: mcp23017_hub
number: 0
spv_pin:
mcp23017: mcp23017_hub
number: 2
powerup_pin:
mcp23017: mcp23017_hub
number: 4
wakeup_pin:
mcp23017: mcp23017_hub
number: 3
vcom_pin:
mcp23017: mcp23017_hub
number: 5
.. warning::
When using the Inkplate epaper module, the GPIO pin numbers above *cannot be changed* as they are
hardwired within the module/PCB.
.. warning::
Inkplate module cannot perform partial update if 3 bit mode is on.
It just ignores the function call in that case.
Configuration variables:
************************
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **greyscale** (*Optional*, boolean): Makes the screen display 3 bit colors. Defaults to ``False``
- **partial_updating** (*Optional*, boolean): Makes the screen update partially, which is faster, but leaves burnin. Defaults to ``False``
- **full_update_every** (*Optional*, int): When partial updating is enabled, forces a full screen update after chosen number of updates. Defaults to ``10``
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **ckv_pin** (**Required**, :ref:`config-pin`): The CKV pin for the Inkplate display.
- **gmod_pin** (**Required**, :ref:`config-pin`): The GMOD pin for the Inkplate display.
- **gpio0_enable_pin** (**Required**, :ref:`config-pin`): The GPIO0 Enable pin for the Inkplate display.
- **oe_pin** (**Required**, :ref:`config-pin`): The OE pin for the Inkplate display.
- **powerup_pin** (**Required**, :ref:`config-pin`): The Powerup pin for the Inkplate display.
- **sph_pin** (**Required**, :ref:`config-pin`): The SPH pin for the Inkplate display.
- **spv_pin** (**Required**, :ref:`config-pin`): The SPV pin for the Inkplate display.
- **vcom_pin** (**Required**, :ref:`config-pin`): The VCOM pin for the Inkplate display.
- **cl_pin** (*Optional*, :ref:`config-pin`): The CL pin for the Inkplate display.
Defaults to GPIO0.
- **le_pin** (*Optional*, :ref:`config-pin`): The LE pin for the Inkplate display.
Defaults to GPIO2.
- **display_data_0_pin** (*Optional*, :ref:`config-pin`): The Data 0 pin for the Inkplate display.
Defaults to GPIO4.
- **display_data_1_pin** (*Optional*, :ref:`config-pin`): The Data 1 pin for the Inkplate display.
Defaults to GPIO5.
- **display_data_2_pin** (*Optional*, :ref:`config-pin`): The Data 2 pin for the Inkplate display.
Defaults to GPIO18.
- **display_data_3_pin** (*Optional*, :ref:`config-pin`): The Data 3 pin for the Inkplate display.
Defaults to GPIO19.
- **display_data_4_pin** (*Optional*, :ref:`config-pin`): The Data 4 pin for the Inkplate display.
Defaults to GPIO23.
- **display_data_5_pin** (*Optional*, :ref:`config-pin`): The Data 5 pin for the Inkplate display.
Defaults to GPIO25.
- **display_data_6_pin** (*Optional*, :ref:`config-pin`): The Data 6 pin for the Inkplate display.
Defaults to GPIO26.
- **display_data_7_pin** (*Optional*, :ref:`config-pin`): The Data 7 pin for the Inkplate display.
Defaults to GPIO27.
Complete example
****************
The following is a complete example YAML configuration that does a few things beyond the usual
Wi-Fi, API, and OTA configuration.
.. code-block:: yaml
# Example configuration entry
esphome:
name: inkplate
platform: ESP32
board: esp-wrover-kit
logger:
wifi:
ssid: <YOUR WIFI SSID>
password: <YOUR WIFI PASSWORD>
ap:
ssid: Inkplate-AP
password: '12345678'
captive_portal:
ota:
api:
switch:
- platform: restart
name: "Inkplate Reboot"
id: reboot
- platform: gpio
id: battery_read_mosfet
pin:
mcp23017: mcp23017_hub
number: 9
inverted: true
- platform: template
name: "Inkplate Greyscale mode"
lambda: return id(inkplate_display).get_greyscale();
turn_on_action:
- lambda: id(inkplate_display).set_greyscale(true);
turn_off_action:
- lambda: id(inkplate_display).set_greyscale(false);
- platform: template
name: "Inkplate Partial Updating"
lambda: return id(inkplate_display).get_partial_updating();
turn_on_action:
- lambda: id(inkplate_display).set_partial_updating(true);
turn_off_action:
- lambda: id(inkplate_display).set_partial_updating(false);
sensor:
- platform: adc
id: battery_voltage
update_interval: never
attenuation: 11db
pin: 35
- platform: template
name: "Inkplate Battery Voltage"
lambda: |-
id(battery_read_mosfet).turn_on();
delay(1);
float adc = id(battery_voltage).sample();
id(battery_read_mosfet).turn_off();
return adc;
filters:
- multiply: 2
i2c:
mcp23017:
- id: mcp23017_hub
address: 0x20
binary_sensor:
- platform: status
name: "Inkplate Status"
id: system_status
- platform: gpio
name: "Inkplate Touch Pad 1"
pin:
mcp23017: mcp23017_hub
number: 10
- platform: gpio
name: "Inkplate Touch Pad 2"
pin:
mcp23017: mcp23017_hub
number: 11
- platform: gpio
name: "Inkplate Touch Pad 3"
pin:
mcp23017: mcp23017_hub
number: 12
time:
- platform: sntp
id: esptime
font:
- file: "Helvetica.ttf"
id: helvetica_96
size: 96
- file: "Helvetica.ttf"
id: helvetica_48
size: 48
display:
- platform: inkplate6
id: inkplate_display
greyscale: false
partial_updating: false
update_interval: 60s
ckv_pin: 32
sph_pin: 33
gmod_pin:
mcp23017: mcp23017_hub
number: 1
gpio0_enable_pin:
mcp23017: mcp23017_hub
number: 8
oe_pin:
mcp23017: mcp23017_hub
number: 0
spv_pin:
mcp23017: mcp23017_hub
number: 2
powerup_pin:
mcp23017: mcp23017_hub
number: 4
wakeup_pin:
mcp23017: mcp23017_hub
number: 3
vcom_pin:
mcp23017: mcp23017_hub
number: 5
lambda: |-
it.fill(COLOR_ON);
it.print(100, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_LEFT, "ESPHome");
it.strftime(400, 300, id(helvetica_48), COLOR_OFF, TextAlign::CENTER, "%Y-%m-%d", id(esptime).now());
it.strftime(400, 400, id(helvetica_96), COLOR_OFF, TextAlign::CENTER, "%H:%M", id(esptime).now());
if (id(system_status).state) {
it.print(700, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_RIGHT, "Online");
} else {
it.print(700, 100, id(helvetica_48), COLOR_OFF, TextAlign::TOP_RIGHT, "Offline");
}
See Also
--------
- :doc:`index`
- `Arduino Inkplate 6 library <https://github.com/e-radionicacom/Inkplate-6-Arduino-library>`__ by `E-radionica.com <https://e-radionica.com/>`__
- :ghedit:`Edit`

View File

@ -7,8 +7,8 @@ Character-Based LCD Display
.. _lcd-pcf8574:
PCF8574
-------
lcd_pcf8574 Component
---------------------
The ``lcd_pcf8574`` display platform allows you to use standard character-based LCD displays like
`this one <https://docs.labs.mediatek.com/resource/linkit7697-arduino/en/tutorial/driving-1602-lcd-with-pcf8574-pcf8574a>`__
@ -56,8 +56,8 @@ Configuration variables:
.. _lcd-gpio:
GPIO
----
lcd_gpio Component
------------------
The ``lcd_gpio`` display platform allows you to use standard character-based LCD displays like `this one <https://www.adafruit.com/product/181>`__
with ESPHome. This integration is only for LCD displays that display individual characters on a screen (usually 16-20 columns

View File

@ -39,8 +39,7 @@ Configuration variables:
- **uart_id** (*Optional*, :ref:`config-id`): The ID of the :ref:`UART bus <uart>` you wish to use for this display.
Use this if you want to use multiple UART buses at once.
- **brightness** (*Optional*, percentage): Set the screen brightness. Must be in range
``0%`` to ``100%`` or ``0.0`` to ``1.0``. Defaults to ``100%``.
- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the nextion display.
See :ref:`display-nextion_lambda` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to call the lambda to update the display.

View File

@ -53,9 +53,9 @@ To use a backlight LIGHT pin needs to be connected to ground. If connected to GP
Configuration variables:
************************
- **reset_pin** (**Required**)(:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (**Required**)(:ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (**Required**)(:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -61,7 +61,7 @@ Configuration variables:
- **address** (*Optional*, int): Manually specify the :ref:`I²C <i2c>` address of the display. Defaults to 0x3C.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **brightness** (*Optional*): Set the screen brightness in percents 0.0-1.0. Defaults to `1.0` that corresponds to 100%.
- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
- **external_vcc** (*Optional*, boolean): Set this to true if you have the VCC pin connected to an external power supply.
Defaults to ``false``.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
@ -69,7 +69,6 @@ Configuration variables:
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
.. note::
@ -133,6 +132,7 @@ Configuration variables:
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin. Defaults to not connected.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
- **external_vcc** (*Optional*, boolean): Set this to true if you have the VCC pin connected to an external power supply.
Defaults to ``false``.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
@ -142,7 +142,6 @@ Configuration variables:
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
See Also
--------

View File

@ -7,8 +7,8 @@ SSD1322 OLED Display
.. _ssd1322-spi:
Usage
-----
``ssd1322_spi`` Component
-------------------------
The ``ssd1322_spi`` display platform allows you to use
SSD1322 (`datasheet <https://www.newhavendisplay.com/specs/NHD-3.12-25664UCW2.pdf>`__,
@ -47,9 +47,9 @@ Configuration variables:
- ``SSD1322 256x64``
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (:ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -7,8 +7,8 @@ SSD1325/7 OLED Display
.. _ssd1325-spi:
Usage
-----
``ssd1325_spi`` Component
-------------------------
The ``ssd1325_spi`` display platform allows you to use
SSD1325 (`datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1325.pdf>`__,
@ -44,8 +44,8 @@ that explains how to do this, if necessary.
lambda: |-
it.print(0, 0, id(font), "Hello World!");
Configuration Variables
***********************
Configuration variables:
************************
- **model** (**Required**): The model of the display. Options are:
@ -54,10 +54,10 @@ Configuration Variables
- ``SSD1325 96x16``
- ``SSD1325 64x48``
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (:ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that that the CS line is connected to.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that that the CS line is connected to.
The CS line can be connected to GND if this is the only device on the SPI bus.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -41,8 +41,8 @@ ESP; this is recommended as it improves reliability.
lambda: |-
it.print(0, 0, id(font), "Hello World!");
Configuration variables
***********************
Configuration variables:
************************
- **model** (**Required**): The model of the display. At present, only one option is available:
@ -52,13 +52,12 @@ Configuration variables
- **address** (*Optional*, int): Manually specify the :ref:`I²C <i2c>` address of the display. Defaults to 0x3D.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **brightness** (*Optional*): Set the screen brightness in percents 0.0-1.0. Defaults to `1.0` that corresponds to 100%.
- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
.. note::
@ -101,8 +100,8 @@ available pin on the ESP; this is recommended as it improves reliability.
lambda: |-
it.print(0, 0, id(font), "Hello World!");
Configuration variables
***********************
Configuration variables:
************************
- **model** (**Required**): The model of the display. At present, only one option is available:
@ -113,6 +112,7 @@ Configuration variables
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin. Defaults to not connected.
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated
by this option. One of ```` (default), ``90°``, ``180°``, ``270°``.
- **brightness** (*Optional*, percentage): Set display brightness in %. Defaults to ``100%``
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.
@ -120,7 +120,6 @@ Configuration variables
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
to use multiple SPI buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **brightness** (*Optional*, float): Manually override display brightness in %. Defaults to ``100%``
Configuration examples
**********************

View File

@ -39,13 +39,13 @@ require 5 volts connected to their ``+`` pin. Connect the GND or G pin to ground
lambda: |-
it.print(0, 0, id(font), "Hello World!");
Configuration variables
***********************
Configuration variables:
************************
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that that the CS line is connected to.
The CS line can be connected to GND if this is the only device on the SPI bus.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -7,8 +7,8 @@ SSD1351 OLED Display
.. _ssd1351-spi:
Usage
-----
``ssd1351_spi`` Component
-------------------------
The ``ssd1351_spi`` display platform allows you to use
SSD1351 (`datasheet <https://cdn-shop.adafruit.com/datasheets/SSD1351-Revision+1.3.pdf>`__,
@ -43,18 +43,17 @@ which should be connected to 3.3 volts only. Connect the GND or G pin to GND.
lambda: |-
it.print(0, 0, id(font), "Hello World!");
Configuration variables
***********************
Configuration variables:
************************
- **model** (**Required**): The model of the display. Options are:
- ``SSD1351 128x128`` (SSD1351 with 128 columns and 128 rows)
- ``SSD1351 128x96`` (SSD1351 with 128 columns and 96 rows)
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that that the CS line is connected to.
The CS line can be connected to GND if this is the only device on the SPI bus.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin on the ESP that that the CS line is connected to.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -6,7 +6,7 @@ ST7735 Display
:keywords: ST7735
:image: ST7735.png
ST7735 Display Driver.
ST7735 Display Driver.
Usage
-----
@ -32,7 +32,7 @@ There are numerous board types out there. Some initialize differently as well. T
model: "INITR_18BLACKTAB"
reset_pin: D4
cs_pin: D1
dc_pin: D2
dc_pin: D2
rotation: 0
devicewidth: 128
deviceheight: 160
@ -42,28 +42,28 @@ There are numerous board types out there. Some initialize differently as well. T
update_interval: 5s
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **model** (**Required**, "See Models Below"): This the model to use. INITR_BLACKTAB is the default
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **cs_pin** (:ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **devicewidth** (**Required**, int): The device width. 128 is default
- **deviceheight** (**Required**, int): The device height. 160 is default
- **colstart** (**Required**, int): The device height. 160 is default
- **rowstart** (**Required**, int): The device height. 160 is default
- **eightbitcolor** (*Optional*, "True/False" ): 8bit mode. Default is False. This saves 50% of the buffer required for the display.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **device_width** (**Required**, int): The device width. 128 is default
- **device_height** (**Required**, int): The device height. 160 is default
- **col_start** (**Required**, int): The device height. 160 is default
- **row_start** (**Required**, int): The device height. 160 is default
- **eight_bit_color** (*Optional*, "True/False" ): 8bit mode. Default is False. This saves 50% of the buffer required for the display.
- **reset_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
Memory notes:
~~~~~~~~~~~~~
*************
- 8Bit color saves 50% of the buffer required.
- eightbitcolor: True 160x128 = 20480 *Important for memory constrained devices*
- eightbitcolor: False 160x128x2 = 40960
- eightbitcolor: False 160x128x2 = 40960
Models:
~~~~~~~
*******
- INITR_GREENTAB
- INITR_REDTAB

View File

@ -50,13 +50,13 @@ hardwired programming. (OTA updates are of course possible after ESPHome is init
When using the TTGO T-Display module, the GPIO pin numbers above *cannot be changed* as they are
hardwired within the module/PCB.
Configuration variables
***********************
Configuration variables:
************************
- **backlight_pin** (:ref:`Pin Schema <config-pin_schema>`): The display's backlight pin.
- **cs_pin** (:ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (:ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (:ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **backlight_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The display's backlight pin.
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The CS pin.
- **dc_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The DC pin.
- **reset_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The RESET pin.
- **lambda** (*Optional*, :ref:`lambda <config-lambda>`): The lambda to use for rendering the content on the display.
See :ref:`display-engine` for more information.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``.

View File

@ -8,7 +8,7 @@ Waveshare E-Paper Display
The ``waveshare_epaper`` display platform allows you to use
some E-Paper displays sold by `Waveshare <https://www.waveshare.com/product/displays/e-paper.htm>`__
with ESPHome. The 2.13" `TTGO module <https://github.com/lewisxhe/TTGO-EPaper-Series>`__ with an ESP32 on the board is supported as well.
Depending on your specific revision of the board you might need to try out the `-b73` version (see below).
Depending on your specific revision of the board you might need to try out the `-b73` or `-b1` version (see below).
Similar modules sold by other vendors might also work but not have been tested yet. Currently only
single-color E-Ink displays are implemented and of those only a few modules.
@ -75,6 +75,7 @@ Configuration variables:
- ``2.13in`` (not tested)
- ``2.13in-ttgo`` (T5_V2.3 tested)
- ``2.13in-ttgo-b73`` (T5_V2.3 with B73 display tested)
- ``2.13in-ttgo-b1`` (T5_V2.3 with B1 display tested)
- ``2.70in`` (currently not working with the HAT Rev 2.1 version)
- ``2.90in``
- ``2.90inv2``

View File

@ -154,7 +154,7 @@ variable ``x`` of type ``std::vector<uint8_t>`` is passed to the automation for
Configuration variables:
- **mac_address** (*Optional*, MAC Address): The MAC address to filter for this automation.
- **manufacturer_id** (**Required**, string) 16 bit, 32 bit, or 128 bit BLE Manufacturer ID.
- **manufacturer_id** (**Required**, string): 16 bit, 32 bit, or 128 bit BLE Manufacturer ID.
- See :ref:`Automation <automation>`.
.. _esp32_ble_tracker-on_ble_service_data_advertise:
@ -182,7 +182,7 @@ variable ``x`` of type ``std::vector<uint8_t>`` is passed to the automation for
Configuration variables:
- **mac_address** (*Optional*, MAC Address): The MAC address to filter for this automation.
- **service_uuid** (**Required**, string) 16 bit, 32 bit, or 128 bit BLE Service UUID.
- **service_uuid** (**Required**, string): 16 bit, 32 bit, or 128 bit BLE Service UUID.
- See :ref:`Automation <automation>`.
See Also

View File

@ -49,6 +49,9 @@ Advanced options:
- **libraries** (*Optional*, list of libraries): A list of `platformio libraries <https://platformio.org/lib>`__
to include in the project. See `platformio lib install <https://docs.platformio.org/en/latest/userguide/lib/cmd_install.html>`__.
- **comment** (*Optional*, string): Additional text information about this node. Only for display in UI.
- **name_add_mac_suffix** (*Optional*, boolean): Appends the last 6 bytes of the mac address of the device to
the name in the form `<name>_aabbcc`. Defaults to ``False``.
See :ref:`esphome-mac_suffix`.
ESP8266 Options:
@ -297,6 +300,17 @@ Now upload the updated config to the device. As a second step, you now need to r
The same procedure can be done for changing the static IP of a device.
.. _esphome-mac_suffix:
Adding the MAC address as a suffix to the device name
-----------------------------------------------------
Using ``name_add_mac_suffix`` allows the user to compile a single binary file to flash
many of the same device and they will all have unique names/hostnames.
Note that you will still need to create an individual YAML config file if you want to
OTA update the devices in the future.
See Also
--------

View File

@ -48,9 +48,9 @@ Configuration variables:
- **manual_ip** (*Optional*): Manually configure the static IP of the node.
- **static_ip** (*Required*, IPv4 address): The static IP of your node.
- **gateway** (*Required*, IPv4 address): The gateway of the local network.
- **subnet** (*Required*, IPv4 address): The subnet of the local network.
- **static_ip** (**Required**, IPv4 address): The static IP of your node.
- **gateway** (**Required**, IPv4 address): The gateway of the local network.
- **subnet** (**Required**, IPv4 address): The subnet of the local network.
- **dns1** (*Optional*, IPv4 address): The main DNS server to use.
- **dns2** (*Optional*, IPv4 address): The backup DNS server to use.
@ -63,10 +63,10 @@ Configuration variables:
.. note::
If your ethernet board is not designed with an ESP32 built in, chances are that you are going
to use flying leads, dupont wires, etc. to connect the ethernet to the ESP32. This is
probably to fail as the ethernet interface uses a high frequency clock signal. For more
to use flying leads, dupont wires, etc. to connect the ethernet to the ESP32. This is
probably to fail as the ethernet interface uses a high frequency clock signal. For more
information and wiring details refer to the the link in the *See also* section.
Configuration for wESP32 board
------------------------------
@ -114,7 +114,7 @@ Configuration for OpenHacks LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
phy_addr: 1
Note: This board has an issue that might cause the ESP32 to boot in program mode. When testing, make sure you are monitoring the
serial output and reboot the device several times to see if it boots into the program properly.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -7,14 +7,13 @@ Fan Component
With the ``fan`` domain you can create components that appear as fans in
the Home Assistant frontend. A fan can be switched ON or OFF, optionally
has a speed setting (``LOW``, ``MEDIUM``, ``HIGH``) and can have an
oscillate output.
has a speed level between 1 and the maximum supported speed level of the fan, and can have an
oscillate and direction output.
This component restores its state on reboot/reset.
.. figure:: images/fan-ui.png
:align: center
:width: 70.0%
.. _config-fan:
@ -93,9 +92,8 @@ Configuration options:
- **id** (**Required**, :ref:`config-id`): The ID of the fan.
- **oscillating** (*Optional*, boolean, :ref:`templatable <config-templatable>`):
Set the oscillation state of the fan. Defaults to not affecting oscillation.
- **speed** (*Optional*, string, :ref:`templatable <config-templatable>`):
Set the speed setting of the fan. One of ``OFF``, ``LOW``, ``MEDIUM``, ``HIGH``.
If you template this value, return ``FAN_SPEED_...``, for example ``FAN_SPEED_HIGH``.
- **speed** (*Optional*, int, :ref:`templatable <config-templatable>`):
Set the speed level of the fan. Can be a number between 1 and the maximum speed level of the fan.
Full Fan Index
--------------

View File

@ -30,15 +30,9 @@ Configuration variables:
:ref:`output <output>` to use for the oscillation state of this fan. Default is empty.
- **direction_output** (*Optional*, :ref:`config-id`): The id of the
:ref:`output <output>` to use for the direction state of the fan. Default is empty.
- **speed** (*Optional*): Set the float values for each speed setting:
- **low** (*Required*, float): Set the value for the low speed
setting. Must be in range 0 to 1. Defaults to 0.33.
- **medium** (*Required*, float): Set the value for the medium speed
setting. Must be in range 0 to 1. Defaults to 0.66.
- **high** (*Required*, float): Set the value for the high speed
setting. Must be in range 0 to 1. Defaults to 1.
- **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. The value is used
to calculate the percentages for each speed. E.g. ``2`` means that you have 50% and 100% while ``100``
will allow 1% increments in the output. Defaults to ``100``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Fan Component <config-fan>`.

View File

@ -53,7 +53,7 @@ Configuration variables:
- **name** (**Required**, string): The name of the fan.
- **speed_datapoint** (**Required**, int): The datapoint id number of the fan speed.
- **switch_datapoint** (**Required**, int): The datapoint id number of the fan switch.
- **oscillation_datapoint** (**Optional**, int): The datapoint id number of the oscillation
- **oscillation_datapoint** (*Optional*, int): The datapoint id number of the oscillation
switch. Probably not supported on any Tuya controllers currently, but it's there if need be.
- All other options from :ref:`Fan <config-fan>`.

View File

@ -33,10 +33,7 @@ in your configuration - only the RX pin should be necessary.
time:
- platform: gps
Configuration variables:
------------------------
The component is split up in platforms.
The component is split up in platforms. No configuration variables.
First you need to define a global GPS module hub (as seen above).

View File

@ -49,6 +49,12 @@ This :ref:`action <config-action>` sends a GET request.
headers:
Content-Type: application/json
verify_ssl: false
on_response:
then:
- logger.log:
format: 'Response status: %d'
args:
- status_code
# Short form
- http_request.get: https://esphome.io
@ -57,6 +63,7 @@ Configuration variables:
- **url** (**Required**, string, :ref:`templatable <config-templatable>`): URL to send request.
- **headers** (*Optional*, mapping): Map of HTTP headers. Values are :ref:`templatable <config-templatable>`.
- **verify_ssl** (*Optional*, boolean): Verify the SSL certificate of the endpoint. Defaults to ``true``.
- **on_response** (*Optional*, :ref:`Automation <automation>`): An automation to perform when the request is finished.
.. note::
@ -112,6 +119,29 @@ Configuration variables:
- **method** (**Required**, string): HTTP method to use (``GET``, ``POST``, ``PUT``, ``DELETE``, ``PATCH``).
- All other options from :ref:`http_request-post_action`.
.. _http_request-on_response:
``on_response`` Trigger
-----------------------
This automation will be triggered when the HTTP request is finished and will supply the
http response code in parameter ``status_code`` as an ``int``.
.. code-block:: yaml
on_...
then:
- http_request.get:
url: https://esphome.io
verify_ssl: false
on_response:
then:
- logger.log:
format: "Response status: %d"
args:
- status_code
.. _http_request-examples:
Examples

View File

@ -11,9 +11,9 @@ I²C Bus
This component sets up the I²C bus for your ESP32 or ESP8266. In order for these components
to work correctly, you need to define the I²C bus in your configuration. Please note the ESP
will enable its internal 10kΩ pullup resistors for these pins, so you usually don't need to
put on external ones. You can use multiple devices on one I²C bus as each device is given a
unique address for communicating between it and the ESP. You can do this by hopping
wires from the two lines (SDA and SCL) from each device board to the next device board or by
put on external ones. You can use multiple devices on one I²C bus as each device is given a
unique address for communicating between it and the ESP. You can do this by hopping
wires from the two lines (SDA and SCL) from each device board to the next device board or by
connecting the wires from each device back to the two I²C pins on the ESP.
.. code-block:: yaml
@ -37,7 +37,7 @@ Configuration variables:
Defaults to ``True``.
- **frequency** (*Optional*, float): Set the frequency the I²C bus should operate on.
Defaults to ``50kHz``. Values are ``50kHz``, ``100kHz``, ``200kHz``, ... ``800kHz``
- **id** (*Optional*, :ref:`config-id`) Manually specify the ID for this I²C bus if you need multiple I²C buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this I²C bus if you need multiple I²C buses.
.. note::

View File

@ -77,7 +77,7 @@ This action toggles a light with the given ID when executed.
# Shorthand:
- light.toggle: light_1
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the light.
- **transition_length** (*Optional*, :ref:`config-time`, :ref:`templatable <config-templatable>`): The length of the transition
@ -121,7 +121,7 @@ This action turns a light with the given ID on when executed.
# Shorthand
- light.turn_on: light_1
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the light.
- **transition_length** (*Optional*, :ref:`config-time`, :ref:`templatable <config-templatable>`): The length of the transition
@ -180,7 +180,7 @@ This action turns a light with the given ID off when executed.
# Shorthand
- light.turn_off: light_1
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the light.
- **transition_length** (*Optional*, :ref:`config-time`, :ref:`templatable <config-templatable>`): The length of the transition
@ -214,7 +214,7 @@ is essentially just a combination of the turn_on and turn_off calls.
id: light_1
state: on
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the light.
- **state** (*Optional*, :ref:`templatable <config-templatable>`, boolean): Change the ON/OFF
@ -238,10 +238,10 @@ by a relative amount.
id: light_1
relative_brightness: 5%
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the light.
- **relative_brightness** (**Required***, :ref:`templatable <config-templatable>`, percentage):
- **relative_brightness** (**Required**, :ref:`templatable <config-templatable>`, percentage):
The relative brightness to dim the light by.
- **transition_length** (*Optional*, :ref:`config-time`, :ref:`templatable <config-templatable>`): The length of the transition.
@ -718,8 +718,12 @@ This effect allows you to access each LED individually in a custom light effect.
Available variables in the lambda:
- **it** - :apiclass:`AddressableLight <light::AddressableLight>` instance (see API reference for more info).
- **current_color** - :apistruct:`ESPColor <light::ESPColor>` instance (see API reference for more info).
- **initial_run** - A bool which is true on the first execution of the lambda. Useful to reset static variables when restarting an effect.
- **current_color** - :apistruct:`Color <Color>` instance (see API reference for more info).
- **initial_run** - A bool which is true on the first execution of the lambda. Useful to reset static variables when restarting a effect.
.. note::
ESPColor has been migrated to Color. See :apistruct:`Color <Color>` for more information.
.. code-block:: yaml
@ -733,18 +737,18 @@ Available variables in the lambda:
// it.size() - Number of LEDs
// it[num] - Access the LED at index num.
// Set the LED at num to the given r, g, b values
// it[num] = ESPColor(r, g, b);
// Get the color at index num (ESPColor instance)
// it[num] = Color(r, g, b);
// Get the color at index num (Color instance)
// it[num].get();
// Example: Simple color wipe
for (int i = it.size() - 1; i > 0; i--) {
it[i] = it[i - 1].get();
}
it[0] = ESPColor::random_color();
it[0] = Color::random_color();
// Bonus: use .range() and .all() to set many LEDs without having to write a loop.
it.range(0, 50) = ESPColor::BLACK;
it.range(0, 50) = Color::BLACK;
it.all().fade_to_black(10);
.. code-block:: yaml
@ -768,7 +772,7 @@ Available variables in the lambda:
// again you can use the initial_run variables
if (initial_run) {
progress = 0;
it.all() = ESPColor::BLACK;
it.all() = Color::BLACK;
// optionally do a return so nothing happens until the next update_interval
return;
}
@ -817,8 +821,10 @@ Configuration variables:
- **sequence** (*Optional*, :ref:`Action <config-action>`): The actions to perform in sequence
until the effect is stopped.
E1.31
*****
.. _e131-light-effect:
E1.31 Effect
************
This effect enables controlling addressable lights using UDP-based
E1.31_ protocol.
@ -840,16 +846,15 @@ For Example JINX_ or Hyperion.NG_ could be used to control E1.31_ enabled ESPHom
Configuration variables:
- **method** (*Optional*): Listening method, one of ``multicast`` or ``unicast``. Defaults to ``multicast``.
- **universe** (*Required*, integer): The value of universe, between 1 to 512.
- **universe** (**Required**, integer): The value of universe, between 1 to 512.
- **channels** (*Optional*): The type of data. This is used to specify if it is a ``MONO``,
``RGB`` or ``RGBW`` light and in which order the colors are. Defaults to ``RGB``.
There are three modes of operation:
- `MONO`: this supports 1 channel per LED (luminance), up-to 512 LEDs per universe
- `RGB`: this supports 3 channels per LED (RGB), up-to 170 LEDs (3*170 = 510 bytes) per universe
- `RGBW`: this supports 4 channels per LED (RGBW), up-to 128 LEDs (4*128 = 512 bytes) per universe
- ``MONO``: this supports 1 channel per LED (luminance), up-to 512 LEDs per universe
- ``RGB``: this supports 3 channels per LED (RGB), up-to 170 LEDs (3*170 = 510 bytes) per universe
- ``RGBW``: this supports 4 channels per LED (RGBW), up-to 128 LEDs (4*128 = 512 bytes) per universe
If there's more LEDs than allowed per-universe, additional universe will be used.
In the above example of 189 LEDs, first 170 LEDs will be assigned to 1 universe,
@ -858,14 +863,22 @@ the rest of 19 LEDs will be automatically assigned to 2 universe.
It is possible to enable multiple light platforms to listen to the same universe concurrently,
allowing to replicate the behaviour on multiple strips.
The udp port esphome is listenig on is 5568.
E1.31 Component
^^^^^^^^^^^^^^^
The :ref:`e131-light-effect` requires a component hub for the ``e131`` light effect.
Configuration variables:
- **method** (*Optional*): Listening method, one of ``multicast`` or ``unicast``. Defaults to ``multicast``.
.. _E1.31: https://www.doityourselfchristmas.com/wiki/index.php?title=E1.31_(Streaming-ACN)_Protocol
.. _JINX: http://www.live-leds.de/jinx-v1-3-with-resizable-mainwindow-real-dmx-and-sacne1-31/
.. _Hyperion.NG: https://github.com/hyperion-project/hyperion.ng
Adalight
********
Adalight Effect
***************
This effect enables controlling addressable lights using UART-based
Adalight_ protocol, allowing to create realtime ambient lighting effects.
@ -902,8 +915,8 @@ Configuration variables:
.. _Adalight: https://learn.adafruit.com/adalight-diy-ambient-tv-lighting
.. _Prismatik: https://github.com/psieg/Lightpack
WLED
****
WLED Effect
***********
This effect enables controlling addressable lights using UDP-based
`UDP Realtime Control`_ protocol used by WLED_, allowing to create realtime ambient

View File

@ -37,6 +37,9 @@ Advanced settings:
Defaults to ``UART0``.
- **esp8266_store_log_strings_in_flash** (*Optional*, boolean): If set to false, disables storing
log strings in the flash section of the device (uses more memory). Defaults to true.
- **on_message** (*Optional*, :ref:`Automation <automation>`): An action to be
performed when a message is to be looged. The vairables ``int level``, ``const char* tag`` and
``const char* message`` are available for lambda processing.
.. _logger-hardware_uarts:

View File

@ -15,8 +15,8 @@ The Microchip MCP230xx series of general purpose, parallel I/O expansion for I²
.. _mcp23008-label:
MCP23008
--------
MCP23008 Component
------------------
The MCP23008 component (`datasheet <http://ww1.microchip.com/downloads/en/devicedoc/21919e.pdf>`__,
`Adafruit <https://www.adafruit.com/product/593>`__) has 8 GPIOs that can be configured independently.
@ -33,7 +33,7 @@ The MCP23008 component (`datasheet <http://ww1.microchip.com/downloads/en/device
- platform: gpio
name: "MCP23008 Pin #0"
pin:
mcp23008: mcp23008_hub
mcp23xxx: mcp23008_hub
# Use pin number 0
number: 0
mode: OUTPUT
@ -44,7 +44,7 @@ The MCP23008 component (`datasheet <http://ww1.microchip.com/downloads/en/device
- platform: gpio
name: "MCP23008 Pin #1"
pin:
mcp23008: mcp23008_hub
mcp23xxx: mcp23008_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
@ -52,7 +52,7 @@ The MCP23008 component (`datasheet <http://ww1.microchip.com/downloads/en/device
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP23008 component.
- **address** (*Optional*, int): The I²C address of the driver.
@ -61,10 +61,20 @@ Configuration variables:
Useful when the MCP23008's power supply is greater than 3.3 volts. Note that this pin
will require a pull-up resistor (to 3.3 volts) when this mode is enabled.
Pin configuration variables:
****************************
- **mcp23xxx** (**Required**, :ref:`config-id`): The id of the MCP23008 component.
- **interrupt** (*Optional*): Set this pin to trigger the INT pin on the component. Can be one of ``CHANGE``, ``RISING``, ``FALLING``.
- **number** (**Required**, integer): The pin number.
- **inverted** (*Optional*, boolean): If all read and written values
should be treated as inverted. Defaults to ``False``.
- **mode** (*Optional*, string): A pin mode to set for the pin at. One of ``INPUT`` or ``OUTPUT``.
.. _mcp23016-label:
MCP23016
--------
MCP23016 Component
------------------
The MCP23016 component (`datasheet <http://ww1.microchip.com/downloads/en/devicedoc/20090c.pdf>`__)
has 16 GPIOs and can be configured the same way than the other variants.
@ -104,16 +114,23 @@ has 16 GPIOs and can be configured the same way than the other variants.
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP23016 component.
- **address** (*Optional*, int): The I²C address of the driver.
Defaults to ``0x20``.
Pin configuration variables:
****************************
- **mcp23xxx** (**Required**, :ref:`config-id`): The id of the MCP23016 component.
- All other options from :ref:`Pin Schema <config-pin_schema>`
.. _mcp23017-label:
MCP23017
--------
MCP23017 Component
------------------
The MCP23017 component allows you to use MCP23017 I/O expanders
(`datasheet <http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf>`__,
@ -137,7 +154,7 @@ binary sensor or GPIO switch.
- platform: gpio
name: "MCP23017 Pin #0"
pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
# Use pin number 0
number: 0
mode: OUTPUT
@ -148,7 +165,7 @@ binary sensor or GPIO switch.
- platform: gpio
name: "MCP23017 Pin #1"
pin:
mcp23017: mcp23017_hub
mcp23xxx: mcp23017_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
@ -156,7 +173,7 @@ binary sensor or GPIO switch.
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP23017 component.
- **address** (*Optional*, int): The I²C address of the driver.
@ -165,6 +182,13 @@ Configuration variables:
Useful when the MCP23017's power supply is greater than 3.3 volts. Note that these pins
will require pull-up resistors (to 3.3 volts) when this mode is enabled.
Pin configuration variables:
****************************
- **mcp23xxx** (**Required**, :ref:`config-id`): The id of the MCP23017 component.
- **interrupt** (*Optional*): Set this pin to trigger the port INT pin on the component. Can be one of ``CHANGE``, ``RISING``, ``FALLING``.
- All other options from :ref:`Pin Schema <config-pin_schema>`
See Also
--------

View File

@ -15,8 +15,8 @@ This is exactly the same API as the MCP23SXX I/O Expander except talks on the SP
.. _mcp23S08-label:
MCP23S08
--------
MCP23S08 Component
------------------
The MCP23S08 component (`datasheet <http://ww1.microchip.com/downloads/en/DeviceDoc/MCP23008-MCP23S08-Data-Sheet-20001919F.pdf>`__,
`Digi-Key <https://www.digikey.com/product-detail/en/microchip-technology/MCP23S08-E-P/MCP23S08-E-P-ND/735954>`__) has 8 GPIOs that can be configured independently.
@ -34,7 +34,7 @@ The MCP23S08 component (`datasheet <http://ww1.microchip.com/downloads/en/Device
- platform: gpio
name: "MCP23S08 Pin #0"
pin:
mcp23s08: mcp23s08_hub
mcp23xxx: mcp23s08_hub
# Use pin number 0
number: 0
# One of INPUT, INPUT_PULLUP or OUTPUT
@ -46,7 +46,7 @@ The MCP23S08 component (`datasheet <http://ww1.microchip.com/downloads/en/Device
- platform: gpio
name: "MCP23S08 Pin #1"
pin:
mcp23s08: mcp23s08_hub
mcp23xxx: mcp23s08_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
@ -54,18 +54,28 @@ The MCP23S08 component (`datasheet <http://ww1.microchip.com/downloads/en/Device
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP23S08 component.
- **cs_pin** (*Required*, int): The SPI chip select pin to use
- **cs_pin** (**Required**, int): The SPI chip select pin to use
- **deviceaddress** (*Optional*, int): The address of the chip.
Defaults to ``0``.
- **open_drain_interrupt** (*Optional*, bool): Configure interrupt pins to open-drain mode.
Useful when the MCP23S08's power supply is greater than 3.3 volts. Note that these pins
will require pull-up resistors (to 3.3 volts) when this mode is enabled.
Pin Configuration Variables:
****************************
- **mcp23xxx** (**Required**, :ref:`config-id`): The id of the MCP23S08 component.
- **interrupt** (*Optional*): Set this pin to trigger the INT pin on the component. Can be one of ``CHANGE``, ``RISING``, ``FALLING``.
- All other options from :ref:`Pin Schema <config-pin_schema>`
.. _mcp23S17-label:
MCP23S17
--------
MCP23S17 Component
------------------
The MCP23S17 component allows you to use MCP23S17 I/O expanders
(`datasheet <http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf>`__,
@ -90,7 +100,7 @@ binary sensor or GPIO switch.
- platform: gpio
name: "MCP23S17 Pin #0"
pin:
mcp23s17: mcp23s17_hub
mcp23xxx: mcp23s17_hub
# Use pin number 0
number: 0
mode: OUTPUT
@ -101,7 +111,7 @@ binary sensor or GPIO switch.
- platform: gpio
name: "MCP23S17 Pin #1"
pin:
mcp23s17: mcp23s17_hub
mcp23xxx: mcp23s17_hub
# Use pin number 1
number: 1
# One of INPUT or INPUT_PULLUP
@ -109,12 +119,22 @@ binary sensor or GPIO switch.
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP23S17 component.
- **cs_pin** (*Required*, int): The SPI chip select pin to use.
- **cs_pin** (**Required**, int): The SPI chip select pin to use.
- **deviceaddress** (*Optional*, int): The address of the chip.
Defaults to ``0``.
- **open_drain_interrupt** (*Optional*, bool): Configure interrupt pins to open-drain mode.
Useful when the MCP23S17's power supply is greater than 3.3 volts. Note that these pins
will require pull-up resistors (to 3.3 volts) when this mode is enabled.
Pin Configuration Variables:
****************************
- **mcp23xxx** (**Required**, :ref:`config-id`): The id of the MCP23S17 component.
- **interrupt** (*Optional*): Set this pin to trigger the port INT pin on the component. Can be one of ``CHANGE``, ``RISING``, ``FALLING``.
- All other options from :ref:`Pin Schema <config-pin_schema>`
See Also

View File

@ -48,7 +48,7 @@ Configuration variables:
- **topic_prefix** (*Optional*, string): The prefix used for all MQTT
messages. Should not contain trailing slash. Defaults to
``<APP_NAME>``.
- **log_topic** (*Optional*, :ref:`mqtt-message`) The topic to send MQTT log
- **log_topic** (*Optional*, :ref:`mqtt-message`): The topic to send MQTT log
messages to.
- **birth_message** (*Optional*, :ref:`mqtt-message`): The message to send when
a connection to the broker is established. See :ref:`mqtt-last_will_birth` for more information.
@ -440,9 +440,9 @@ Publish an MQTT message on a topic using this action in automations.
Configuration options:
- **topic** (*Required*, string, :ref:`templatable <config-templatable>`):
- **topic** (**Required**, string, :ref:`templatable <config-templatable>`):
The MQTT topic to publish the message.
- **payload** (*Required*, string, :ref:`templatable <config-templatable>`): The message content.
- **payload** (**Required**, string, :ref:`templatable <config-templatable>`): The message content.
- **qos** (*Optional*, int, :ref:`templatable <config-templatable>`): The `Quality of
Service <https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels>`__
level of the topic. Defaults to 0.
@ -491,9 +491,9 @@ as seen below.
Configuration options:
- **topic** (*Required*, string, :ref:`templatable <config-templatable>`):
- **topic** (**Required**, string, :ref:`templatable <config-templatable>`):
The MQTT topic to publish the message.
- **payload** (*Required*, :ref:`lambda <config-lambda>`): The message content.
- **payload** (**Required**, :ref:`lambda <config-lambda>`): The message content.
- **qos** (*Optional*, int): The `Quality of
Service <https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels>`__
level of the topic. Defaults to 0.

View File

@ -39,12 +39,13 @@ Configuration variables:
automatically be switched on too.
- **inverted** (*Optional*, boolean): If the output should be treated
as inverted. Defaults to ``False``.
- **min_power** (*Optional*, float): Only for float outputs. Sets the
minimum output value of this output platform.
Must be in range from 0 to max_power. Defaults to 0.
- **max_power** (*Optional*, float): Only for float outputs. Sets the
maximum output value of this output platform.
Must be in range from min_power to 1. Defaults to 1.
Float outputs only:
- **min_power** (*Optional*, float): Sets the minimum output value of this output platform.
Must be in range from 0 to max_power. Defaults to ``0``.
- **max_power** (*Optional*, float): Sets the maximum output value of this output platform.
Must be in range from min_power to 1. Defaults to ``1``.
.. _output-turn_on_action:

View File

@ -0,0 +1,57 @@
MCP4725 Output
==============
.. seo::
:description: Instructions for setting up MCP4725 outputs on the ESP.
:image: mcp4725.png
The MCP4725 output component allows to use `12bit external DAC
<https://learn.sparkfun.com/tutorials/mcp4725-digital-to-analog-converter-hookup-guide/all>`__
in order to have analog output(s) on any board by using I2C. Devices default address is ``0x60``
and configurable alternative is ``0x61``.
.. code-block:: yaml
# Example configuration entry
# Set a global i2c connection
i2c:
sda: 21
scl: 22
scan: True
# Set the output with default (address: 0x60 / global i2c)
output:
- platform: mcp4725
id: dac_output
on_...:
then:
- output.set_level:
id: dac_output
level: 100%
Configuration variables:
------------------------
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **address** (*Optional*, int): Manually specify the I2C address of
the DAC. Defaults to ``0x60``.
- All other options from :ref:`Output <config-output>`.
Usage with voltages higher than 3.3v
------------------------------------
In order to drive analog modules with voltages higher than 3.3v, use a `TTL bi-directionnal level
converter <https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide/all>`__
Be careful about what converter you use, some of of them have channels labeled with `RX` and `TX`,
in this case only `TX` channels are bi-directional (so you must use 2 `TX` channels for I2C to work).
See Also
--------
- :doc:`/components/output/esp32_dac`
- :doc:`/components/output/esp8266_pwm`
- :ghedit:`Edit`

View File

@ -8,8 +8,8 @@ MY9231/MY9291 LED driver
.. _my9231-component:
Component
---------
Component/Hub
-------------
The MY9231/MY9291 component represents a MY9231/MY9291 LED diver chain
(`MY9231 description <http://www.my-semi.com.tw/file/MY9231_BF_0.91.pdf>`__,
@ -57,6 +57,40 @@ Configuration variables:
this ``my9231`` component. Use this if you have multiple MY9231/MY9291 chains
connected at the same time.
.. _my9231-output:
Output
------
The MY931/MY9291 output component exposes a MY931/MY9291 channel of a global
:ref:`my9231-component` as a float output.
.. code-block:: yaml
# Example configuration entry
my9231:
- data_pin: GPIO12
clock_pin: GPIO14
# Individual outputs
output:
- platform: my9231
id: 'my9231_output1'
channel: 0
Configuration variables:
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **channel** (**Required**, int): Chose the channel of the MY9231/MY9291 chain of
this output component. Channel 0 is the most close channel.
- **my9231_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
:ref:`my9231-component`.
Use this if you have multiple MY9231/MY9291 chains you want to use at the same time.
- All other options from :ref:`Output <config-output>`.
Sonoff B1 configuration example
-------------------------------
@ -172,38 +206,6 @@ And here is a complete configuration for the AiThinker AiLight:
white: output_cold_white
.. _my9231-output:
Driver Output
-------------
The MY931/MY9291 output component exposes a MY931/MY9291 channel of a global
:ref:`my9231-component` as a float output.
.. code-block:: yaml
# Example configuration entry
my9231:
- data_pin: GPIO12
clock_pin: GPIO14
# Individual outputs
output:
- platform: my9231
id: 'my9231_output1'
channel: 0
Configuration variables:
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **channel** (**Required**, int): Chose the channel of the MY9231/MY9291 chain of
this output component. Channel 0 is the most close channel.
- **my9231_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the
:ref:`my9231-component`.
Use this if you have multiple MY9231/MY9291 chains you want to use at the same time.
- All other options from :ref:`Output <config-output>`.
See Also
--------

View File

@ -8,8 +8,8 @@ SM16716 LED driver
.. _sm16716-component:
Component
---------
Component/Hub
-------------
The SM16716 component represents a SM16716 LED diver chain
(`SM16716 description <https://github.com/sowbug/sm16716/blob/master/SM16716%20Datasheet%20%5BChinese%5D.pdf>`__,
@ -61,8 +61,8 @@ Configuration variables:
.. _sm16716-output:
Driver Output
-------------
Output
------
The SM16716 output component exposes a SM16716 channel of a global
:ref:`sm16716-component` as a float output.

View File

@ -38,8 +38,8 @@ Configuration variables:
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **type** (**Required**, string): The type of output. One of ``binary`` and ``float``.
- **on_write_action** (*Required*, :ref:`Action <config-action>`): The action that should
be performed when the state of the output is updated.
- **write_action** (**Required**, :ref:`Automation <automation>`): An automation to perform
when the state of the output is updated.
- All other options from :ref:`Output <config-output>`.
See :apiclass:`output::BinaryOutput` and :apiclass:`output::FloatOutput`.
@ -51,13 +51,13 @@ See :apiclass:`output::BinaryOutput` and :apiclass:`output::FloatOutput`.
.. _output-template-on_write_action:
``output.template.on_write`` Action
-----------------------------------
``write_action`` Trigger
------------------------
When the state for this output is updated, the on_write action is executed.
When the state for this output is updated, the ``write_action`` is triggered.
It is possible to access the state value inside Lambdas:
.. code-block:: yaml
.. code-block:: yaml
- platform: template
id: my_output

View File

@ -47,13 +47,24 @@ not work.
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this PCF8574 component.
- **address** (*Optional*, int): The I²C address of the driver.
Defaults to ``0x21``.
- **pcf8575** (*Optional*, boolean): Whether this is a 16-pin PCF8575. Defaults to ``False``.
Pin configuration variables:
****************************
- **pcf8574** (**Required**, :ref:`config-id`): The id of the PCF8574 component of the pin.
- **number** (**Required**, integer): The pin number.
- **inverted** (*Optional*, boolean): If all read and written values
should be treated as inverted. Defaults to ``False``.
- **mode** (*Optional*, string): A pin mode to set for the pin at. One of ``INPUT`` or ``OUTPUT``.
See Also
--------

View File

@ -36,6 +36,7 @@ Configuration variables:
- **pioneer**: Decode and dump Pioneer infrared codes.
- **jvc**: Decode and dump JVC infrared codes.
- **samsung**: Decode and dump Samsung infrared codes.
- **samsung36**: Decode and dump Samsung36 infrared codes.
- **sony**: Decode and dump Sony infrared codes.
- **rc_switch**: Decode and dump RCSwitch RF codes.
- **rc5**: Decode and dump RC5 IR codes.
@ -80,6 +81,9 @@ Automations:
- **on_samsung** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Samsung remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::SamsungData`
is passed to the automation for use in lambdas.
- **on_samsung36** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Samsung36 remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::Samsung36Data`
is passed to the automation for use in lambdas.
- **on_panasonic** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Panasonic remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::PanasonicData`
is passed to the automation for use in lambdas.
@ -153,6 +157,11 @@ Remote code selection (exactly one of these has to be included):
- **data** (**Required**, int): The data to trigger on, see dumper output for more info.
- **samsung36**: Trigger on a decoded Samsung36 remote code with the given data.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
- **command** (**Required**, int): The command.
- **panasonic**: Trigger on a decoded Panasonic remote code with the given data.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
@ -211,10 +220,10 @@ Remote code selection (exactly one of these has to be included):
remote_transmitter:
pin: 5
carrier_duty_percent: 100%
.. note::
To caputure the codes more effectively with directly connected receiver like tsop38238 you can try to use `INPUT_PULLUP`:
To caputure the codes more effectively with directly connected receiver like tsop38238 you can try to use ``INPUT_PULLUP``:
.. code-block:: yaml

View File

@ -78,6 +78,9 @@ Configuration variables:
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in
Home Assistant, you'll want to set the **times** to 10 and the **wait_time** to 0s.
If you're looking for the same functionality as is default in the ``rpi_rf`` integration in
Home Assistant, you'll want to set the **times** to 10 and the **wait_time** to 0s.
.. _remote_transmitter-transmit_raw:
``remote_transmitter.transmit_raw`` Action
@ -209,6 +212,24 @@ Configuration variables:
- **data** (**Required**, int): The data to send, see dumper output for more details.
- All other options from :ref:`remote_transmitter-transmit_action`.
``remote_transmitter.transmit_samsung36`` Action
************************************************
This :ref:`action <config-action>` sends a Samsung36 infrared remote code to a remote transmitter.
.. code-block:: yaml
on_...:
- remote_transmitter.transmit_samsung36:
address: 0x0400
command: 0x000E00FF
Configuration variables:
- **address** (**Required**, int): The address to send, see dumper output for more details.
- **command** (**Required**, int): The Samsung36 command to send, see dumper output for more details.
- All other options from :ref:`remote_transmitter-transmit_action`.
``remote_transmitter.transmit_panasonic`` Action
************************************************
@ -244,7 +265,7 @@ This :ref:`action <config-action>` sends a Pioneer infrared remote code to a rem
Configuration variables:
- **rc_code_1** (**Required**, int): The remote control code to send, see dumper output for more details.
- **rc_code_2** (**Optional**, int): The secondary remote control code to send; some codes are sent in
- **rc_code_2** (*Optional*, int): The secondary remote control code to send; some codes are sent in
two parts.
- Note that ``repeat`` is still optional, however **Pioneer devices may require that a given code is
received multiple times before they will act on it.** Add this if your device does not respond to

View File

@ -5,6 +5,12 @@ APDS9960 Sensor
:description: Instructions for setting up APDS9960 sensors.
:image: apds9960.jpg
.. _apds9960-component:
Component/Hub
-------------
The ``apds9960`` sensor platform allows you to use your APDS9960 RGB and gesture sensors
(`datasheet <https://cdn.sparkfun.com/datasheets/Sensors/Proximity/apds9960.pdf>`__,
`SparkFun`_) with ESPHome.
@ -49,7 +55,13 @@ Base Configuration:
- **update_interval** (*Optional*, :ref:`config-time`): The interval
to check the sensor. Defaults to ``60s``.
Sensor Configuration:
Sensor
------
The ``apds9960`` sensor allows you to use your :doc:`apds9960` to perform different
measurements.
Configuration variables:
- **name** (**Required**, string): The name for the sensor.
- **type** (**Required**, string): The type of sensor measurement. One of
@ -63,7 +75,13 @@ Sensor Configuration:
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
Binary Sensor Configuration:
Binary Sensor
-------------
The ``apds9960`` binary sensor allows you to use your :doc:`apds9960` to perform different
measurements.
Configuration variables:
- **name** (**Required**, string): The name for the binary sensor.
- **direction** (**Required**, string): The direction to measure. One of:

View File

@ -6,7 +6,7 @@ AMS AS3935 Franklin Lightning Sensor
:image: images/as3935.jpg
:keywords: as3935
The ``as3935`` sensor platform allows you to use your AS3935 sensor
The **AS3935** sensor platform allows you to use your AS3935 sensor
(`AliExpress`_, `AMS_AS3935`_)
in order to get notified when a thunderstorm is getting close.
@ -14,6 +14,9 @@ The AS3935 can detect the presence of lightning activity and provide an estimati
on the distance to the head of the storm. The chip issues a notification through an interrupt
pin.
Component/Hub
-------------
The AS3935 can be configured to use either the SPI **or** I²C protocol for data communication.
First choose which communication method you want to use for the sensor, set the SI pin for the appropriate
level and set up the ESPhome integration for the chosen communication method.
@ -46,17 +49,20 @@ A1 I²C address selection MSB
.. _AliExpress: https://de.aliexpress.com/af/as3935.html?SearchText=as3935
.. _AMS_AS3935: https://ams.com/as3935
Over SPI
--------
The ``as3935_spi`` sensor platform allows you to use your AS3935 sensor
(`AliExpress`_, `AMS_AS3935`_) in order to get notified when a thunderstorm is getting close.
.. code-block:: yaml
# Example configuration for SPI (decide for one!)
as3935_spi:
cs_pin: GPIO12
irq_pin: GPIO13
# Example configuration for I²C (decide for one!)
as3935_i2c:
irq_pin: GPIO12
# Example configuration for creating sensors
# Example lightning and energy sensor
sensor:
- platform: as3935
lightning_energy:
@ -68,9 +74,10 @@ A1 I²C address selection MSB
name: "Storm Alert"
Configuration variables (shared):
---------------------------------
Configuration variables:
************************
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The chip select pin.
- **irq_pin** (**Required**, :ref:`config-pin`): The IRQ pin, which indicates if a lightning strike has been detected.
- **indoor** (*Optional*, boolean): Indicates if the sensor is used indoor. Defaults to ``true``.
- **noise_level** (*Optional*, integer): Noise floor level is compared to known reference voltage.
@ -90,34 +97,16 @@ Configuration variables (shared):
- **capacitance** (*Optional*, integer): This setting will add capacitance to the series RLC antenna on the product
to help tune its resonance. The datasheet specifies being within 3.5 percent of 500kHz to get optimal lightning
detection and distance sensing. It's possible to add up to 120pF in steps of 8pF to the antenna. Defaults to ``0``.
- **watchdog_threshold** (*Optional*, integer): Determines the threshold for events that trigger the IRQ pin.
Defaults to ``2``.
Sensor entries:
- **lightning_energy** (*Optional*): Lightning energy value. According to the datasheet this is only a pure value that doesn't have any physical meaning.
Over I²C
--------
- **name** (**Required**, string): The name for the lightning energy sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **distance** (*Optional*): Distance in km to the front of the storm and not the distance to a lightning strike.
The ``as3935_i2c`` sensor platform allows you to use your AS3935 sensor
(`AliExpress`_, `AMS_AS3935`_) in order to get notified when a thunderstorm is getting close.
- **name** (**Required**, string): The name for the distance sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **binary sensor** (*Optional*): Binary sensor that indicates if a lightning strike was detected.
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*,
:ref:`config-id`): Manually specify
the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
Configuration variables (I²C):
-------------------------------
Use this if you want to use your AS3935 in I²C mode.
.. code-block:: yaml
@ -135,33 +124,67 @@ Use this if you want to use your AS3935 in I²C mode.
- platform: as3935
name: "Storm Alert"
Configuration variables:
************************
- **address** (*Optional*, int): Manually specify the I²C address of
the sensor. Defaults to ``0x03`` (``A0` and ``A1`` pins pulled low).
Another address can be ``0x02``.
- **irq_pin** (**Required**, :ref:`config-pin`): The IRQ pin, which indicates if a lightning strike has been detected.
- **indoor** (*Optional*, boolean): Indicates if the sensor is used indoor. Defaults to ``true``.
- **noise_level** (*Optional*, integer): Noise floor level is compared to known reference voltage.
If this level is exceeded the chip will issue an interrupt to the IRQ pin, broadcasting that it can not
operate properly due to noise (INT_NH). Defaults to ``2``.
- **spike_rejection** (*Optional*, integer): Helps to differentiate between real events and actual lightning.
Increasing this value increases robustness at the cost of sensitivity to distant events. Defaults to ``2``.
- **lightning_threshold** (*Optional*, integer): The number of lightnings that must appear in a 15-minute time
window before a lightning storm is detected.
15 minutes is the window of time before the number of detected lightning events is reset.
The number of lightning strikes can be set to 1,5,9, or 16. Defaults to ``1``.
- **mask_disturber** (*Optional*, boolean): This setting will return whether or not disturbers trigger
the IRQ Pin. Defaults to ``false``.
- **div_ratio** (*Optional*, integer): The antenna is designed to resonate at 500kHz and so can be tuned
with the following setting. The accuracy of the antenna must be within 3.5 percent of that value for
proper signal validation and distance estimation. Defaults to ``0``.
- **capacitance** (*Optional*, integer): This setting will add capacitance to the series RLC antenna on the product
to help tune its resonance. The datasheet specifies being within 3.5 percent of 500kHz to get optimal lightning
detection and distance sensing. It's possible to add up to 120pF in steps of 8pF to the antenna. Defaults to ``0``.
- **watchdog_threshold** (*Optional*, integer): Determines the threshold for events that trigger the IRQ pin.
Defaults to ``2``.
Configuration variables (SPI):
------------------------------
Use this if you want to use your AS3935 in SPI mode.
Sensor
------
.. code-block:: yaml
A sensor platform to read lightning data
# Example configuration for SPI (decide for one!)
as3935_spi:
cs_pin: GPIO12
irq_pin: GPIO13
# Example lightning and energy sensor
sensor:
- platform: as3935
lightning_energy:
name: "Lightning Energy"
distance:
name: "Distance Storm"
binary_sensor:
- platform: as3935
name: "Storm Alert"
Configuration variables:
- **lightning_energy** (*Optional*): Lightning energy value. According to the datasheet this is only a pure value that doesn't have any physical meaning.
- **name** (**Required**, string): The name for the lightning energy sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **distance** (*Optional*): Distance in km to the front of the storm and not the distance to a lightning strike.
- **name** (**Required**, string): The name for the distance sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
Binary Sensor
-------------
Binary sensor that indicates if a lightning strike was detected.
Configuration variables:
- **name** (**Required**, string): The name of the binary sensor.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.
- **cs_pin** (*Required*, :ref:`Pin Schema <config-pin_schema>`): The chip select pin.
See Also
--------

View File

@ -76,7 +76,7 @@ Let's now also take a closer look at this line, which you might not be too used
.. code-block:: cpp
class MyCustomSensor : public Component, public Sensor {
class MyCustomSensor : public Component, public Sensor {
What this line is essentially saying is that we're defining our own class that's called ``MyCustomSensor``
which is also a subclass of :apiclass:`Component` and :apiclass:`Sensor <sensor::Sensor>`.
@ -137,7 +137,7 @@ One last thing. Some sensors, such as the BMP180 were are going to explain later
.. code-block:: cpp
float get_setup_priority() const override { return esphome::setup_priority::HARDWARE; }
Where HARDWARE can be any of:
.. code-block:: cpp
@ -161,7 +161,7 @@ Where HARDWARE can be any of:
extern const float AFTER_CONNECTION;
/// For components that should be initialized at the very end of the setup process.
extern const float LATE;
Now don't let the wording confuse you. The ``get_setup_priority()`` method is an override. Instead of fetching the setup priority setup for us, it instead fetches the setup priority for esphome, while being defined by us. The BMP180 would for instance need to be setup with a priority of IO or lower. A serial streaming (TCP) server would require a working WIFI setup and therefore get AFTER_WIFI.
This finalizes our example as:
@ -172,9 +172,9 @@ This finalizes our example as:
public:
// constructor
MyCustomSensor() : PollingComponent(15000) {}
float get_setup_priority() const override { return esphome::setup_priority::XXXX; }
void setup() override {
// This will be called by App.setup()
}
@ -182,7 +182,7 @@ This finalizes our example as:
// This will be called every "update_interval" milliseconds.
}
};
Step 2: Registering the custom sensor
-------------------------------------
@ -403,6 +403,7 @@ Note that the number of arguments you put in the curly braces *must* match the n
``sensors:`` block - *and* they must be in the same order.
Configuration variables:
************************
- **lambda** (**Required**, :ref:`lambda <config-lambda>`): The lambda to run for instantiating the
sensor(s).

View File

@ -45,8 +45,8 @@ Configuration variables:
.. _dallas-sensor:
Sensors
-------
Sensor
------
The ``dallas`` sensor allows you to use DS18B20 and similar sensors.
First, you need to define a :ref:`dallas sensor component <dallas-component>`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -27,6 +27,7 @@ override them if you want to.
# Optional variables:
unit_of_measurement: "°C"
icon: "mdi:water-percent"
device_class: "temperature"
accuracy_decimals: 1
expire_after: 30s
filters:
@ -40,7 +41,11 @@ Configuration variables:
- **unit_of_measurement** (*Optional*, string): Manually set the unit
of measurement the sensor should advertise its values with. This does
not actually do any maths (conversion between units).
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend.
- **device_class** (*Optional*, string): The device class for the
sensor. See https://www.home-assistant.io/integrations/sensor/#device-class
for a list of available options. Set to ``""`` to remove the default device class of a sensor.
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. The icon set here
is ignored by Home Assistant, if a device class is already set.
- **accuracy_decimals** (*Optional*, int): Manually set the accuracy of decimals to use when reporting values.
- **filters** (*Optional*): Specify filters to use for some basic
transforming of values. See :ref:`Sensor Filters <sensor-filters>` for more information.
@ -127,8 +132,10 @@ for platforms with multiple sensors)
- delta: 5.0
- lambda: return x * (9.0/5.0) + 32.0;
``offset`` / ``multiply``
*************************
``offset``
**********
Adds a constant value to each sensor value.
.. code-block:: yaml
@ -139,8 +146,10 @@ for platforms with multiple sensors)
- offset: 2.0
- multiply: 1.2
Offset adds a constant value to each sensor value. Multiply multiplies each value
by a constant value.
``multiply``
************
Multiplies each value by a constant value.
.. _sensor-filter-calibrate_linear:
@ -200,7 +209,7 @@ degree with a least squares solver.
``filter_out``
**************
Filter out specific values to be displayed. For example to filter out the value ``85.0``
(**Required**, number): Filter out specific values to be displayed. For example to filter out the value ``85.0``
.. code-block:: yaml
@ -213,8 +222,9 @@ Filter out specific values to be displayed. For example to filter out the value
``median``
**********
Calculate moving median over the data. This can be used to filter outliers from the received
sensor data. A large window size will make the filter slow to react to input changes.
A `simple moving median <https://en.wikipedia.org/wiki/Median_filter#Worked_1D_example>`__
over the last few values. This can be used to filter outliers from the received sensor data. A large
window size will make the filter slow to react to input changes.
.. code-block:: yaml
@ -227,28 +237,78 @@ sensor data. A large window size will make the filter slow to react to input cha
send_every: 4
send_first_at: 3
- **median**: A `simple moving median
<https://en.wikipedia.org/wiki/Median_filter#Worked_1D_example>`__
over the last few values.
Configuration variables:
- **window_size**: The number of values over which to calculate the median
when pushing out a value. This number should
be odd if you want an actual received value pushed out.
Defaults to ``5``.
- **send_every**: How often a sensor value should be pushed out. For
example, in above configuration the median is calculated after every 4th
received sensor value, over the last 7 received values.
Defaults to ``5``.
- **send_first_at**: By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Must be smaller than or equal to ``send_every``
Defaults to ``1``.
- **window_size** (*Optional*, integer): The number of values over which to calculate the median
when pushing out a value. This number should
be odd if you want an actual received value pushed out.
Defaults to ``5``.
- **send_every** (*Optional*, integer): How often a sensor value should be pushed out. For
example, in above configuration the median is calculated after every 4th
received sensor value, over the last 7 received values.
Defaults to ``5``.
- **send_first_at** (*Optional*, integer): By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Must be smaller than or equal to ``send_every``
Defaults to ``1``.
``sliding_window_moving_average`` / ``exponential_moving_average``
******************************************************************
``min``
*******
Two simple moving averages over the data. These can be used to have a short update interval
on the sensor but only push out an average on a specific interval (thus increasing resolution).
A moving minimum over the last few values. A large window size will make the filter slow to
react to input changes.
.. code-block:: yaml
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- min:
window_size: 7
send_every: 4
send_first_at: 3
Configuration variables:
- **window_size** (*Optional*, integer): The number of values over which to calculate the min/max when pushing out a
value. Defaults to ``5``.
- **send_every** (*Optional*, integer): How often a sensor value should be pushed out. For
example, in above configuration the min is calculated after every 4th
received sensor value, over the last 7 received values.
Defaults to ``5``.
- **send_first_at** (*Optional*, integer): By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Must be smaller than or equal to ``send_every``
Defaults to ``1``.
``max``
*******
A moving maximum over the last few values. A large window size will make the filter slow to
react to input changes.
Configuration variables:
- **window_size** (*Optional*, integer): The number of values over which to calculate the min/max
when pushing out a value.
Defaults to ``5``.
- **send_every** (*Optional*, integer): How often a sensor value should be pushed out. For
example, in above configuration the min is calculated after every 4th
received sensor value, over the last 7 received values.
Defaults to ``5``.
- **send_first_at** (*Optional*, integer): By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Must be smaller than or equal to ``send_every``
Defaults to ``1``.
``sliding_window_moving_average``
*********************************
A `simple moving average <https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average>`__
over the last few values. It can be used to have a short update interval on the sensor but only push
out an average on a specific interval (thus increasing resolution).
.. code-block:: yaml
@ -260,28 +320,36 @@ on the sensor but only push out an average on a specific interval (thus increasi
window_size: 15
send_every: 15
- **sliding_window_moving_average**: A `simple moving
average <https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average>`__
over the last few values.
Configuration variables:
- **window_size**: The number of values over which to perform an
average when pushing out a value.
- **send_every**: How often a sensor value should be pushed out. For
example, in above configuration the weighted average is only
pushed out on every 15th received sensor value.
- **send_first_at**: By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Defaults to ``1``.
- **window_size** (*Optional*, integer): The number of values over which to perform an
average when pushing out a value.
- **send_every** (*Optional*, integer): How often a sensor value should be pushed out. For
example, in above configuration the weighted average is only
pushed out on every 15th received sensor value.
- **send_first_at** (*Optional*, integer): By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Defaults to ``1``.
- **exponential_moving_average**: A simple `exponential moving
average <https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average>`__
over the last few values.
``exponential_moving_average``
******************************
- **alpha**: The forget factor/alpha value of the filter.
- **send_every**: How often a sensor value should be pushed out.
A simple `exponential moving average
<https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average>`__ over the last few
values. It can be used to have a short update interval on the sensor but only push
out an average on a specific interval (thus increasing resolution).
``throttle`` / ``heartbeat`` / ``debounce`` / ``delta``
*******************************************************
Configuration variables:
- **alpha** (*Optional*, float): The forget factor/alpha value of the filter. Defaults to ``0.1``.
- **send_every** (*Optional*, integer): How often a sensor value should be pushed out. Defaults to ``15``.
``throttle``
************
Throttle the incoming values. When this filter gets an incoming value,
it checks if the last incoming value is at least ``specified time period`` old.
If it is not older than the configured value, the value is not passed forward.
.. code-block:: yaml
@ -293,28 +361,38 @@ on the sensor but only push out an average on a specific interval (thus increasi
- delta: 5.0
- lambda: return x * (9.0/5.0) + 32.0;
- **throttle**: Throttle the incoming values. When this filter gets an incoming value,
it checks if the last incoming value is at least ``specified time period`` old.
If it is not older than the configured value, the value is not passed forward.
- **heartbeat**: Send the last value that this sensor in the specified time interval.
So a value of ``10s`` will cause the filter to output values every 10s regardless
of the input values.
- **debounce**: Only send values if the last incoming value is at least ``specified time period``
old. For example if two values come in at almost the same time, this filter will only output
the last value and only after the specified time period has passed without any new incoming
values.
- **delta**: This filter stores the last value passed through this filter and only
passes incoming values through if the absolute difference is greater than the configured
value. For example if a value of 1.0 first comes in, it's passed on. If the delta filter
is configured with a value of 5, it will now not pass on an incoming value of 2.0, only values
that are at least 6.0 big or -4.0.
``or`` Filter
``heartbeat``
*************
Send the last value that this sensor in the specified time interval.
So a value of ``10s`` will cause the filter to output values every 10s regardless
of the input values.
``debounce``
************
Only send values if the last incoming value is at least ``specified time period``
old. For example if two values come in at almost the same time, this filter will only output
the last value and only after the specified time period has passed without any new incoming
values.
``delta``
*********
This filter stores the last value passed through this filter and only
passes incoming values through if the absolute difference is greater than the configured
value. For example if a value of 1.0 first comes in, it's passed on. If the delta filter
is configured with a value of 5, it will now not pass on an incoming value of 2.0, only values
that are at least 6.0 big or -4.0.
``or``
******
Pass forward a value with the first child filter that returns. Above example
will only pass forward values that are *either* at least 1s old or are if the absolute
difference is at least 5.0.
.. code-block:: yaml
# Example filters:
@ -323,22 +401,18 @@ on the sensor but only push out an average on a specific interval (thus increasi
- throttle: 1s
- delta: 5.0
- **or**: Pass forward a value with the first child filter that returns. Above example
will only pass forward values that are *either* at least 1s old or are if the absolute
difference is at least 5.0.
``lambda``
**********
``lambda`` Filter
*****************
Perform a simple mathematical operation over the sensor values. The input value is ``x`` and
the result of the lambda is used as the output (use ``return``).
.. code-block:: yaml
filters:
- lambda: return x * (9.0/5.0) + 32.0;
**lambda**: Perform a simple mathematical operation over the sensor
values. The input value is ``x`` and the result of the lambda is used
as the output (use ``return``).
Make sure to add ``.0`` to all values in the lambda, otherwise divisions of integers will
result in integers (not floating point values).

View File

@ -0,0 +1,103 @@
Inkbird IBS-TH1 Mini BLE Sensor
===============================
.. seo::
:description: Instructions for setting up Inkbird IBS-TH1 Mini Bluetooth-based temperature and humidity sensors in ESPHome.
:image: inkbird_isbth1_mini.jpg
:keywords: Inkbird, BLE, Bluetooth, IBS-TH1
The ``inkbird_ibsth1_mini`` sensor platform lets you track the output of Inkbird IBS-TH1 Mini Bluetooth
Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track the
temperature, humidity and the battery level of the IBS-TH1 Mini device every time the
sensor sends out a BLE broadcast. Note that contrary to other implementations, ESPHome can track as
many IBS-TH1 Mini devices at once as you want.
.. figure:: images/inkbird_isbth1_mini-full.jpg
:align: center
:width: 80.0%
Inkbird IBS-TH1 Mini Temperature and Humidity Sensor over BLE.
.. figure:: images/inkbird_isbth1_mini-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
sensor:
- platform: inkbird_ibsth1_mini
mac_address: 38:81:D7:0A:9C:11
temperature:
name: "Inkbird IBS-TH1 Mini Temperature"
humidity:
name: "Inkbird IBS-TH1 Mini Humidity"
battery_level:
name: "Inkbird IBS-TH1 Mini Battery Level"
Configuration variables:
------------------------
- **mac_address** (**Required**, MAC Address): The MAC address of the Inkbird IBS-TH1 Mini device.
- **temperature** (*Optional*): The information for the temperature sensor.
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (*Optional*): The information for the humidity sensor
- **name** (**Required**, string): The name for the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **battery_level** (*Optional*): The information for the battery level sensor
- **name** (**Required**, string): The name for the battery level sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
Setting Up Devices
------------------
To set up Inkbird IBS-TH1 Mini devices you first need to find their MAC Address so that ESPHome can
identify them. So first, create a simple configuration without any ``inkbird_ibsth1_mini`` entries
like so:
.. code-block:: yaml
esp32_ble_tracker:
After uploading the ESP32 will immediately try to scan for BLE devices such as the Inkbird IBS-TH1 Mini.
When it detects these sensors, it will automatically parse the BLE message print a
message like this one:
.. code::
[13:36:43][D][esp32_ble_tracker:544]: Found device 38:81:D7:0A:9C:11 RSSI=-53
[13:36:43][D][esp32_ble_tracker:565]: Address Type: PUBLIC
[13:36:43][D][esp32_ble_tracker:567]: Name: 'sps'
Note that it can sometimes take some time for the first BLE broadcast to be received. Please note that address type
should say 'PUBLIC' and the device name should be 'sps', this is how you find the Inkbird IBS-TH1 Mini among all the
other devices.
Then just copy the address (``38:81:D7:0A:9C:11``) into a new ``sensor.inkbird_ibsth1_mini`` platform
entry like in the configuration example at the top.
.. note::
The ESPHome Inkbird IBS-TH1 Mini integration listens passively to packets the device sends by itself.
ESPHome therefore has no impact on the battery life of the device.
See Also
--------
- :doc:`/components/esp32_ble_tracker`
- :doc:`/components/sensor/index`
- :apiref:`inkbird_ibsth1_mini/inkbird_ibsth1_mini.h`
- `OpenMQTTGateway <https://github.com/1technophile/OpenMQTTGateway>`__ by `@1technophile <https://github.com/1technophile>`__
- :ghedit:`Edit`

View File

@ -8,15 +8,17 @@ MCP3008 I/O Expander
The Microchip Technology Inc. MCP3008
devices are successive approximation 10-bit Analogto-Digital (A/D) converters with on-board sample and
hold circuitry.
hold circuitry.
.. figure:: images/mcp3008.jpg
:align: center
:width: 50.0%
MCP3008
-------
.. _mcp3008-component:
Component/Hub
-------------
The MCP3008 component allows you to use MCP3008 8-Channel 10-Bit A/D Converter
(`datasheet <http://ww1.microchip.com/downloads/en/DeviceDoc/21295d.pdf>`__,
@ -65,14 +67,19 @@ If you want just the scaled value you can use the read_data function
name: Freezer Temperature
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
MCP3008 Component
*****************
- **id** (**Required**, :ref:`config-id`): The id to use for this MCP3008 component.
- **cs_pin** (**Required**, int): The SPI cable select pin to use
MCP3008 Sensor Component
************************
Sensor
------
The ``mcp3008`` sensor allows you to use your MCP3008 10-Bit A/D Converter sensors with ESPHome.
First, setup a :ref:`MCP3008 Hub <mcp3008-component>` for your MCP3008 sensor and then use this
sensor platform to create individual sensors that will report the voltage to Home Assistant.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The id of the parent MCP3008 component.
- **number** (**Required**, int): The pin number of the MCP3008
- **reference_voltage** (*Optional*, float): The reference voltage. Defaults to ``3.3V``.

View File

@ -32,15 +32,11 @@ required to be set up in your configuration for this sensor to work.
Configuration variables:
------------------------
- **temperature** (**Required**): The information for the temperature sensor.
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x18``.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- All other options from :ref:`Sensor <config-sensor>`.
See Also
--------

View File

@ -0,0 +1,82 @@
Pulse Meter Sensor
==================
.. seo::
:description: Instructions for setting up pulse meter sensors.
:image: pulse.png
The pulse meter sensor allows you to count the number and frequency of pulses on any pin. It is intended to be a drop-in replacement
for :doc:`integration sensor </components/sensor/pulse_counter>`, but offering better resolution.
It measures the time between rising edges on a pin, for each pulse it outputs the frequency in pulses/min.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: pulse_meter
pin: 12
name: "Pulse Meter"
Configuration variables:
------------------------
- **pin** (**Required**, :ref:`config-pin`): The pin to count pulses on.
- **name** (**Required**, string): The name of the sensor.
- **internal_filter** (*Optional*, :ref:`config-time`): If a pulse shorter than this
time is detected, its discarded and no pulse is counted. Defaults to ``13us``. For S0 pulse meters that are used to meter power consumption 50-100 ms is a reasonable value.
- **timeout** (*Optional*, :ref:`config-time`): If we don't see a pulse for this length of time, we assume 0 pulses/sec. Defaults to ``5 min``.
- **total** (*Optional*, :ref:`Sensor <config-sensor>`): An additional sensor that outputs the total number of pulses counted.
- All other options from :ref:`Sensor <config-sensor>`.
Converting units
----------------
The sensor defaults to units of “pulses/min”. You can change this by using :ref:`sensor-filters`.
For example, if youre using the pulse meter with a photodiode to
count the light pulses on a power meter that outputs 1000 pulses per kWh,
you can use the following to output instantaneous usage in kW:
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: pulse_meter
pin: 12
unit_of_measurement: 'kW'
name: 'Electricity Usage'
filters:
- multiply: 0.06
Counting total pulses
---------------------
When the total sensor is configured, pulse_meter also reports the total
number of pulses measured. When used on a power meter, this can be used to
measure the total consumed energy in kWh.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: pulse_meter
pin: 12
unit_of_measurement: 'kW'
name: 'Electricity Usage'
filters:
- multiply: 0.06
total:
name: "Electricity Total"
unit_of_measurement: "kWh"
accuracy_decimals: 0
filters:
- multiply: 0.001
See Also
--------
- :ref:`sensor-filters`
- :doc:`/components/sensor/pulse_counter`
- :apiref:`pulse_meter/pulse_meter_sensor.h`
- :ghedit:`Edit`

View File

@ -129,7 +129,7 @@ Configuration variables:
- All other options from :ref:`Sensor <config-sensor>`.
- Only available if RAWv2 protocol is used.
- **movement_count** (*Optional*): The information for the movement count
- **movement_counter** (*Optional*): The information for the movement count
sensor
- **name** (**Required**, string): The name for the movement count sensor.

View File

@ -64,6 +64,77 @@ Configuration variables:
``G+`` should be connected to power supply (supported voltage is 4.5 V to 5.25 V), ``G0`` to ``GND`` pin
.. _senseair-background_calibration_action:
``senseair.background_calibration`` Action
------------------------------------------
This :ref:`action <config-action>` initiates a background calibration on the sensor with the given ID: the current
CO2 level will be used as a reference for the 400ppm threshold. Ensure that the sensor is in a stable environment with
fresh ambient air, preferably near a window that has already been opened for a sufficient time.
.. code-block:: yaml
on_...:
then:
- senseair.background_calibration: my_senseair_id
.. _senseair-background_calibration_result_action:
``senseair.background_calibration_result`` Action
-------------------------------------------------
This :ref:`action <config-action>` requests the result of the background calibration procedure from the sensor
with the given ID. The value will be printed in ESPHome logs.
Wait at least one sensor lamp cycle after having triggered the background calibration before requesting its result.
.. code-block:: yaml
on_...:
then:
- senseair.background_calibration_result: my_senseair_id
.. _senseair-abc_get_period_action:
``senseair.abc_get_period`` Action
----------------------------------
This :ref:`action <config-action>` requests the currently configured ABC interval from the sensor with the given ID.
The value will be printed in ESPHome logs.
.. code-block:: yaml
on_...:
then:
- senseair.abc_get_period: my_senseair_id
.. _senseair-abc_enable_action:
``senseair.abc_enable`` Action
------------------------------
This :ref:`action <config-action>` enables Automatic Baseline Calibration on the sensor with the given ID.
ABC will be activated with the default interval of 180 hours.
.. code-block:: yaml
on_...:
then:
- senseair.abc_enable: my_senseair_id
.. _senseair-abc_disable_action:
``senseair.abc_disable`` Action
-------------------------------
This :ref:`action <config-action>` disables Automatic Baseline Calibration on the sensor with the given ID.
.. code-block:: yaml
on_...:
then:
- senseair.abc_disable: my_senseair_id
See Also
--------

View File

@ -0,0 +1,123 @@
SM300D2 7-in-1 Air Quality Sensor
=================================
.. seo::
:description: Instructions for setting up SM300D2 sensor to work with ESPHome
:image: sm300d2-full.jpg
:keywords: sm300d2
The ``sm300d2`` sensor platform allows you to use the SM300D2 7-in-1 Air Quality Sensor with ESPHome.
.. figure:: images/sm300d2-full.jpg
:align: center
:width: 50.0%
SM300D2 7-in-1 Air Quality Sensor.
.. figure:: images/sm300d2-ui.png
:align: center
:width: 50.0%
The SM300D2 sensor supports connections via UART or RS485. This platform only supports UART-connections.
Make sure you have a :ref:`UART bus <uart>` in your configuration with the ``rx_pin`` connected to the
TX pin of the sensor. The sensor does not support receiving data, so the ``tx_pin`` does not need to be
connected. The sensor expects the baud rate to be set at 9600.
.. code-block:: yaml
# Example configuration entry
uart:
rx_pin: D0
tx_pin: D1
baud_rate: 9600
sensor:
- platform: sm300d2
co2:
name: "SM300D2 CO2 Value"
formaldehyde:
name: "SM300D2 Formaldehyde Value"
tvoc:
name: "SM300D2 TVOC Value"
pm_2_5:
name: "SM300D2 PM2.5 Value"
pm_10_0:
name: "SM300D2 PM10 Value"
temperature:
name: "SM300D2 Temperature Value"
humidity:
name: "SM300D2 Humidity Value"
update_interval: 60s
Configuration variables:
------------------------
- **co2** (**Required**): The CO₂ data from the sensor in parts per million (ppm).
- **name** (**Required**, string): The name of the CO₂ sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **formaldehyde** (**Required**): The formaldehyde data of the sensor in micrograms per cubic meter air (µg/m³).
- **name** (**Required**, string): The name of the formaldehyde sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **tvoc** (**Required**): The total volatile organic compounds (TVOC) data of the sensor in micrograms per cubic meter air (µg/m³).
- **name** (**Required**, string): The name of the TVOC sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **pm_2_5** (**Required**): The PM2.5 data of the sensor in micrograms per cubic meter air (µg/m³).
- **name** (**Required**, string): The name of the PM2.5 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **pm_10_0** (**Required**): The PM10 data of the sensor in micrograms per cubic meter air (µg/m³).
- **name** (**Required**, string): The name of the PM10 sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **temperature** (**Required**): The temperature data of the sensor in degrees celsius (°C).
- **name** (**Required**, string): The name of the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **humidity** (**Required**): The humidity data of the sensor in percent relative humidity (%).
- **name** (**Required**, string): The name of the humidity sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for actions.
.. figure:: images/sm300d2-pins.jpg
:align: center
:width: 80.0%
Pins on the SM300D2. UART RX is not in use.
.. note::
``5V`` should be connected to power supply (supported voltage is 4.8 V to 5.2 V), ``GD`` to ``GND`` pin
See Also
--------
- :ref:`sensor-filters`
- :apiref:`sm300d2/sm300d2.h`
- :ghedit:`Edit`

View File

@ -34,8 +34,8 @@ If accuracy is a must, see section 8.2.2.2 of the `datasheet <https://www.ti.com
name: "Living Room Temperature"
update_interval: 60s
Configuration variables
-----------------------
Configuration variables:
------------------------
- **name** (**Required**, string): The name for the temperature sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for lambdas/multiple sensors.

View File

@ -3,12 +3,12 @@ VL53L0X Time Of Flight Distance Sensor
.. seo::
:description: Instructions for setting up VL53L0X distance sensors in ESPHome.
:image: vl53l0x.jpg
:image: vl53l0x.png
:keywords: VL53L0X
The ``vl53l0x`` sensor platform allows you to use VL53L0X optical time of flight
(`datasheet <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__,
`ST <https://www.st.com/resource/en/datasheet/vl53l0x.pdf>`__) with ESPHome
`ST <https://www.st.com/en/imaging-and-photonics-solutions/vl53l0x.html>`__) with ESPHome
to measure distances. The sensor works optically by emitting short infrared pulses
and measuring the time it takes the light to be reflected back
@ -17,8 +17,21 @@ on several conditions like surface reflectance, field of view, temperature etc.
you can expect surfaces up to 60cm to work, after that you need to make sure the surface is reflecting
well enough (see also section 5 of datasheet).
The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.
.. figure:: images/vl53l0x.png
:align: center
:width: 100.0%
The :ref:`I²C Bus <i2c>` is required to be set up in your configuration for this sensor to work.
- ``VCC`` connects to 3V3 (``3V3`` will output 3.3V), or directly connect ``VCC`` to 3.3V
- ``GND`` connects to ground
- ``SCL`` connects I2C SCL (clock)
- ``SDA`` connects I2C SDA (data)
- ``GPIO1`` is not used by ESPHome
- ``XSHUT`` connects to free GPIO pin. Enable/disable device. This is optional if there is only one
VL53L0X sensor on the I²C bus and the default ``0x29`` address is used. Otherwise this is required.
.. figure:: images/vl53l0x-full.jpg
:align: center
@ -32,7 +45,7 @@ required to be set up in your configuration for this sensor to work.
.. code-block:: yaml
# Example configuration entry
# Simple configuration entry example
sensor:
- platform: vl53l0x
name: "VL53L0x Distance"
@ -50,11 +63,44 @@ Configuration variables:
(mega counts per second). This is the minimum signal amplitude detected by the sensor necessary
for it to report a valid reading. Setting a lower value may increase the range of the sensor
but also increases the chance of getting inaccurate readings. Defaults to ``0.25``.
- All other options from :ref:`Sensor <config-sensor>`.
- **long_range** (*Optional*, bool): Set the sensor in long range mode. The signal_rate_limit is overruled
to ``0.1``. Defaults to false.
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x29``.
to ``0.1``. Defaults to ``false``.
- **address** (*Optional*, int): Manually specify the i2c address of the sensor. Defaults to ``0x29``.
If an address other the ``0x29`` is specified, the sensor will be dynamically re-addressed at startup.
A dynamic re-address of sensor requires the ``enable_pin`` configuration variable to be assigned.
If more then one VL53L0X sensor is used on the same i2c bus, a unique address must be specified per sensor.
- **enable_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): The pin connected to XSHUT
on vl53l0x to enable/disable sensor. **Required** if not using address ``0x29`` which is the cause if you
have multiple VL53L0X on the same i2c bus. In this case you have to assign a different pin to each VL53L0X.
- **timeout** (*Optional*, :ref:`config-time`): Sensor setup timeout. Default to ``10ms``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
.. code-block:: yaml
# Muliple VL53L0X sensors on same i2c bus
# Example configuration entry
sensor:
- platform: vl53l0x
name: "distance1"
id: distance1
address: 0x41
enable_pin: GPIO16
timeout: 200us
update_interval: 500ms
unit_of_measurement: "m"
- platform: vl53l0x
name: "distance2"
id: distance2
address: 0x42
enable_pin: GPIO17
timeout: 200us
update_interval: 500ms
unit_of_measurement: "m"
See Also
--------

View File

@ -0,0 +1,100 @@
Xiaomi Miscale Sensors
========================
.. seo::
:description: Instructions for setting up Xiaomi Miscale bluetooth-based sensors in ESPHome.
:image: xiaomi_miscale.jpg
:keywords: Xiaomi, BLE, Bluetooth, XMTZC01HM, XMTZC04HM
The ``xiaomi_miscale`` sensor platform lets you track the output of Xiaomi Bluetooth Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track, for example, the weight of the device every time the sensor sends out a BLE broadcast. Contrary to other implementations, ``xiaomi_miscale`` listens passively to advertisement packets and does not pair with the device. Hence ESPHome has no impact on battery life.
To get the body scores using your weight, height, age and gender see the custom_components `<https://github.com/dckiller51/bodymiscale>`__
Supported Devices
-----------------
XMTZC01HM, XMTZC04HM
********************
Miscale measures weight.
.. figure:: images/xiaomi_miscale.jpg
:align: center
:width: 60.0%
Configuration example:
.. code-block:: yaml
sensor:
- platform: xiaomi_miscale
mac_address: 'C8:47:8C:9F:7B:0A'
weight:
name: "Xiaomi Mi Scale Weight"
Configuration example with multiple users :
You have to replace the numbers in the lambdas to determine your weight which is between X weight and X weight.
.. code-block:: yaml
sensor:
- platform: xiaomi_miscale
mac_address: 'C8:47:8C:9F:7B:0A'
weight:
name: "Xiaomi Mi Scale Weight"
id: weight_miscale
on_value:
then:
- lambda: |-
if (id(weight_miscale).state >= 69 && id(weight_miscale).state <= 74.49) {
return id(weight_user1).publish_state(x);}
else if (id(weight_miscale).state >= 74.50 && id(weight_miscale).state <= 83) {
return id(weight_user2).publish_state(x);}
else if (id(weight_miscale).state >= 46 && id(weight_miscale).state <= 65) {
return id(weight_user3).publish_state(x);}
else if (id(weight_miscale).state >= 28 && id(weight_miscale).state <= 45) {
return id(weight_user4).publish_state(x);}
else if (id(weight_miscale).state >= 5 && id(weight_miscale).state <= 20) {
return id(weight_user5).publish_state(x);}
- platform: template
name: Weight Aurélien
id: weight_user1
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Weight Siham
id: weight_user2
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Weight Théo
id: weight_user3
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Weight Sacha
id: weight_user4
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Weight Noham
id: weight_user5
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
See Also
--------
- :doc:`/components/esp32_ble_tracker`
- :doc:`/components/sensor/index`
- bodymiscale score integration for Home Assistant (bodymiscale custom component) `<https://github.com/dckiller51/bodymiscale>`__
- :ghedit:`Edit`

View File

@ -0,0 +1,149 @@
Xiaomi Miscale2 Sensors
========================
.. seo::
:description: Instructions for setting up Xiaomi Miscale2 bluetooth-based sensors in ESPHome.
:image: xiaomi_miscale2.jpg
:keywords: Xiaomi, BLE, Bluetooth, XMTZC02HM, XMTZC05HM
The ``xiaomi_miscale2`` sensor platform lets you track the output of Xiaomi Bluetooth Low Energy devices using the :doc:`/components/esp32_ble_tracker`. This component will track, for example, the weight and the impedance of the device every time the sensor sends out a BLE broadcast. Contrary to other implementations, ``xiaomi_miscale2`` listens passively to advertisement packets and does not pair with the device. Hence ESPHome has no impact on battery life.
To get the body scores using your weight, height, age and gender see the custom_components `<https://github.com/dckiller51/bodymiscale>`__
Supported Devices
-----------------
XMTZC02HM, XMTZC05HM
********************
Miscale2 measures weight and impedance.
.. figure:: images/xiaomi_miscale2.jpg
:align: center
:width: 60.0%
Configuration example:
.. code-block:: yaml
sensor:
- platform: xiaomi_miscale2
mac_address: '5C:CA:D3:70:D4:A2'
weight:
name: "Xiaomi Mi Scale Weight"
impedance:
name: "Xiaomi Mi Scale Impedance"
Configuration example with multiple users :
You have to replace the numbers in the lambdas to determine your weight which is between X weight and X weight.
.. code-block:: yaml
sensor:
- platform: xiaomi_miscale2
mac_address: '5C:CA:D3:70:D4:A2'
weight:
name: "Xiaomi Mi Scale Weight"
id: weight_miscale
on_value:
then:
- lambda: |-
if (id(weight_miscale).state >= 69 && id(weight_miscale).state <= 74.49) {
return id(weight_user1).publish_state(x);}
else if (id(weight_miscale).state >= 74.50 && id(weight_miscale).state <= 83) {
return id(weight_user2).publish_state(x);}
else if (id(weight_miscale).state >= 46 && id(weight_miscale).state <= 65) {
return id(weight_user3).publish_state(x);}
else if (id(weight_miscale).state >= 28 && id(weight_miscale).state <= 45) {
return id(weight_user4).publish_state(x);}
else if (id(weight_miscale).state >= 5 && id(weight_miscale).state <= 20) {
return id(weight_user5).publish_state(x);}
impedance:
name: "Xiaomi Mi Scale Impedance"
id: impedance_xiaomi
on_value:
then:
- lambda: |-
if (id(weight_miscale).state >= 69 && id(weight_miscale).state <= 74.49) {
return id(impedance_user1).publish_state(x);}
else if (id(weight_miscale).state >= 74.50 && id(weight_miscale).state <= 83) {
return id(impedance_user2).publish_state(x);}
else if (id(weight_miscale).state >= 46 && id(weight_miscale).state <= 65) {
return id(impedance_user3).publish_state(x);}
else if (id(weight_miscale).state >= 28 && id(weight_miscale).state <= 45) {
return id(impedance_user4).publish_state(x);}
else if (id(weight_miscale).state >= 5 && id(weight_miscale).state <= 20) {
return id(impedance_user5).publish_state(x);}
- platform: template
name: Weight Aurélien
id: weight_user1
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Impedance Aurélien
id: impedance_user1
unit_of_measurement: 'ohm'
icon: mdi:omega
accuracy_decimals: 0
- platform: template
name: Weight Siham
id: weight_user2
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Impedance Siham
id: impedance_user2
unit_of_measurement: 'ohm'
icon: mdi:omega
accuracy_decimals: 0
- platform: template
name: Weight Théo
id: weight_user3
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Impedance Théo
id: impedance_user3
unit_of_measurement: 'ohm'
icon: mdi:omega
accuracy_decimals: 0
- platform: template
name: Weight Sacha
id: weight_user4
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Impedance Sacha
id: impedance_user4
unit_of_measurement: 'ohm'
icon: mdi:omega
accuracy_decimals: 0
- platform: template
name: Weight Noham
id: weight_user5
unit_of_measurement: 'kg'
icon: mdi:weight-kilogram
accuracy_decimals: 2
- platform: template
name: Impedance Noham
id: impedance_user5
unit_of_measurement: 'ohm'
icon: mdi:omega
accuracy_decimals: 0
See Also
--------
- :doc:`/components/esp32_ble_tracker`
- :doc:`/components/sensor/index`
- bodymiscale score integration for Home Assistant (bodymiscale custom component) `<https://github.com/dckiller51/bodymiscale>`__
- :ghedit:`Edit`

View File

@ -2,11 +2,11 @@ Sim800L Component
=================
.. seo::
:description: Instructions for setting up the SIM800L GSM module to send and receive SMS in ESPHome.
:description: Instructions for setting up the SIM800L GSM module to dial, send and receive SMS in ESPHome.
:image: sim800l.jpg
:keywords: SMS SIM800L GSM
The ``SIM800L`` Component provides the ability to send and receive SMS text messages. The device must be
The ``SIM800L`` Component provides the ability to dial, send and receive SMS text messages. The device must be
connected via a :doc:`UART bus </components/uart>` 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``.
@ -92,11 +92,24 @@ Send a SMS message to a phone recipient using this action in automations.
message: !lambda |-
return id(reed_switch).state ? "Door is now OPEN" : "Hey door just CLOSED";
.. _sim800l-dial_action:
``sim800l.dial`` Action
---------------------------
Dial to a phone recipient using this action in automations.
.. code-block:: yaml
on_...:
then:
- sim800l.dial:
recipient: '+15551234567'
Configuration options:
- **recipient** (***Required**, string, :ref:`templatable <config-templatable>`): The message recipient.
number.
- **message** (**Required**, string, :ref:`templatable <config-templatable>`): The message content.
- **recipient** (***Required**, string, :ref:`templatable <config-templatable>`): The number to dial.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID of the SIM800L if you have multiple components.
.. note::
@ -105,14 +118,14 @@ Configuration options:
.. code-block:: cpp
id(sim800l1).send_sms("+15551234567", "The message content");
id(sim800l1).dial("+15551234567");
Getting started with Home Assistant
-----------------------------------
The following code will get you up and running with a configuration updating received messages
on Home Assistant and will also setup a service so you can send messages with your SIM800L.
on Home Assistant and will also setup a service so you can send messages and dial with your SIM800L.
.. code-block:: yaml
@ -126,6 +139,12 @@ on Home Assistant and will also setup a service so you can send messages with yo
- sim800l.send_sms:
recipient: !lambda 'return recipient;'
message: !lambda 'return message;'
- service: dial
variables:
recipient: string
then:
- sim800l.dial:
recipient: !lambda 'return recipient;'
text_sensor:
- platform: template
@ -159,6 +178,9 @@ To trigger the automation from Home Assistant you can invoke the service with th
data:
recipient: "+15551234567"
message: "Hello World!"
- service: esphome.livingroom_dial
data:
recipient: "+15551234567"
Relay management commands received from an authorized sender:

View File

@ -43,7 +43,7 @@ Use of the OE pin is optional. If used, the pin should be pulled up externally.
inverted: False
Configuration variables:
~~~~~~~~~~~~~~~~~~~~~~~~
************************
- **id** (**Required**, :ref:`config-id`): The id to use for this SN74HC595 component.
- **data_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): Pin connected to SN74HC595 SER input.
@ -52,11 +52,21 @@ Configuration variables:
- **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``.
Pin configuration variables:
****************************
- **sn74hc595** (**Required**, :ref:`config-id`): The id of the SN74HC595 component of the pin.
- **number** (**Required**, integer): The pin number.
- **inverted** (*Optional*, boolean): If all written values should be treated as inverted.
Defaults to ``False``.
See Also
--------
- :doc:`switch/gpio`
- :doc:`binary_sensor/gpio`
- `Serial to Parallel Shifting-Out with a 74HC595 <https://www.arduino.cc/en/tutorial/ShiftOut>`
- `Serial to Parallel Shifting-Out with a 74HC595 <https://www.arduino.cc/en/tutorial/ShiftOut>`__
- :apiref:`sn74hc595/sn74hc595.h`
- :ghedit:`Edit`

View File

@ -16,8 +16,27 @@ and ULN2003 (`datasheet <http://www.ti.com/lit/ds/symlink/uln2003a.pdf>`__) are
This component will not show up in the Home Assistant front-end automatically because
Home Assistant doesn't have support for steppers. Please see :ref:`stepper-ha-config`.
A4988 Configuration
-------------------
.. _base_stepper_config:
Base Stepper Configuration
--------------------------
All stepper configuration schemas inherit these options.
Configuration variables:
- **max_speed** (**Required**, float): The maximum speed in ``steps/s`` (steps per seconds) to drive the
stepper at. Note most steppers can't step properly with speeds higher than 250 steps/s.
- **acceleration** (*Optional*, float): The acceleration in ``steps/s^2`` (steps per seconds squared)
to use when starting to move. The default is ``inf`` which means infinite acceleration, so the
stepper will try to drive with the full speed immediately. This value is helpful if that first motion of
the motor is too jerky for what it's moving. If you make this a small number, it will take the motor a
moment to get up to speed.
- **deceleration** (*Optional*, float): The same as ``acceleration``, but for when the motor is decelerating
shortly before reaching the set position. Defaults to ``inf`` (immediate deceleration).
A4988 Component
---------------
Put this code into the configuration file on ESPhome for this device.
@ -43,16 +62,11 @@ Configuration variables:
stepper driver.
- **dir_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The ``DIRECTION`` pin of the A4988
stepper driver.
- **max_speed** (**Required**, float): The maximum speed in ``steps/s`` (steps per seconds) to drive the
stepper at. Note most steppers can't step properly with speeds higher than 250 steps/s.
- **sleep_pin** (*Optional*, :ref:`Pin Schema <config-pin_schema>`): Optionally also use the ``SLEEP`` pin
of the A4988 stepper driver. If specified, the driver will be put into sleep mode as soon as the stepper
reaches the target steps.
- **acceleration** (*Optional*, float): The acceleration in ``steps/s^2`` (steps per seconds squared)
to use when starting to move. The default is ``inf`` which means infinite acceleration, so the
stepper will try to drive with the full speed immediately.
- **deceleration** (*Optional*, float): The same as ``acceleration``, but for when the motor is decelerating
shortly before reaching the set position. Defaults to ``inf`` (immediate deceleration).
- All other from :ref:`base_stepper_config`.
.. note::
@ -67,8 +81,8 @@ Configuration variables:
number: D1
inverted: True
ULN2003 Configuration
---------------------
ULN2003 Component
-----------------
Put this code into the configuration file on ESPHome for this device.
@ -92,8 +106,10 @@ Put this code into the configuration file on ESPHome for this device.
Configuration variables:
- **id** (**Required**, :ref:`config-id`): Specify the ID of the stepper so that you can control it.
- **pin_a**, **pin_b**, **pin_c**, **pin_d** (**Required**, :ref:`Pin Schema <config-pin_schema>`):
The four pins of the stepper control board.
- **pin_a** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin **a** of the stepper control board.
- **pin_b** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin **b** of the stepper control board.
- **pin_c** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin **c** of the stepper control board.
- **pin_d** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin **d** of the stepper control board.
- **sleep_when_done** (*Optional*, boolean): Whether to turn off all coils when the stepper has
reached the target position
- **step_mode** (*Optional*, string): The step mode to operate the motor with. One of:
@ -102,15 +118,7 @@ Configuration variables:
- ``HALF_STEP``
- ``WAVE_DRIVE``
- **max_speed** (**Required**, float): The maximum speed in ``steps/s`` (steps per seconds) to drive the
stepper at. Note most steppers can't step properly with speeds higher than 250 steps/s.
- **acceleration** (*Optional*, float): The acceleration in ``steps/s^2`` (steps per seconds squared)
to use when starting to move. The default is ``inf`` which means infinite acceleration, so the
stepper will try to drive with the full speed immediately. This value is helpful if that first motion of
the motor is too jerky for what it's moving. If you make this a small number, it will take the motor a
moment to get up to speed.
- **deceleration** (*Optional*, float): The same as ``acceleration``, but for when the motor is decelerating
shortly before reaching the set position. Defaults to ``inf`` (immediate deceleration).
- All other from :ref:`base_stepper_config`.
.. _stepper-set_target_action:
@ -141,7 +149,7 @@ position (in steps). The stepper will always run towards the target position and
Configuration options:
- **id** (**Required**, :ref:`config-id`): The ID of the stepper.
- **target** (*Optional*, int, :ref:`templatable <config-templatable>`): The target position in steps.
- **target** (**Required**, int, :ref:`templatable <config-templatable>`): The target position in steps.
.. warning::
@ -195,10 +203,10 @@ the target again.
return -1000;
}
Configuration options:
Configuration variables:
- **id** (**Required**, :ref:`config-id`): The ID of the stepper.
- **target** (*Optional*, int, :ref:`templatable <config-templatable>`): The target position in steps.
- **position** (**Required**, int, :ref:`templatable <config-templatable>`): The position to report in steps.
.. _stepper-set_speed_action:
@ -225,11 +233,11 @@ Configuration variables:
Home Assistant Configuration
----------------------------
This component will not show up in the Home Assistant front-end (Overview) automatically because
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.
be able to control the stepper from the front-end.
.. code-block:: yaml
@ -242,7 +250,7 @@ be able to control the stepper from the front-end.
max: 1000
step: 1
mode: slider
# Do something when the slider changes
automation:
- alias: Write Stepper Value to ESP
@ -255,18 +263,18 @@ be able to control the stepper from the front-end.
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.
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
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
(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``.
@ -276,7 +284,7 @@ the correct syntax is to join the device ID to the API service ID with an unders
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
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,
@ -285,7 +293,7 @@ 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
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.

View File

@ -57,8 +57,8 @@ Automation:
- **elevation** (*Optional*, float): The elevation to cross. Defaults to 0° (horizon).
Sensor Platform
---------------
``sun`` Sensor
--------------
Additionally, the sun component exposes its values over a sensor platform.
@ -85,8 +85,8 @@ Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
Text Sensor Platform
--------------------
``sun`` Text Sensor
-------------------
Other properties like the next sunset time can be read out with the sun text_sensor platform.

View File

@ -22,6 +22,10 @@ The ``uart`` switch platform allows you to send a pre-defined sequence of bytes
- platform: uart
name: "UART Bytes Output"
data: [0xDE, 0xAD, 0xBE, 0xEF]
- platform: uart
name: "UART Recurring Output"
data: [0xDE, 0xAD, 0xBE, 0xEF]
send_every: 1s
Configuration variables:
------------------------
@ -31,6 +35,7 @@ Configuration variables:
- **name** (**Required**, string): The name for the switch.
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the UART hub.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **send_every** (*Optional*, :ref:`config-time`): Sends recurring data instead of sending once.
- All other options from :ref:`Switch <config-switch>`.
See Also

View File

@ -41,8 +41,8 @@ complicated components that use the pin schema will not work. For example the I
scan_time: 2
debounce_time: 1
Configuration variables for the SX1509 device:
----------------------------------------------
Configuration variables:
------------------------
- **id** (**Required**, :ref:`config-id`): The id to use for this SX1509 component.
- **address** (*Optional*, int): The I²C address of the driver.
@ -53,9 +53,9 @@ up to 8x8 matrix (i.e. 64 keys).
- **keypad** (*Optional*): Add this to enable the keypad.
- **key_row** (*Required*, int): The number of keypad rows to use. This enables any number of the first 7 pins.
- **key_rows** (**Required**, int): The number of keypad rows to use. This enables any number of the first 7 pins.
So a value of 3 enables pins 0,1,2 to be used as the rows for the keypad matrix. This value must be between 1 and 8.
- **key_columns** (*Required*, int): The number of keypad columns to use. This enables any number of the last 7 pins.
- **key_columns** (**Required**, int): The number of keypad columns to use. This enables any number of the last 7 pins.
So a value of 4 enables pins 8,9,10,11 to be used as the columns for the keypad matrix. This value must be between 1 and 8.
- **sleep_time** (*Optional*, int): No key press within this time will set keypad engine to sleep.
- **scan_time** (*Optional*, int): Scan time per row (must be set above debounce time).
@ -108,6 +108,9 @@ Attention should be paid to the capabilities of the I/O pins.
| 15 | ✓ | | ✓ |
+-----+------------------+-----+--------+
Binary Sensor
=============
To use the individual keys on the keypad you need to add individual binary_sensor entries in the config.
.. code-block:: yaml
@ -125,12 +128,16 @@ To use the individual keys on the keypad you need to add individual binary_senso
row: 0
col: 1
Configuration variables for the SX1509 keypad keys:
---------------------------------------------------
Configuration variables:
------------------------
- **row** (**Required**, int): The row number for this key on the keypad.
- **col** (**Required**, int): The column number for this key on the keypad.
Pin configuration variables:
----------------------------
With the following configuration items you may use the individual pins of the SX1509 as the pins for binary_sensor, switch, or output.
The outputs can in turn be used to add PWM-enabled lights like the monochromatic light.
@ -174,7 +181,14 @@ The outputs can in turn be used to add PWM-enabled lights like the monochromatic
name: "light0"
output: sx1509_output
- All other options from :ref:`Output <config-output>`.
- **sx1509** (**Required**, :ref:`config-id`): The id of the SX1509 component of the pin.
- **number** (**Required**, integer): The pin number.
- **inverted** (*Optional*, boolean): If all read and written values
should be treated as inverted. Defaults to ``False``.
- **mode** (*Optional*, string): A pin mode to set for the pin at. One of ``INPUT``,
``INPUT_PULLUP`` or ``OUTPUT``.
And naturally you may use all automation functions with these SX1509 binary_sensors, switches and output (lights).

View File

@ -215,8 +215,8 @@ Configuration variables:
- All other from :ref:`base_time_config`.
SNTP Configuration
------------------
SNTP Time Source
----------------
.. code-block:: yaml
@ -234,7 +234,7 @@ Configuration variables:
.. note::
If your are using :ref:`wifi-manual_ip` make sure to configure a DNS Server (dns1, dns2) or use only IP addresses for the NTP servers.
.. warning::
Due to limitations of the SNTP implementation, this component will trigger ``on_time_sync`` only once when it detects that the

View File

@ -52,6 +52,10 @@ Configuration variables:
- **stop_bits** (*Optional*, int): The number of stop bits to send. Options: 1, 2. Defaults to 1.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this UART hub if you need multiple UART hubs.
ESP32 options:
- **invert** (*Optional*, boolean): Invert the logic levels of the RX and TX pins. Options: ``True`` or ``False``. Defaults to ``False``.
.. _uart-hardware_uarts:
Hardware UARTs

Some files were not shown because too many files have changed in this diff Show More