diff --git a/Doxygen b/Doxygen index 56c512d6f..c5c27a8ad 100644 --- a/Doxygen +++ b/Doxygen @@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2022.2.6 +PROJECT_NUMBER = 2022.3.0b1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/Makefile b/Makefile index c47eae3b0..8be5357c1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2022.2.6 +ESPHOME_REF = 2022.3.0b1 .PHONY: html html-strict cleanhtml deploy help live-html Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png minify diff --git a/_static/changelog-2022.3.0.png b/_static/changelog-2022.3.0.png new file mode 100644 index 000000000..ef26bf8bd Binary files /dev/null and b/_static/changelog-2022.3.0.png differ diff --git a/_static/version b/_static/version index e77024185..020c8a30c 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2022.2.6 \ No newline at end of file +2022.3.0b1 \ No newline at end of file diff --git a/changelog/2022.3.0.rst b/changelog/2022.3.0.rst new file mode 100644 index 000000000..914b96296 --- /dev/null +++ b/changelog/2022.3.0.rst @@ -0,0 +1,137 @@ +ESPHome 2022.3.0 - 16th March 2022 +================================== + +.. seo:: + :description: Changelog for ESPHome 2022.3.0. + :image: /_static/changelog-2022.3.0.png + :author: Jesse Hills + :author_twitter: @jesserockz + +.. imgtable:: + :columns: 4 + + Analog Threshold, components/binary_sensor/analog_threshold, analog_threshold.svg + MAX44009, components/sensor/max44009, max44009.svg + Copy, components/copy, content-copy.svg + MPU6886, components/sensor/mpu6886, mpu6886.jpg + MCP4728, components/output/mcp4728, mcp4728.jpg + Honeywell ABP, components/sensor/honeywellabp, honeywellabp.jpg + Mopeka Pro Check LP, components/sensor/mopeka_pro_check, mopeka_pro_check.jpg + + +Webserver +--------- + +Thanks to :ghuser:`wilberforce` for doing a massive bunch of work on giving new life to the frontend of +the :doc:`webserver `. + + +Full list of changes +-------------------- + +New Features +^^^^^^^^^^^^ + +- support for waveshare 7.50in-hd-b :esphomepr:`3239` by :ghuser:`Michanord` (new-feature) +- Add optional display page for touchscreen binary sensors :esphomepr:`3247` by :ghuser:`jesserockz` (new-feature) + +New Components +^^^^^^^^^^^^^^ + +- Analog threshold :esphomepr:`3190` by :ghuser:`ianchi` (new-integration) +- Add sensor support: MAX44009 :esphomepr:`3125` by :ghuser:`berfenger` (new-integration) +- Add copy integration :esphomepr:`3241` by :ghuser:`OttoWinter` (new-integration) +- Add support for MPU-6886 :esphomepr:`3183` by :ghuser:`fabaff` (new-integration) +- Add device support: MCP4728 :esphomepr:`3174` by :ghuser:`berfenger` (new-integration) +- Add sensor support: Honeywell ABP (SPI version) :esphomepr:`3164` by :ghuser:`RubyBailey` (new-integration) +- Add Mopeka BLE and Mopeka Pro Check BLE Sensor :esphomepr:`2618` by :ghuser:`spbrogan` (new-integration) + +Breaking Changes +^^^^^^^^^^^^^^^^ + +- Raise minimum python version to 3.8 :esphomepr:`3176` by :ghuser:`jesserockz` (breaking-change) +- Add class as first positional arg to sensor_schema :esphomepr:`3216` by :ghuser:`jesserockz` (breaking-change) +- BH1750 dynamically calculate options :esphomepr:`3214` by :ghuser:`OttoWinter` (breaking-change) + +Notable Changes +^^^^^^^^^^^^^^^ + +- Webserver v2 :esphomepr:`2688` by :ghuser:`wilberforce` (notable-change) + +All changes +^^^^^^^^^^^ + +- Remove unused obj attribute from AssignmentExpression :esphomepr:`3145` by :ghuser:`OttoWinter` +- Remove spurious Zeroconf instance from api client :esphomepr:`3143` by :ghuser:`OttoWinter` +- Raise minimum python version to 3.8 :esphomepr:`3176` by :ghuser:`jesserockz` (breaking-change) +- Improve dallas timing :esphomepr:`3181` by :ghuser:`OttoWinter` +- Bump pytest-asyncio from 0.18.0 to 0.18.1 :esphomepr:`3187` by :ghuser:`dependabot[bot]` +- Bump pytest from 7.0.0 to 7.0.1 :esphomepr:`3189` by :ghuser:`dependabot[bot]` +- add sim800l diagnostics :esphomepr:`3136` by :ghuser:`glmnet` +- Docker move deps install into base :esphomepr:`3207` by :ghuser:`OttoWinter` +- Remove redundant name from binary_sensor constructor :esphomepr:`3213` by :ghuser:`jesserockz` +- ESP8266 early init for pins :esphomepr:`3144` by :ghuser:`OttoWinter` +- CAN bus: read all queued messages :esphomepr:`3194` by :ghuser:`felixstorm` +- CAN bus: support bit mask for on_frame can_id :esphomepr:`3196` by :ghuser:`felixstorm` +- Simplify captive portal to compressed single page :esphomepr:`2872` by :ghuser:`wilberforce` +- HttpRequestComponent::get_string - avoid copy :esphomepr:`2988` by :ghuser:`roitagar` +- Docker ha-addon switch to nginx-light :esphomepr:`3218` by :ghuser:`OttoWinter` +- Analog threshold :esphomepr:`3190` by :ghuser:`ianchi` (new-integration) +- Fix pm1006 polling component definition :esphomepr:`3210` by :ghuser:`mipa87` +- Add class as first positional arg to sensor_schema :esphomepr:`3216` by :ghuser:`jesserockz` (breaking-change) +- Binary Sensor codegen tidyup :esphomepr:`3217` by :ghuser:`jesserockz` +- Read all cell voltages from DalyBMS :esphomepr:`3203` by :ghuser:`zigman79` +- Remote magiquest protocol :esphomepr:`2963` by :ghuser:`ImSorryButWho` +- Implement text_sensor based on ble_client :esphomepr:`3079` by :ghuser:`ashald` +- Add sensor support: MAX44009 :esphomepr:`3125` by :ghuser:`berfenger` (new-integration) +- Fix for api disconnect detection. :esphomepr:`2909` by :ghuser:`peter-valkov` +- [miscale] Add flag to clear last impedance reading if the newly received reading only contains weight :esphomepr:`3132` by :ghuser:`mknjc` +- Add ESP32 variant config validator function :esphomepr:`3088` by :ghuser:`oxan` +- Fix warning in test1.yaml :esphomepr:`3228` by :ghuser:`OttoWinter` +- Lint trailing whitespace :esphomepr:`3230` by :ghuser:`OttoWinter` +- Add ESP32C3 and ESP32S2 support to dashboard :esphomepr:`3152` by :ghuser:`OttoWinter` +- BH1750 dynamically calculate options :esphomepr:`3214` by :ghuser:`OttoWinter` (breaking-change) +- Bump esphome-dashboard from 20220209.0 to 20220219.0 :esphomepr:`3231` by :ghuser:`OttoWinter` +- Add copy integration :esphomepr:`3241` by :ghuser:`OttoWinter` (new-integration) +- Button code cleanup :esphomepr:`3242` by :ghuser:`OttoWinter` +- Pulse meter internal filter mode :esphomepr:`3082` by :ghuser:`cstaahl` +- Add support for MPU-6886 :esphomepr:`3183` by :ghuser:`fabaff` (new-integration) +- light: add RESTORE_AND_OFF/RESTORE_AND_ON LightRestoreMode :esphomepr:`3238` by :ghuser:`Niorix` +- Implement send_first_at for exponential_moving_average :esphomepr:`3240` by :ghuser:`EdJoPaTo` +- Add device support: MCP4728 :esphomepr:`3174` by :ghuser:`berfenger` (new-integration) +- support for waveshare 7.50in-hd-b :esphomepr:`3239` by :ghuser:`Michanord` (new-feature) +- Fix template button after abstract press_action :esphomepr:`3250` by :ghuser:`jesserockz` +- Store platform as uppercase :esphomepr:`3251` by :ghuser:`jesserockz` +- Add sensor support: Honeywell ABP (SPI version) :esphomepr:`3164` by :ghuser:`RubyBailey` (new-integration) +- Add optional display page for touchscreen binary sensors :esphomepr:`3247` by :ghuser:`jesserockz` (new-feature) +- Add Mopeka BLE and Mopeka Pro Check BLE Sensor :esphomepr:`2618` by :ghuser:`spbrogan` (new-integration) +- Remove stray define :esphomepr:`3260` by :ghuser:`jesserockz` +- Webserver v2 :esphomepr:`2688` by :ghuser:`wilberforce` (notable-change) +- Add entity_category_diagnostics to SGP30 baseline sensors :esphomepr:`3272` by :ghuser:`JasperPlant` +- Bump esphome-dashboard to 20220309.0 :esphomepr:`3277` by :ghuser:`jesserockz` +- Add visual step/min/max for webserver climate :esphomepr:`3275` by :ghuser:`wilberforce` + +Past Changelogs +--------------- + +- :doc:`2022.2.0` +- :doc:`2022.1.0` +- :doc:`2021.12.0` +- :doc:`2021.11.0` +- :doc:`2021.10.0` +- :doc:`2021.9.0` +- :doc:`2021.8.0` +- :doc:`v1.20.0` +- :doc:`v1.19.0` +- :doc:`v1.18.0` +- :doc:`v1.17.0` +- :doc:`v1.16.0` +- :doc:`v1.15.0` +- :doc:`v1.14.0` +- :doc:`v1.13.0` +- :doc:`v1.12.0` +- :doc:`v1.11.0` +- :doc:`v1.10.0` +- :doc:`v1.9.0` +- :doc:`v1.8.0` +- :doc:`v1.7.0` diff --git a/changelog/index.rst b/changelog/index.rst index d093b975e..b58aecd0b 100644 --- a/changelog/index.rst +++ b/changelog/index.rst @@ -2,7 +2,7 @@ Changelog ========= .. redirect:: - :url: /changelog/2022.2.0.html + :url: /changelog/2022.3.0.html .. toctree:: :glob: diff --git a/components/binary_sensor/analog_threshold.rst b/components/binary_sensor/analog_threshold.rst new file mode 100644 index 000000000..8a665eae0 --- /dev/null +++ b/components/binary_sensor/analog_threshold.rst @@ -0,0 +1,59 @@ +Analog Threshold Binary Sensor +============================== + +.. seo:: + :description: Instructions for setting up an analog threshold binary sensors. + :image: analog_threshold.svg + +The ``analog_threshold`` binary sensor platform allows you to convert analog values +(i.e. :doc:`sensor ` readings) +into boolean values, using a threshold as a reference. +When the signal is above or equal to the threshold the binary sensor is `true` +(this behavior can be changed adding and `invert` filter). + +It provides an *hysteresis* option to reduce instability when the source signal is noisy +using different limits depending on the current state. +Additionally a :ref:`delay filter ` could be used to only change +after a new state has been kept a minimum time. + +If the source sensor is uninitialized at the moment of component creation, the initial +state of the binary sensor wil be `false`, if later it has some reading errors, those +invalid source updates will be ignored, and the binary sensor will keep it´s last state. + +For example, below configuration would turn the readings of current sensor into +a binary sensor. + +.. code-block:: yaml + + # Example configuration entry + binary_sensor: + - platform: analog_threshold + name: "Garage Door Opening" + sensor_id: motor_current_sensor + threshold: 0.5 + + +Configuration variables +----------------------- + +- **name** (**Required**, string): The name of the binary sensor. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- **sensor_id** (**Required**, :ref:`config-id`): The ID of the source sensor. +- **threshold** (**Required**, float or mapping): Configures the reference for comparison. Accepts either a shorthand + float number that will be used as both upper/lower threshold, or a mapping to define different values for each (to + use hysteresis). + + - **upper** (**Required**, float): Upper threshold, that needs to be crossed to transition from ``low`` to ``high`` states. + - **lower** (**Required**, float): Lower threshold, that needs to be crossed to transition from ``high`` to ``low`` states. +- All other options from :ref:`Binary Sensor `. + + + +See Also +-------- + +- :doc:`/components/binary_sensor/index` +- :doc:`/components/sensor/index` +- :ref:`automation` +- :apiref:`analog_threshold/analog_threshold_binary_sensor.h` +- :ghedit:`Edit` diff --git a/components/copy.rst b/components/copy.rst new file mode 100644 index 000000000..3035d41b9 --- /dev/null +++ b/components/copy.rst @@ -0,0 +1,197 @@ +Copy Integration +================ + +.. seo:: + :description: Instructions for setting up the copy integration in ESPHome + :image: content-copy.svg + +The ``copy`` integration can be used to copy an existing component (like a sensor, switch, etc.) +and create a duplicate mirroring the source's state and forwarding actions such as turning on to the source. + +For each of the supported platforms, the configuration consists of the required configuration +variable ``source_id``, which is used to indicate the source of the object being mirorred. + +Copy Binary Sensor +------------------ + +.. code-block:: yaml + + # Example configuration entry + binary_sensor: + - platform: copy + source_id: source_binary_sensor + name: "Copy of source_binary_sensor" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The binary sensor that should be mirrored. +- **name** (**Required**, string): The name of the binary sensor. +- All other options from :ref:`Binary Sensor `. + +Copy Button +----------- + +.. code-block:: yaml + + # Example configuration entry + button: + - platform: copy + source_id: source_button + name: "Copy of source_button" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The button that should be mirrored. +- **name** (**Required**, string): The name of the button. +- All other options from :ref:`Button `. + +Copy Cover +---------- + +.. code-block:: yaml + + # Example configuration entry + cover: + - platform: copy + source_id: source_cover + name: "Copy of source_cover" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The cover that should be mirrored. +- **name** (**Required**, string): The name of the cover. +- All other options from :ref:`Cover `. + +Copy Fan +-------- + +.. code-block:: yaml + + # Example configuration entry + fan: + - platform: copy + source_id: source_fan + name: "Copy of source_fan" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The fan that should be mirrored. +- **name** (**Required**, string): The name of the fan. +- All other options from :ref:`Fan `. + +Copy Lock +--------- + +.. code-block:: yaml + + # Example configuration entry + lock: + - platform: copy + source_id: source_lock + name: "Copy of source_lock" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The lock that should be mirrored. +- **name** (**Required**, string): The name of the lock. +- All other options from :ref:`Lock `. + +Copy Number +----------- + +.. code-block:: yaml + + # Example configuration entry + number: + - platform: copy + source_id: source_number + name: "Copy of source_number" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The number that should be mirrored. +- **name** (**Required**, string): The name of the number. +- All other options from :ref:`Number `. + +Copy Select +----------- + +.. code-block:: yaml + + # Example configuration entry + select: + - platform: copy + source_id: source_select + name: "Copy of source_select" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The select that should be mirrored. +- **name** (**Required**, string): The name of the select. +- All other options from :ref:`Select `. + +Copy Sensor +----------- + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: copy + source_id: source_sensor + name: "Copy of source_sensor" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The sensor that should be mirrored. +- **name** (**Required**, string): The name of the sensor. +- All other options from :ref:`Sensor `. + +Copy Switch +----------- + +.. code-block:: yaml + + # Example configuration entry + switch: + - platform: copy + source_id: source_switch + name: "Copy of source_switch" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The switch that should be mirrored. +- **name** (**Required**, string): The name of the switch. +- All other options from :ref:`Switch `. + +Copy Text Sensor +---------------- + +.. code-block:: yaml + + # Example configuration entry + text_sensor: + - platform: copy + source_id: source_text_sensor + name: "Copy of source_text_sensor" + +Configuration variables: +************************ + +- **source_id** (**Required**, :ref:`config-id`): The text sensor that should be mirrored. +- **name** (**Required**, string): The name of the text sensor. +- All other options from :ref:`Text Sensor `. + +See Also +-------- + +- :ghedit:`Edit` diff --git a/components/display/waveshare_epaper.rst b/components/display/waveshare_epaper.rst index 5eebf2e98..b681b861e 100644 --- a/components/display/waveshare_epaper.rst +++ b/components/display/waveshare_epaper.rst @@ -95,6 +95,7 @@ Configuration variables: - ``7.50in-bV2`` (also supports v3, B/W rendering only) - ``7.50in-bc`` (display with version sticker '(C)' on the back, B/W rendering only) - ``7.50inV2`` (Can't use with an ESP8266 as it runs out of RAM) + - ``7.50in-hd-b`` (Can't use with an ESP8266 as it runs out of RAM) - **busy_pin** (*Optional*, :ref:`Pin Schema `): The BUSY pin. Defaults to not connected. - **reset_pin** (*Optional*, :ref:`Pin Schema `): The RESET pin. Defaults to not connected. diff --git a/components/images/web_server-v2.png b/components/images/web_server-v2.png new file mode 100644 index 000000000..0641b85ac Binary files /dev/null and b/components/images/web_server-v2.png differ diff --git a/components/light/index.rst b/components/light/index.rst index a9f53da61..ca2822644 100644 --- a/components/light/index.rst +++ b/components/light/index.rst @@ -43,6 +43,8 @@ Configuration variables: - ``RESTORE_DEFAULT_ON`` - Attempt to restore state and default to ON. - ``RESTORE_INVERTED_DEFAULT_OFF`` - Attempt to restore state inverted from the previous state and default to OFF. - ``RESTORE_INVERTED_DEFAULT_ON`` - Attempt to restore state inverted from the previous state and default to ON. + - ``RESTORE_AND_OFF`` - Attempt to restore state but initialize the light as OFF. + - ``RESTORE_AND_ON`` - Attempt to restore state but initialize the light as ON. - ``ALWAYS_OFF`` - Always initialize the light as OFF on bootup. - ``ALWAYS_ON`` - Always initialize the light as ON on bootup. diff --git a/components/output/mcp4728.rst b/components/output/mcp4728.rst new file mode 100644 index 000000000..567a6a1da --- /dev/null +++ b/components/output/mcp4728.rst @@ -0,0 +1,100 @@ +MCP4728 Output +============== + +.. seo:: + :description: Instructions for setting up MCP4728 outputs on the ESP. + :image: mcp4728.jpg + +.. _mcp4728-component: + +The MCP4728 output component allows to use `12bit external quad DAC +`__ +in order to have analog outputs on any board by using :ref:`I²C `. Devices default address is ``0x60``. + +.. code-block:: yaml + + # Example configuration entry + + # Set a global I²C connection + i2c: + sda: 21 + scl: 22 + scan: true + + # Set the component with default (address: 0x60 / global I²C) + mcp4728: + - platform: mcp4728 + id: dac_output + +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``. +- **store_in_eeprom** (*Optional*, boolean): Use SEQ_WRITE mode to also write to EEPROM sequentially. Defaults to ``false``. + +Output +****** + +The MCP4728 output component exposes 4 MCP4728 channels of a global :ref:`MCP4728 ` as float outputs. + +.. code-block:: yaml + + # Individual outputs + output: + - platform: mcp4728 + id: ac_dimmer_1 + mcp4728_id: dac_output + channel: A + vref: vdd + power_down: normal # default + - platform: mcp4728 + id: ac_dimmer_2 + mcp4728_id: dac_output + channel: B + vref: vdd + power_down: gnd_1k + - platform: mcp4728 + id: ac_dimmer_3 + mcp4728_id: dac_output + channel: C + vref: internal + gain: X1 + power_down: normal # default + - platform: mcp4728 + id: ac_dimmer_4 + mcp4728_id: dac_output + channel: D + vref: internal + gain: X2 + + on_...: + then: + - output.set_level: + id: ac_dimmer_1 + level: 100% + +Configuration variables: +------------------------ + +- **id** (**Required**, :ref:`config-id`): The id to use for this output component. +- **mcp4728_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the + :ref:`MCP4728 `. + Use this if you have multiple MCP4728 chains you want to use at the same time. +- **channel** (**Required**, string): Chose the channel of the MCP4728 chain of + this output component. One of ``A``, ``B``, ``C`` or ``D``. +- **vref** (**Optional**, string): Chose the VREF source. One of ``vdd`` or ``internal``. Defaults to ``vdd``. +- **gain** (**Optional**, string): Chose the GAIN multiplier for internal VREF. One of ``X1`` or ``X2``. Only useful when ``vdd=internal``. Defaults to ``X1``. +- **power_down** (**Optional**, string): Chose the power down mode. In power down mode (value different from ``normal``) the output pin will be connected to GND using a resistor (1kOhm, 100kOhm or 500kOhm). One of ``normal``, ``gnd_1k``, ``gnd_100k`` or ``gnd_500k``. Defaults to ``normal``. +- All other options from :ref:`Output `. + +Output voltage range will be different depending on the ``vref`` source and ``gain``. +When ``vref=vdd``, output voltage will range from 0.000V to VDD. +When ``vref=internal``, output voltage will range from 0.000V to 2.048V with ``gain=X1`` and from 0.000V to 4.096V with ``gain=X2``. + +See Also +-------- + +- :doc:`/components/output/esp32_dac` +- :ghedit:`Edit` diff --git a/components/remote_receiver.rst b/components/remote_receiver.rst index 8d85571c6..af1a4e8e3 100644 --- a/components/remote_receiver.rst +++ b/components/remote_receiver.rst @@ -34,6 +34,7 @@ Configuration variables: - **dish**: Decode and dump Dish infrared codes. - **jvc**: Decode and dump JVC infrared codes. - **lg**: Decode and dump LG infrared codes. + - **magiquest**: Decode and dump MagiQuest wand infrared codes. - **midea**: Decode and dump Midea infrared codes. - **nec**: Decode and dump NEC infrared codes. - **nexa**: Decode and dump Nexa (RF) codes. @@ -75,6 +76,9 @@ Automations: - **on_lg** (*Optional*, :ref:`Automation `): An automation to perform when a LG remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::LGData` is passed to the automation for use in lambdas. +- **on_magiquest** (*Optional*, :ref:`Automation `): An automation to perform when a + MagiQuest wand remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::MagiQuestData` + is passed to the automation for use in lambdas. - **on_midea** (*Optional*, :ref:`Automation `): An automation to perform when a Midea remote code has been decoded. A variable ``x`` of type :apiclass:`remote_base::MideaData` is passed to the automation for use in lambdas. @@ -171,6 +175,11 @@ Remote code selection (exactly one of these has to be included): - **data** (**Required**, int): The LG code to trigger on, see dumper output for more info. - **nbits** (*Optional*, int): The number of bits of the remote code. Defaults to ``28``. +- **magiquest**: Trigger on a decoded MagiQuest wand remote code with the given wand ID. + + - **wand_id** (**Required**, int): The MagiQuest wand ID to trigger on, see dumper output for more info. + - **magnitude** (*Optional*, int): The magnitude of swishes and swirls of the wand. If omitted, will match on any activation of the wand. + - **midea**: Trigger on a Midea remote code with the given code. - **code** (**Required**, 5-bytes list): The code to listen for, see :ref:`remote_transmitter-transmit_midea` diff --git a/components/remote_transmitter.rst b/components/remote_transmitter.rst index cf75e10b5..1eb9be778 100644 --- a/components/remote_transmitter.rst +++ b/components/remote_transmitter.rst @@ -154,6 +154,26 @@ Configuration variables: - **nbits** (*Optional*, int): The number of bits to send. Defaults to ``28``. - All other options from :ref:`remote_transmitter-transmit_action`. +.. _remote_transmitter-transmit_magiquest: + +``remote_transmitter.transmit_magiquest`` Action +************************************************ + +This :ref:`action ` sends a MagiQuest wand code to a remote transmitter. + +.. code-block:: yaml + + on_...: + - remote_transmitter.transmit_magiquest: + wand_id: 0x01234567 + magnitude: 0x080C + +Configuration variables: + +- **wand_id** (**Required**, int): The wand ID to send, as a hex integer. See the dumper output for your wand ID. +- **magnitude** (*Optional*, int): The magnitude of swishes and swirls of the want to transmit. See the dumper output for examples. If omitted, sends 0xFFFF (which the real wand never uses). +- All other options from :ref:`remote_transmitter-transmit_action`. + .. _remote_transmitter-transmit_midea: ``remote_transmitter.transmit_midea`` Action diff --git a/components/sensor/bh1750.rst b/components/sensor/bh1750.rst index 173eb6f79..3c5326afc 100644 --- a/components/sensor/bh1750.rst +++ b/components/sensor/bh1750.rst @@ -28,15 +28,8 @@ your configuration for this sensor to work. - platform: bh1750 name: "BH1750 Illuminance" address: 0x23 - measurement_duration: 69 update_interval: 60s -By default the **measurement_duration** is set to ``69`` which will result into measurements up -to 54612.5 lx for this sensor. For low-light situations consider to choose a higher -measurement_duration up to ``254`` which will result in a maximum measurement range up to 14835 lx. -For sunny scenes (for example outdoors with sunlight) use lower values down to ``31`` which will -give you the maximum measurement range up to 121556 lx. - Configuration variables: ------------------------ @@ -44,10 +37,6 @@ Configuration variables: - **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x23`` (address if address pin is pulled low). If the address pin is pulled high, the address is ``0x5C``. -- **measurement_duration** (*Optional*, int): Manually specify the measurement duration between ``31`` - and ``254``. Defaults to ``69``. -- **resolution** (*Optional*, string): The resolution of the sensor in lx. One of ``4.0``, - ``1.0``, ``0.5``. Defaults to ``0.5`` (the maximum resolution). - **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code diff --git a/components/sensor/daly_bms.rst b/components/sensor/daly_bms.rst index b93a8987a..fcfd0cd15 100644 --- a/components/sensor/daly_bms.rst +++ b/components/sensor/daly_bms.rst @@ -59,6 +59,14 @@ The BMS communicates via :ref:`UART `. name: "Temperature 1" temperature_2: name: "Temperature 2" + cell_1_voltage: + name: "Cell 1 Voltage" + cell_2_voltage: + name: "Cell 2 Voltage" + cell_3_voltage: + name: "Cell 3 Voltage" + cell_4_voltage: + name: "Cell 4 Voltage" text_sensor: - platform: daly_bms @@ -176,6 +184,12 @@ Configuration variables: - **name** (**Required**, string): The name for the second temperature sensor. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - All other options from :ref:`Sensor `. + +- **cell_x_voltage** (*Optional*): The voltage of cell x. + + - **name** (**Required**, string): The name for the cell voltage sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. Text Sensor: ------------ diff --git a/components/sensor/honeywellabp.rst b/components/sensor/honeywellabp.rst new file mode 100644 index 000000000..ef89fc93b --- /dev/null +++ b/components/sensor/honeywellabp.rst @@ -0,0 +1,69 @@ +Honeywell ABP Pressure Sensors +============================== + +.. seo:: + :description: Instructions for setting up Honeywell ABP Pressure sensors + :image: honeywellabp.jpg + :keywords: Honeywell ABP + +The ``honeywellabp`` sensor platform allows you to use your Honeywell ABP +(`website `__, +`datasheet `__, +`Mouser `_) pressure and temperature sensors with ESPHome. The :ref:`SPI ` is +required to be set up in your configuration for this sensor to work + +.. figure:: images/honeywellabp.jpg + :align: center + :width: 50.0% + + Honeywell ABP Pressure and Temperature Sensor. + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: honeywellabp + pressure: + name: "Honeywell pressure" + unit_of_measurement: "psi" + min_pressure: 0 + max_pressure: 15 + temperature: + name: "Honeywell temperature" + cs_pin: GPIO5 #D5 + +Configuration variables: +------------------------ + +The values for ``min_pressure`` and ``max_pressure`` can be found in the device datasheet for the specific device. These are used to calculate +the pressure reading published by the sensor. Some sensors measure pressure in ``bar`` or ``kPa``; set ``min_pressure`` and ``max_pressure`` to +the measurement range and ``unit_of_measurement`` to the appropriate unit for your device. + +- **pressure** (*Optional*): The information for the pressure sensor. + + - **name** (**Required**, string): The name for the pressure sensor. + - **min_pressure** (**Required**, int or float): Minumim pressure for the pressure sensor, default unit ``psi``. + - **max_pressure** (**Required**, int or float): Maximum pressure for the pressure sensor, default unit ``psi``. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. + +Some sensors do not have temperature sensing ability, see datasheet. In some cases the sensor may return a valid temperature even though the +datasheet indicates that the sensor does not measure temperature. + +- **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 `. + + +- **cs_pin** (**Required**, :ref:`SPI `): Chip select pin. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. + +See Also +-------- + +- :ref:`sensor-filters` +- :apiref:`honeywellabp/honeywellabp.h` +- :ghedit:`Edit` diff --git a/components/sensor/images/honeywellabp.jpg b/components/sensor/images/honeywellabp.jpg new file mode 100644 index 000000000..011731975 Binary files /dev/null and b/components/sensor/images/honeywellabp.jpg differ diff --git a/components/sensor/images/mopeka_pro_check.jpg b/components/sensor/images/mopeka_pro_check.jpg new file mode 100644 index 000000000..249f32a63 Binary files /dev/null and b/components/sensor/images/mopeka_pro_check.jpg differ diff --git a/components/sensor/images/mpu6886-ui.png b/components/sensor/images/mpu6886-ui.png new file mode 100644 index 000000000..a028015c9 Binary files /dev/null and b/components/sensor/images/mpu6886-ui.png differ diff --git a/components/sensor/index.rst b/components/sensor/index.rst index 64c454d34..6e382ebcf 100644 --- a/components/sensor/index.rst +++ b/components/sensor/index.rst @@ -400,6 +400,9 @@ Configuration variables: - **alpha** (*Optional*, float): The forget factor/alpha value of the filter. Defaults to ``0.1``. - **send_every** (*Optional*, int): How often a sensor value should be pushed out. Defaults to ``15``. +- **send_first_at** (*Optional*, int): 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``. ``throttle`` ************ diff --git a/components/sensor/max44009.rst b/components/sensor/max44009.rst new file mode 100644 index 000000000..b1c41cb7f --- /dev/null +++ b/components/sensor/max44009.rst @@ -0,0 +1,45 @@ +MAX44009 Ambient Light Sensor +============================= + +.. seo:: + :description: Instructions for setting up MAX44009 ambient light sensors in ESPHome. + :image: max44009.svg + :keywords: MAX44009 + +The ``max44009`` sensor platform allows you to use your MAX44009 +(`datasheet `__) +ambient light sensor with ESPHome. This sensor features an ultra-wide 22-bit dynamic range +from 0.045 lux to 188,000 lux. The :ref:`I²C bus ` is required to be set up in your +configuration for this sensor to work. + +The ``max44009`` sensor can operate in two modes: ``low_power`` (default) and ``continuous``: + +- In ``low_power`` mode, the sensor measures lux intensity only once every 800ms regardless of integration time. + This mode allows the part to operate at its lowest possible supply current. + +- In ``continuous`` mode, the sensor continuously measures lux intensity. That is, as soon as one reading is finished, a + new one begins. If integration time is 6.25ms, readings are taken every 6.25ms. If integration time is 800ms, + readings are taken every 800ms. In this mode, the part consumes slightly higher power than in the ``low_power`` + mode. + +- Additionally mode can be set to ``auto``. In this mode, the mode will be chosen according to the ``update_interval`` + value. If ``update_interval < 800``, ``continuous`` mode will be selected. Otherwise, ``low_power`` mode will be selected. + +Configuration variables: +------------------------ + +- **name** (**Required**, string): The name for the sensor. +- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x4A``. +- **mode** (*Optional*, string): Measurement mode. One of ``auto``, ``low_power``, ``continuous``. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Sensor `. + +See Also +-------- + +- :ref:`sensor-filters` +- :doc:`bh1750` +- `MAX44009 Library `__ by `@RobTillaart `__ +- :ghedit:`Edit` diff --git a/components/sensor/mopeka_ble.rst b/components/sensor/mopeka_ble.rst new file mode 100644 index 000000000..6c787dfec --- /dev/null +++ b/components/sensor/mopeka_ble.rst @@ -0,0 +1,137 @@ +Mopeka Pro Check BLE Sensor +=============================== + +.. seo:: + :description: Instructions for setting up Mopeka Pro Check bluetooth-based sensors in ESPHome. + :image: mopeka_pro_check.jpg + :keywords: Mopeka, Mopeka Pro Check, BLE, Bluetooth + +The ``mopeka_pro_check`` sensor platform lets you track the output of Mopeka +Pro Check LP Bluetooth Low Energy devices using the :doc:`/components/esp32_ble_tracker`. +This component will track the tank level, distance, temperature, and battery +percentage of a Mopeka Pro Check LP device every time the sensor sends +out a BLE broadcast. + +.. warning:: + + This sensor component only supports the Mopeka Pro Check device. The original + Mopeka Check sensors are not supported. + +.. figure:: images/mopeka_pro_check.jpg + :align: center + + Mopeka Pro Check LP over BLE. + +.. code-block:: yaml + + esp32_ble_tracker: + + sensor: + # Example using 20lb vertical propane tank. + - platform: mopeka_pro_check + mac_address: D3:75:F2:DC:16:91 + tank_type: 20LB_V + temperature: + name: "Propane test temp" + level: + name: "Propane test level" + distance: + name: "Propane test distance" + battery_level: + name: "Propane test battery level" + + # Custom example - user defined empty / full points + - platform: mopeka_pro_check + mac_address: D3:75:F2:DC:16:91 + tank_type: CUSTOM + custom_distance_full: 40cm + custom_distance_empty: 10mm + temperature: + name: "Propane c test temp" + level: + name: "Propane c test level" + distance: + name: "Propane c test distance" + battery_level: + name: "Propane c test battery level" + + +Configuration variables: +------------------------ + +- **mac_address** (**Required**, MAC Address): The MAC address of the Mopeka + device. + +- **tank_type** (**Required**): The tank type the sensor is measuring. See below. + +- **custom_distance_full** (*Optional*): distance sensor will read when it should be + considered full (100%). This is only used when tank_type = CUSTOM + +- **custom_distance_empty** (*Optional*): distance sensor will read when it should be + considered empty (0%). This is only used when tank_type = CUSTOM + +- **level** (*Optional*): The percentage of full for the tank sensor + + - All options from :ref:`Sensor `. + +- **distance** (*Optional*): The raw distance/depth of the liquid for the sensor in mm. + + - All options from :ref:`Sensor `. + +- **temperature** (*Optional*): The information for the temperature sensor. + This temperature is on the sensor and is not calibrated to ambient temperature. + + - All options from :ref:`Sensor `. + +- **battery_level** (*Optional*): The information for the battery percentage + sensor. Sensor uses a standard CR2032 battery. + + - All options from :ref:`Sensor `. + +Tank Types +---------- + +Currently supported Tank types are: + +- ``20LB_V`` - 20 LB vertical tank +- ``30LB_V`` - 30 LB vertical tank +- ``40LB_V`` - 40 LB vertical tank +- ``CUSTOM`` - Allows you to define your own full and empty points + +Setting Up Devices +------------------ + +To set up Mopeka Pro Check devices you first need to find their MAC Address so that +ESPHome can identify them. So first, create a simple configuration with the ``esp32_ble_tracker`` +and the ``mopeka_ble`` component like so: + +.. code-block:: yaml + + esp32_ble_tracker: + + mopeka_ble: + +After uploading, the ESP32 will immediately try to scan for BLE devices. For Mopeka Pro +Check devices you must press and hold the green sync button for it to be identified. For all sensors +found the ``mopeka_ble`` component will print a message like this one: + +.. code:: + + [20:43:26][I][mopeka_ble:040]: SENSOR FOUND: D3:75:F2:DC:16:91 + +Then just copy the address (``D3:75:F2:DC:16:91``) into a new +``sensor.mopeka_pro_check`` platform entry like in the configuration example at the top. + +.. note:: + + The ESPHome Mopeka Pro Check BLE integration listens passively to packets the Mopeka 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:`mopeka_pro_check/mopeka_pro_check.h` +- `Mopeka `__ +- :ghedit:`Edit` diff --git a/components/sensor/mpu6886.rst b/components/sensor/mpu6886.rst new file mode 100644 index 000000000..0714d779e --- /dev/null +++ b/components/sensor/mpu6886.rst @@ -0,0 +1,77 @@ +MPU6886 Accelerometer/Gyroscope Sensor +====================================== + +.. seo:: + :description: Instructions for setting up MPU6886 Accelerometer and Gyroscope sensors. + :image: mpu6886.jpg + +The ``mpu6886`` sensor platform allows you to use your MPU6886 Accelerometer/Gyroscope +(`datasheet `__, +`M5Stack`_) sensors with +ESPHome. The :ref:`I²C Bus ` is +required to be set up in your configuration for this sensor to work. + +This component only does some basic filtering and no calibration. Due to the complexity of +this sensor and the amount of possible configuration options, you should probably +create a custom component by copying and modifying the existing code if you want a specific +new feature. Supporting all possible use-cases would be quite hard. + +The MPU6886 is built-in in various M5Stack units (e.g., M5Stick C, ATOM Matrix or M5Stack Core2). + +.. _M5Stack: https://docs.m5stack.com/en/unit/imu + +.. figure:: images/mpu6886-ui.png + :align: center + :width: 80.0% + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: mpu6886 + address: 0x68 + accel_x: + name: "MPU6886 Accel X" + accel_y: + name: "MPU6886 Accel Y" + accel_z: + name: "MPU6886 Accel z" + gyro_x: + name: "MPU6886 Gyro X" + gyro_y: + name: "MPU6886 Gyro Y" + gyro_z: + name: "MPU6886 Gyro z" + temperature: + name: "MPU6886 Temperature" + +Configuration variables: +------------------------ + +- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x68``. +- **accel_x** (*Optional*): Use the X-Axis of the Accelerometer. All options from + :ref:`Sensor `. +- **accel_y** (*Optional*): Use the Y-Axis of the Accelerometer. All options from + :ref:`Sensor `. +- **accel_z** (*Optional*): Use the Z-Axis of the Accelerometer. All options from + :ref:`Sensor `. +- **gyro_x** (*Optional*): Use the X-Axis of the Gyroscope. All options from + :ref:`Sensor `. +- **gyro_y** (*Optional*): Use the Y-Axis of the Gyroscope. All options from + :ref:`Sensor `. +- **gyro_z** (*Optional*): Use the Z-Axis of the Gyroscope. All options from + :ref:`Sensor `. +- **temperature** (*Optional*): Use the internal temperature of the sensor. All options from + :ref:`Sensor `. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``. + +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. + +See Also +-------- + +- :ref:`sensor-filters` +- :doc:`template` +- :apiref:`mpu6886/mpu6886.h` +- `i2cdevlib `__ by `Jeff Rowberg `__ +- :ghedit:`Edit` diff --git a/components/sensor/pulse_meter.rst b/components/sensor/pulse_meter.rst index f8cfa45d1..d91fc5ad6 100644 --- a/components/sensor/pulse_meter.rst +++ b/components/sensor/pulse_meter.rst @@ -26,6 +26,9 @@ Configuration variables: - **internal_filter** (*Optional*, :ref:`config-time`): If a pulse shorter than this time is detected, it’s 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. +- **internal_filter_mode** (*Optional*, string): Determines how the internal filter is applied. + One of ``EDGE`` and ``PULSE``. Defaults to ``EDGE``. In ``EDGE`` mode subsequent rising edges are compared and if they fall into an interval lesser than the internal filter value, the last one is discarded. In ``PULSE`` mode the rising edge is discarded if any further interrupts are detected before the internal_filter time has passed. In other words, a high pulse must be at least internal_filter long to be counted. This is useful if you are detecting long pulses that may bounces before and/or after the main pulse. + - **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:`config-id`): An additional sensor that outputs the total number of pulses counted. - All other options from :ref:`Sensor `. diff --git a/components/sensor/xiaomi_miscale.rst b/components/sensor/xiaomi_miscale.rst index fc57c5bf2..75947a087 100644 --- a/components/sensor/xiaomi_miscale.rst +++ b/components/sensor/xiaomi_miscale.rst @@ -46,6 +46,8 @@ Configuration variables: - **name** (**Required**, string): The name for the impedance sensor. - All other options from :ref:`Sensor `. +- **clear_impedance** (*Optional*): Clear the impedance information if a weight reading without impedance is received. Defaults to ``false``. **Only available on MiScale2** + Useful in the example below if a person steps onto the scale without waiting for the complete measurement. Without setting the flag the impedance reading of the measurement before will be used for the currently measured person. Configuration example with multiple users: ****************************************** diff --git a/components/sim800l.rst b/components/sim800l.rst index d1ce18afb..3c01c990a 100644 --- a/components/sim800l.rst +++ b/components/sim800l.rst @@ -6,6 +6,9 @@ Sim800L Component :image: sim800l.jpg :keywords: SMS SIM800L GSM +Component/Hub +------------- + The ``SIM800L`` Component provides the ability to dial, send and receive SMS text messages. The device must be connected via a :doc:`UART bus ` supporting both receiving and transmitting line. The UART bus must be configured at the same speed of the module which is by default 9600bps. @@ -40,17 +43,49 @@ The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``. format: "Received '%s' from %s" args: [ 'message.c_str()', 'sender.c_str()' ] + sensor: + - platform: sim800l + rssi: + name: "Sim800L RSSI" + + binary_sensor: + - platform: sim800l + registered: + name: "Sim800L Registered" + logger: baud_rate: 0 # disable uart logger on esp 8266 Configuration variables: ------------------------- - **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. - **on_sms_received** (*Optional*, :ref:`Automation `): An action to be performed when an SMS is received. See :ref:`sim800l-on_sms_received`. +Sensor +------ + +Configuration variables: + +- **rssi** (*Optional*): The informed Received signal strength indication (RSSI) in dBm. + + - **name** (**Required**, string): The name for the rssi sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. + + +Binary sensor +------------- + +Configuration variables: + +- **registered** (*Optional*): Indicates if the SIM800L has successfully registered in the cellular network. + + - **name** (**Required**, string): The name for the registered binary sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Binary Sensor `. + .. _sim800l-on_sms_received: ``on_sms_received`` Trigger diff --git a/components/text_sensor/ble_client.rst b/components/text_sensor/ble_client.rst new file mode 100644 index 000000000..f3ba0cd37 --- /dev/null +++ b/components/text_sensor/ble_client.rst @@ -0,0 +1,68 @@ +BLE Client Text Sensor +====================== + +.. seo:: + :description: Fetch string values from BLE devices. + :image: bluetooth.svg + +The ``ble_client`` component is a text sensor platform that can +query BLE devices for specific values of service characteristics. + +For more information on BLE services and characteristics, see +:doc:`/components/ble_client`. + +.. code-block:: yaml + + esp32_ble_tracker: + + ble_client: + - mac_address: FF:FF:20:00:0F:15 + id: itag_black + + text_sensor: + - platform: ble_client + ble_client_id: itag_black + name: "Sensor Location" + service_uuid: '180d' + characteristic_uuid: '2a38' + +Configuration variables: +------------------------ + +- **ble_client_id** (**Required**, :ref:`config-id`): ID of the associated BLE client. +- **service_uuid** (**Required**, UUID): UUID of the service on the device. +- **characteristic_uuid** (**Required**, UUID): UUID of the service's characteristic to query. +- **descriptor_uuid** (*Optional*, UUID): UUID of the characteristic's descriptor to query. +- **id** (*Optional*, :ref:`config-id`): The ID to use for code generation, and for reference by dependent components. +- **notify** (*Optional*, boolean): Instruct the server to send notifications for this + characteristic. Defaults to ``false``. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to poll the device. Defaults to ``60s``. +- All other options from :ref:`Text Sensor `. + +Automations: + +- **on_notify** (*Optional*, :ref:`Automation `): An automation to + perform when a notify message is received from the device. See :ref:`ble_text_sensor-on_notify`. + + +BLE Sensor Automation +--------------------- + +.. _ble_text_sensor-on_notify: + +``on_notify`` +************* + +This automation is triggered when the device/server sends a notify message for +a characteristic. The config variable *notify* must be true or this will have +no effect. +A variable ``x`` of type ``std::string`` is passed to the automation for use in lambdas. + +See Also +-------- + +- :doc:`/components/ble_client` +- :doc:`/components/sensor/ble_client` +- :ref:`sensor-filters` +- :apiref:`ble_text_sensor/ble_text_sensor.h` +- :ghedit:`Edit` diff --git a/components/touchscreen/index.rst b/components/touchscreen/index.rst index 4f9781c05..b40f7e6ed 100644 --- a/components/touchscreen/index.rst +++ b/components/touchscreen/index.rst @@ -57,6 +57,7 @@ buttons. x_max: 100 y_min: 0 y_max: 100 + page_id: home_page_id Configuration Variables: ************************ @@ -68,6 +69,7 @@ Configuration Variables: - **x_max** (**Required**, int): Right coordinate of the screen area to be detected as the virtual button. - **y_min** (**Required**, int): Top coordinate of the screen area to be detected as the virtual button. - **y_max** (**Required**, int): Bottom coordinate of the screen area to be detected as the virtual button. +- **page_id** (*Optional*, :ref:`config-id`): Only trigger this binary sensor if the display is showing this page. - All other options from :ref:`Binary Sensor `. diff --git a/components/web_server.rst b/components/web_server.rst index 9c1c83b7f..3c19d720b 100644 --- a/components/web_server.rst +++ b/components/web_server.rst @@ -20,9 +20,14 @@ interface are hosted by esphome.io. If you want to use your own service, use the .. _REST API: /web-api/index.html .. figure:: /components/images/web_server.png - :align: center - Example web server frontend. + Example web server frontend (Version 1) + +Version 2: +---------- +.. figure:: /components/images/web_server-v2.png + + Web Components (Version 2) .. code-block:: yaml @@ -54,6 +59,7 @@ Configuration variables: web interface. Defaults to ``false``. - **ota** (*Optional*, boolean): Turn on or off the OTA feature inside webserver. Strongly not suggested without enabled authentication settings. Default: `true` - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- **version** (*Optional*, string): 1 or 2. Version 1 displays as a table. Version 2 uses web components and has more functionality. Default: `2` .. note:: @@ -67,21 +73,63 @@ Configuration variables: auth: username: admin password: !secret web_server_password - - Example web_server configuration with CSS and JS included from esphome-docs. - CSS and JS URL's are set to empty value, so no internet access is needed for this device to show it's web interface. - Force to turn off OTA function because the missing authentication. + + Example web_server configuration using version 1 (previous behaviour): .. code-block:: yaml # Example configuration entry web_server: port: 80 - ota: false - css_include: "../../../esphome-docs/_static/webserver-v1.min.css" - css_url: "" - js_include: "../../../esphome-docs/_static/webserver-v1.min.js" - js_url: "" + version: 1 + + Example web_server configuration using version 2 - no internet/intranet required: + + .. code-block:: yaml + + # Example configuration entry + web_server: + local: true + + + + All of the assets are inlined, compressed and served from flash + +Here be Dragons +=============== + +The following assume copies of the files with local paths - which are config dependant. + +Example web_server version 1 configuration with CSS and JS included from esphome-docs. +CSS and JS URL's are set to empty value, so no internet access is needed for this device to show it's web interface. +Force to turn off OTA function because the missing authentication. + +.. code-block:: yaml + + # Example configuration entry V1 + web_server: + port: 80 + ota: false + css_include: "../../../esphome-docs/_static/webserver-v1.min.css" + js_include: "../../../esphome-docs/_static/webserver-v1.min.js" + js_url: "" + +Example web_server version 2 configuration with JS included from a local file. + +CSS and JS URL's are set to empty value, so no internet access is needed for this device to show it's web interface. +V2 embeds the css within the js file so is not required, however you could include your own CSS. + +.. code-block:: yaml + + # Example configuration entry V2 + web_server: + js_include: "./v2/www.js" + js_url: "" + version: 2 + + +Copy https://oi.esphome.io/v2/www.js to a V2 folder in your yaml folder. + See Also -------- diff --git a/conf.py b/conf.py index 52148565a..9e701d396 100644 --- a/conf.py +++ b/conf.py @@ -67,9 +67,9 @@ author = "ESPHome" # built documents. # # The short X.Y version. -version = "2022.2" +version = "2022.3" # The full version, including alpha/beta/rc tags. -release = "2022.2.6" +release = "2022.3.0b1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/guides/supporters.rst b/guides/supporters.rst index 14a397d1d..f5fed4bb9 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -339,6 +339,7 @@ Contributors - `Jan Pieper (@janpieper) `__ - `Jason2866 (@Jason2866) `__ - `Jason Hines (@jasonehines) `__ +- `JasperPlant (@JasperPlant) `__ - `Jas Strong (@jasstrong) `__ - `Jonas Bergler (@jbergler) `__ - `JbLb (@jblb) `__ @@ -747,8 +748,8 @@ Contributors - `tony (@tony-fav) `__ - `David Kiliani (@torfbolt) `__ - `Torwag (@torwag) `__ +- `Teemu Simola (@tpssim) `__ - `Felix Eckhofer (@tribut) `__ -- `Trick van Staveren (@trickv) `__ - `Tobias (@tripplet) `__ - `Troon (@Troon) `__ - `Tyler Bules (@Troublebrewing) `__ @@ -805,4 +806,4 @@ Contributors - `Michael Labuschke (@zigman79) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated March 2, 2022.* +*This page was last updated March 9, 2022.* diff --git a/images/analog_threshold.svg b/images/analog_threshold.svg new file mode 100644 index 000000000..545ebba92 --- /dev/null +++ b/images/analog_threshold.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/content-copy.svg b/images/content-copy.svg new file mode 100644 index 000000000..0968db1a7 --- /dev/null +++ b/images/content-copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/honeywellabp.jpg b/images/honeywellabp.jpg new file mode 100644 index 000000000..011731975 Binary files /dev/null and b/images/honeywellabp.jpg differ diff --git a/images/max44009.svg b/images/max44009.svg new file mode 100644 index 000000000..5f4fd23b7 --- /dev/null +++ b/images/max44009.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + diff --git a/images/mcp4728.jpg b/images/mcp4728.jpg new file mode 100644 index 000000000..7184b4fe0 Binary files /dev/null and b/images/mcp4728.jpg differ diff --git a/images/mopeka_pro_check.jpg b/images/mopeka_pro_check.jpg new file mode 100644 index 000000000..249f32a63 Binary files /dev/null and b/images/mopeka_pro_check.jpg differ diff --git a/images/mpu6886.jpg b/images/mpu6886.jpg new file mode 100644 index 000000000..bb5cbd446 Binary files /dev/null and b/images/mpu6886.jpg differ diff --git a/index.rst b/index.rst index 74af7f4af..513cfd826 100644 --- a/index.rst +++ b/index.rst @@ -221,6 +221,7 @@ Bluetooth Low Energy (BLE) BLE Client Sensor, components/sensor/ble_client, bluetooth.svg BLE RSSI, components/sensor/ble_rssi, bluetooth.svg Inkbird IBS-TH1 Mini, components/sensor/inkbird_ibsth1_mini, inkbird_isbth1_mini.jpg, Temperature & Humidity + Mopeka Pro Check LP, components/sensor/mopeka_pro_check, mopeka_pro_check.jpg, tank level RuuviTag, components/sensor/ruuvitag, ruuvitag.jpg, Temperature & Humidity & Accelerometer Xiaomi BLE, components/sensor/xiaomi_ble, xiaomi_mijia_logo.jpg, Various @@ -292,6 +293,7 @@ Environmental DHT, components/sensor/dht, dht.jpg, Temperature & Humidity DHT12, components/sensor/dht12, dht12.jpg, Temperature & Humidity HDC1080, components/sensor/hdc1080, hdc1080.jpg, Temperature & Humidity + Honeywell ABP, components/sensor/honeywellabp, honeywellabp.jpg, Pressure & Temperature HTU21D, components/sensor/htu21d, htu21d.jpg, Temperature & Humidity Inkbird IBS-TH1 Mini, components/sensor/inkbird_ibsth1_mini, inkbird_isbth1_mini.jpg, Temperature & Humidity MCP9808, components/sensor/mcp9808, mcp9808.jpg, Temperature @@ -319,6 +321,7 @@ Light APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture BH1750, components/sensor/bh1750, bh1750.jpg, Lux LTR390, components/sensor/ltr390, ltr390.jpg, Lux & UV + MAX44009, components/sensor/max44009, max44009.svg, Lux TCS34725, components/sensor/tcs34725, tcs34725.jpg, Lux & RGB colour TSL2561, components/sensor/tsl2561, tsl2561.jpg, Lux TSL2591, components/sensor/tsl2591, tsl2591.jpg, Lux @@ -358,6 +361,7 @@ Motion APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture MPU6050, components/sensor/mpu6050, mpu6050.jpg, Accelerometer & Gyroscope + MPU6886, components/sensor/mpu6886, mpu6886.jpg, Accelerometer & Gyroscope RuuviTag, components/sensor/ruuvitag, ruuvitag.jpg, Temperature & Humidity & Accelerometer @@ -393,6 +397,7 @@ Binary Sensor Components GPIO, components/binary_sensor/gpio, pin.svg Home Assistant, components/binary_sensor/homeassistant, home-assistant.svg Status, components/binary_sensor/status, server-network.svg + Analog Threshold, components/binary_sensor/analog_threshold, analog_threshold.svg ESP32 BLE Presence, components/binary_sensor/ble_presence, bluetooth.svg ESP32 Touch Pad, components/binary_sensor/esp32_touch, touch.svg MPR121 Capacitive Touch Sensor, components/binary_sensor/mpr121, mpr121.jpg @@ -428,6 +433,7 @@ Output Components SM16716, components/output/sm16716, sm16716.svg SM2135, components/output/sm2135, sm2135.svg MCP4725, components/output/mcp4725, mcp4725.jpg + MCP4728, components/output/mcp4728, mcp4728.jpg MCP47A1, components/output/mcp47a1, mcp47a1.svg BLE Binary Output, components/output/ble_client, bluetooth.svg Modbus Output, components/output/modbus_controller, modbus.png @@ -665,6 +671,7 @@ Misc Components PipSolar - compatible PV Inverter, components/pipsolar, pipsolar.jpg Grow Fingerprint Reader, components/fingerprint_grow, fingerprint.svg Demo, components/demo, description.svg + Copy, components/copy, content-copy.svg Additional Custom Components ----------------------------