Merge branch 'current' into next

This commit is contained in:
Otto Winter 2019-03-20 13:07:16 +01:00
commit ded5bd5c06
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
25 changed files with 358 additions and 96 deletions

View File

@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.11.2
PROJECT_NUMBER = 1.12.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@ -1,5 +1,5 @@
ESPHOME_CORE_PATH = ../esphome-core
ESPHOME_CORE_TAG = v1.11.2
ESPHOME_CORE_TAG = v1.12.0
.PHONY: html cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -1 +1 @@
1.11.2
1.12.0

View File

@ -33,7 +33,7 @@
</div>
<div id="upgrade-footer">
A new version has been release since you last visited this page: {{ release }} 🎉
<a id="upgrade-footer-changelog" href="/changelog/index.html">View Changelog</a>
<a id="upgrade-footer-changelog" href="/changelog/v{{ version }}.0.html">View Changelog</a>
</div>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113203480-2"></script>

View File

@ -10,25 +10,142 @@ Changelog - Version 1.12.0
.. imgtable::
User-Defined Services, components/api.html#user-defined-services, home-assistant.svg
MPR121, components/binary_sensor/mpr121, mpr121.jpg
SDS011, components/sensor/sds011, sds011.jpg
ESP32 Camera, components/esp32_camera, camera.svg
MPR121, components/binary_sensor/mpr121, mpr121.jpg
SDS011, components/sensor/sds011, sds011.jpg
MCP23017, components/mcp23017, mcp23017.svg
Servo, components/servo, servo.svg
TODO
WiFi Info, components/text_sensor/wifi_info, network-wifi.svg
It's release day! 🎉 Today I'm happy to release ESPHome 1.12.0. What's new? A lot of awesome
stuff got added! Let me walk you through it:
Before 1.12, it was only possible to transfer data from ESPHome to Home Assistant (with the
``homeassistant.service`` call). With 1.12 you get :ref:`User-defined services <api-services>`,
just define a service in your ESPHome file and call it like any other service from HA. All the
rest (like variables, data validation, etc) are handled automatically!
:doc:`ESP32 Camera Support </components/esp32_camera>`: This is huge. When integrating cameras
into your smart home you'd always have to weigh between security and price; cheap cameras often
are very insecure (and sometimes even exposed on the web). And even the pricier ones would
sometimes phone back to the manufacturer and upload your data. With ESPHome, everything's 100%
local and communicates *directly* with Home Assistant. It took a bit longer than I initially
anticipated to iron out most stability issues, but with 1.12.0 it's finally here :)
And thanks very much to :ghuser:`puuu` for the :doc:`SDS011 Particulate Matter integration </components/sensor/sds011>` and
:ghuser:`mvturnho` for the newly added
:doc:`MPR121 Capacitive Touch sensor </components/binary_sensor/mpr121>` support!
And as always, this release contains tons of small adjustments (like automatically providing
suggestions for validation errors) and bug fixes to make your life easier.
Breaking Changes
----------------
TODO - No major ones though (+ all handled through validation error messages)
- The ``timeout_meter`` and ``timeout_time`` options of the ultrasonic sensor
have been merged into ``timeout``. (:doc:`/components/sensor/ultrasonic`)
- Ultrasonic Sensor no longer works with GPIO16 as echo pin on ESP8266s because
the implementation switched to an asynchronous interrupt mode.
Other notable changes:
----------------------
- Added ``calibrate_linear`` sensor filter for easier calibration of sensors
(:ref:`sensor-filter-calibrate_linear`)
- Added ``for`` parameter :ref:`binary_sensor.is_on <binary_sensor-is_on_condition>` condition.
- Added ``for`` parameter to :ref:`binary_sensor.is_on <binary_sensor-is_on_condition>` condition.
- Added ``streamer_mode``, ``status_use_ping`` and ``relative_url`` options to the Hass.io addon
(see addon description).
- Improved validation. For small typos for config variables similar keys are automatically
suggested.
- Added ``esp8266_restore_from_flash`` to :doc:`esphome section </components/esphome>` which
enables restoring state from flash instead of RTC memory - this allows recovering relay state
even after a power cycle.
- Added ability
- ``!secret`` values are now hidden for config validation.
- Rotary Encoders have a new ``min_value`` and ``max_value`` option. (:doc:`/components/sensor/rotary_encoder`)
- Fixed OTA not working for ESP32 when BLE enabled.
- Added a "delete" button in the dashboard interface to delete configuration files.
- Reworked GPIO interrupts, this will fix a bunch of issues with components that use interrupts
(rotary encoder, software uart, remote receiver, ...)
- Allowed the use of newest Arduino Core version for ESP8266: ``2.5.0`` (not default yet,
please try it out on non-critical devices and report if there are no wifi issues)
All changes
-----------
- core: Fix feed_wdt :corepr:`520`
- core: Speed up waveshare Epaper :corepr:`518`
- esphome: Improve dashboard setup wizard :esphomepr:`450`
- core: Add MPR121 support for esphome-core :corepr:`517` by :ghuser:`mvturnho`
- esphome: Add MPR121 Capacitive Touch Sensor :esphomepr:`449` by :ghuser:`mvturnho`
- core: Add restore state from flash option :corepr:`530`
- esphome: Add restore state from flash option :esphomepr:`459`
- docs: Add restore state from flash option :docspr:`181`
- esphome: Automatically hide secrets in validation :esphomepr:`455`
- core: Add nextion commands :corepr:`523`
- core: Add logic in Output for minimum power setting :corepr:`516` by :ghuser:`mtl010957`
- esphome: Add handling for min power output setting :esphomepr:`448` by :ghuser:`mtl010957`
- docs: Update output documentation for min_power configuration :docspr:`167` by :ghuser:`mtl010957`
- esphome: Recommend similar keys for spelling errors :esphomepr:`458`
- core: Convert Automation engine to variadic templates :corepr:`519`
- core: Add linear calibration filter :corepr:`524`
- esphome: Convert automation engine to use variadic templates :esphomepr:`452`
- docs: Add linear calibration filter :docspr:`180`
- core: Add native API User-Defined services :corepr:`522`
- esphome: Add native API User-Defined services :esphomepr:`453`
- esphome: Add linear calibration sensor filter :esphomepr:`454`
- docs: Component reshuffle :docspr:`183` by :ghuser:`FrengerH`
- docs: Add MPR121 support :docspr:`176` by :ghuser:`mvturnho`
- esphome: Fix os.symlink on Windows :esphomepr:`460`
- esphome: Enable i2c scanning by default :esphomepr:`462`
- core: Add rotary encoder min/max value :corepr:`534`
- esphome: Add rotary encoder min/max value :esphomepr:`463`
- esphome: Fix gain setting for ADS1115 :esphomepr:`468` by :ghuser:`Melkor82`
- core: Use clang-format and clang-tidy in CI :corepr:`540`
- core: Add GPIO interrupt abstraction :corepr:`535`
- core: Add MCP23017 :corepr:`537`
- core: Add WiFi/MQTT/API connected condition :corepr:`536`
- core: Fix debug statement in ESP32 Hall Sensor :corepr:`533` by :ghuser:`emwap`
- core: Remove light mqtt_json warning :corepr:`532`
- esphome: Add WiFi/MQTT/API connected condition :esphomepr:`465`
- esphome: Rewrite interrupt components :esphomepr:`464`
- esphome: Add relative_url, streamer_mode, status_use_ping dashboard options :esphomepr:`461`
- esphome: Add MCP23017 :esphomepr:`466`
- esphome: Allow Arduino Core 2.5.0 for ESP8266 :esphomepr:`469`
- core: Add copy output platform :corepr:`542`
- core: Add 'for' to binary sensor conditions :corepr:`541`
- esphome: Upgrade ESP32 core to 1.0.1 :esphomepr:`470`
- core: Add WiFi Info Text Sensor :corepr:`543`
- esphome: Add for to binary sensor conditions :esphomepr:`471`
- esphome: Add connected condition :esphomepr:`474`
- esphome: Add copy output platform :esphomepr:`472`
- esphome: Add Wifi info text sensor :esphomepr:`473`
- docs: Add text-based sensor example to OLED cookbook entry :docspr:`190` by :ghuser:`tubalainen`
- docs: H801 Cookbook Edit Language about holding GPIOs during flashing :docspr:`189` by :ghuser:`2016for`
- docs: Adding manual for Sonoff T1 UK 3 Gang V1.1 :docspr:`182` by :ghuser:`nnmalex`
- core: Add SDS011 :corepr:`538` by :ghuser:`puuu`
- esphome: Support SDS011 component. :esphomepr:`467` by :ghuser:`puuu`
- docs: Document SDS011 component :docspr:`185` by :ghuser:`puuu`
- docs: Add Teckin SP20 (US) example to 'Generic Sonoff' page :docspr:`191` by :ghuser:`mjoshd`
- esphome: Add color to login error for better visibility :esphomepr:`478` by :ghuser:`TheZoker`
- core: Fixed: Waveshare 4.2in display timing problem due to high speed SPI u… :corepr:`546` by :ghuser:`dirkj`
- docs: Update information on flashing OTA to old ip :docspr:`193` by :ghuser:`tubalainen`
- docs: NeopixelBus Light: Fix GPIO2 not GPIO3 for uart1 method :docspr:`194` by :ghuser:`Bierchermuesli`
- docs: Cookbook Guide for Mirabella Genio Smart Bulbs :docspr:`184` by :ghuser:`cryptelli`
- docs: Improve bme280_environment cookbook for stable climates :docspr:`149` by :ghuser:`hajdbo`
- core: SDS011: change type of update_interval_min to uint8_t :corepr:`545` by :ghuser:`puuu`
- core: Add ESP32 camera support :corepr:`544`
- docs: Cookbook Guide for Brilliant / Mirabella Genio Smart Plugs :docspr:`195` by :ghuser:`cryptelli`
- esphome: Add ESP32 Camera :esphomepr:`475`
- docs: Add native API User-Defined services :docspr:`171` (cherry-picked)
- docs: BME280 environment micrograms -> grams :docspr:`198` by :ghuser:`hajdbo`
- esphome: Changes for 1.12 :esphomepr:`482` (cherry-picked)
- core: Fixes for 1.12 :corepr:`551` (cherry-picked)
- core: More changes for 1.12 :corepr:`552`
- esphome: More changes for 1.12 :esphomepr:`483`
- esphome: Update Hassio base image to 1.4.1 :esphomepr:`484`
Past Changelogs
---------------

View File

@ -8,19 +8,6 @@ ESP32 Camera Component
The ``esp32_camera`` component allows you to use ESP32-based camera boards in ESPHome that
directly integrate into Home Assistant through the native API.
.. warning::
Some ESP32 Camera boards have insufficient cooling and will overheat over time,
ESPHome does only activate the camera when Home Assistant requests an image, but
the camera until can still heat up considerably for some boards.
If the camera is not recognized after a reboot and the unit feels warm, try waiting for
it to cool down and check again - if that still doesn't work try enabling the test pattern.
.. note::
The example configuration is valid for M5Stack ESP32 camera models.
.. code-block:: yaml
# Example configuration entry
@ -60,8 +47,8 @@ Connection Options:
- **i2c_pins** (**Required**): The i2c control pins of the camera.
- **sda** (**Required**, pin): The SDA pin of the i2c interface.
- **scl** (**Required**, pin): The SCL pin of the i2c interface.
- **sda** (**Required**, pin): The SDA pin of the i2c interface. Also called ``SIOD``.
- **scl** (**Required**, pin): The SCL pin of the i2c interface. Also called ``SIOC``.
- **reset_pin** (*Optional*, pin): The ESP pin the reset pin of the camera is connected to.
If set, this will reset the camera before the ESP boots.
@ -100,6 +87,89 @@ Frame Settings:
- **vertical_flip** (*Optional*, bool): Whether to flip the image vertically. Defaults to ``true``.
- **horizontal_mirror** (*Optional*, bool): Whether to mirror the image horizontally. Defaults to ``true``.
.. note::
The camera integration in Home Assistant isn't in stable or beta HA builds, so until 0.91
ships or goes into beta you will need to use a development version of Home Assistant.
Configuration for Ai-Thinker Camera
-----------------------------------
.. code-block:: yaml
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
# Image settings
name: My Camera
# ...
Configuration for M5Stack Camera
--------------------------------
.. warning::
This camera board has insufficient cooling and will overheat over time,
ESPHome does only activate the camera when Home Assistant requests an image, but
the camera until can still heat up considerably for some boards.
If the camera is not recognized after a reboot and the unit feels warm, try waiting for
it to cool down and check again - if that still doesn't work try enabling the test pattern.
.. code-block:: yaml
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO27
frequency: 20MHz
i2c_pins:
sda: GPIO25
scl: GPIO23
data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
vsync_pin: GPIO22
href_pin: GPIO26
pixel_clock_pin: GPIO21
reset_pin: GPIO15
# Image settings
name: My Camera
# ...
Configuration for Wrover Kit Boards
-----------------------------------
.. code-block:: yaml
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO21
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO4, GPIO5, GPIO18, GPIO19, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
# Image settings
name: My Camera
# ...
See Also
--------

View File

@ -46,9 +46,9 @@ Advanced options:
platformio.ini file. See :ref:`esphome-platformio_options`.
- **use_custom_code** (*Optional*, boolean): Whether to configure the project for writing custom components.
This sets up some flags so that custom code should compile correctly
- **includes** (*Optional*, list of files): A list of files to include in the main (auto-generated) sketch file
- **includes** (*Optional*, list of files): A list of C[++] files to include in the main (auto-generated) sketch file
for custom components. The paths in this list are relative to the directory where the YAML configuration file
is in.
is in. Should have file extension ``.h``
- **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>`__.
@ -162,12 +162,15 @@ option you can tell ESPHome which arduino framework to use for compiling.
For the ESP8266, you currently can manually pin the arduino version to these values (see the full
list of arduino frameworks `here <https://github.com/esp8266/Arduino/releases>`__):
* `2.4.2 <https://github.com/esp8266/Arduino/releases/tag/2.4.2>`__ (the latest version)
* `2.5.0 <https://github.com/esp8266/Arduino/releases/tag/2.5.0>`__
* `2.4.2 <https://github.com/esp8266/Arduino/releases/tag/2.4.2>`__ (default)
* `2.4.1 <https://github.com/esp8266/Arduino/releases/tag/2.4.1>`__
* `2.4.0 <https://github.com/esp8266/Arduino/releases/tag/2.4.0>`__
For the ESP32, there's currently only one arduino framework version:
`1.0.0 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.0>`__.
For the ESP32, there are two arduino framework versions:
- `1.0.1 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.1>`__ (default).
- `1.0.0 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.0>`__.
.. _esphome-on_boot:

View File

@ -10,6 +10,8 @@ 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.
This component restores its state on reboot/reset.
.. figure:: images/fan-ui.png
:align: center
:width: 70.0%

View File

@ -17,8 +17,8 @@ channels will be mixed using the color temperature configuration options.
name: "Livingroom Lights"
cold_white: output_component1
warm_white: output_component2
cold_white_color_temperature: 153 mireds
warm_white_color_temperature: 500 mireds
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
Configuration variables:
------------------------

View File

@ -9,6 +9,8 @@ The ``light`` domain in ESPHome lets you create lights that will
automatically be shown in Home Assistants frontend and have many
features such as RGB colors, transitions, flashing and effects.
This component restores its state on reboot/reset.
.. _light-toggle_action:
``light.toggle`` Action
@ -104,6 +106,12 @@ Configuration options:
// perform action:
call.perform();
.. note::
The ``red``, ``green`` and ``blue`` values only control the color of the light, not its
brightness! If you assign ``50%`` to all RGB channels it will be interpreted as 100% on.
Only use ``brightness`` to control the brightness of the light.
.. _light-turn_off_action:
``light.turn_off`` Action

View File

@ -20,8 +20,8 @@ and warm white channels will be mixed using the color temperature configuration
blue: output_component3
cold_white: output_component4
warm_white: output_component5
cold_white_color_temperature: 153 mireds
warm_white_color_temperature: 500 mireds
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
Configuration variables:
------------------------

53
components/mcp23017.rst Normal file
View File

@ -0,0 +1,53 @@
MCP23017 I/O Expander
=====================
.. seo::
:description: Instructions for setting up MCP23017 digital port expanders in ESPHome.
:image: mcp23017.png
The MCP23017 component allows you to use MCP23017 I/O expanders
(`datasheet <http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf>`__,
`Adafruit <https://www.adafruit.com/product/732>`__) in ESPHome.
It uses the :ref:`I²C Bus <i2c>` for communication.
Once configured, you can use any of the 16 pins as
pins for your projects. Within ESPHome they emulate a real internal GPIO pin
and can therefore be used with many of ESPHome's components such as the GPIO
binary sensor or GPIO switch.
.. code-block:: yaml
# Example configuration entry
mcp23017:
- id: 'mcp23017_hub'
address: 0x20
# Individual outputs
switch:
- platform: gpio
name: "MCP23017 Pin #0"
pin:
mcp23017: mcp23017_hub
# Use pin number 0
number: 0
# One of INPUT, INPUT_PULLUP or OUTPUT
mode: OUTPUT
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.
Defaults to ``0x21``.
See Also
--------
- :ref:`i2c`
- :doc:`switch/gpio`
- :doc:`binary_sensor/gpio`
- :apiref:`io/mcp23017.h`
- :ghedit:`Edit`
.. disqus::

View File

@ -4,7 +4,6 @@ PCF8574 I/O Expander
.. seo::
:description: Instructions for setting up PCF8574 digital port expanders in ESPHome.
:image: pcf8574.jpg
:keywords: Xiaomi, Mi Flora, BLE, Bluetooth
The PCF8574 component allows you to use PCF8574 or PCF8575 I/O expanders
(`datasheet <http://www.ti.com/lit/ds/symlink/pcf8574.pdf>`__,

View File

@ -55,29 +55,12 @@ Configuration variables:
- 4
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **min_value** (*Optional*, int): The minimum value this rotary encoder will go to, turning
the knob further will not decrease the number. Defaults to no minimum.
- **max_value** (*Optional*, int): The maximum value this rotary encoder will go to, turning
the knob further will not increase the number. Defaults to no maximum.
- All other options from :ref:`Sensor <config-sensor>`.
Debouncing Output
-----------------
This sensor can output a lot of values in a short period of time when turning the knob.
In order to not put too much stress on your network connection, you can leverage ESPHome's
sensor filters. The following will only send out values if the last input value is at least
0.1s seconds old *or* if the new rotary encoder value has changed by 10 from the previous value.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: rotary_encoder
name: "Rotary Encoder"
pin_a: D1
pin_b: D2
filters:
- or:
- debounce: 0.1s
- delta: 10
See Also
--------

View File

@ -18,9 +18,7 @@ This sensor platform expects a sensor that can be sent a **trigger
pulse** on a specific pin and will send out a **echo pulse** once a
measurement has been taken. Because sometimes (for example if no object
is detected) the echo pulse is never returned, this sensor also has a
timeout option which specifies how long to wait for values. During this
timeout period the whole core will be blocked and therefore shouldn't be
set too high.
timeout option which specifies how long to wait for values.
.. figure:: images/ultrasonic-full.jpg
:align: center
@ -49,37 +47,13 @@ Configuration variables:
- **echo_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The input pin on which to
wait for the echo.
- **name** (**Required**, string): The name of the sensor.
- **timeout_meter** (*Optional*, float): The number of meters for the
timeout. Use either this or ``timeout_time``. Defaults to 2 meters.
- **timeout_time** (*Optional*, int): The number of microseconds for
the timeout. Use either this or ``timeout_meter``. Defaults to
11662µs.
- **timeout** (*Optional*, float): The number of meters for the
timeout. Most sensors can only sense up to 2 meters. Defaults to 10 meters.
- **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 <config-sensor>`.
Ultrasonic Timeouts
-------------------
The ultrasonic sensor works by sending a small ultrasonic pulse out and then waiting until
the pulse arrives back. However, there are cases where no such signal arrives back. This is most commonly caused
by either having the sensor pointed at a soft surface that muffles the incoming signal. The other case where this
can happen is when the the object is too far away and the timeout set by the ``timeout_meter`` or ``timeout_time``
option kicks in.
To remove ``NAN`` values from the sensor stream, use the ``filter_nan`` :ref:`sensor filter <sensor-filters>`:
.. code-block:: yaml
sensor:
- platform: ultrasonic
trigger_pin: D1
echo_pin: D2
name: "Ultrasonic Sensor"
filters:
- filter_nan:
See Also
--------

View File

@ -51,6 +51,13 @@ Advanced Options:
- **max_level** (*Optional*, percentage): The PWM duty cycle the maximum value (100%) will map
to. Defaults to ``12.0%``.
.. note::
Some servos support a larger range for the level. For continuous rotation servos
this can speed them up a bit and for absolute servos this can extend their angle range.
You can configure the ``min_level`` and ``max_level`` options to adjust the level range
to match your servo (Experiment with these values).
.. _servo-write_action:
``servo.write`` Action
@ -130,7 +137,7 @@ be able to control the servo from the frontend.
# Replace livingroom with the name you gave the ESP
- service: esphome.livingroom_control_servo
data_template:
target: '{{ trigger.to_state.state | int }}'
level: '{{ trigger.to_state.state | int }}'
.. code-block:: yaml

View File

@ -0,0 +1,39 @@
WiFi Info Text Sensor
=====================
.. seo::
:description: Instructions for setting up wifi info text sensors.
:image: network-wifi.png
The ``wifi_info`` text sensor platform exposes different wifi information
via text sensors.
.. code-block:: yaml
# Example configuration entry
text_sensor:
- platform: wifi_info
ip_address:
name: ESP IP Address
ssid:
name: ESP Connected SSID
bssid:
name: ESP Connected BSSID
Configuration variables:
------------------------
- **ip_address** (*Optional*): Expose the IP Address of the ESP as a text sensor. All options from
:ref:`Text Sensor <config-text_sensor>`.
- **ssid** (*Optional*): Expose the SSID of the currently connected WiFi network as a text sensor. All options from
:ref:`Text Sensor <config-text_sensor>`.
- **bssid** (*Optional*): Expose the BSSID of the currently connected WiFi network as a text sensor. All options from
:ref:`Text Sensor <config-text_sensor>`.
See Also
--------
- :apiref:`text_sensor/wifi_info.h`
- :ghedit:`Edit`
.. disqus::

View File

@ -71,9 +71,9 @@ author = 'Otto Winter'
# built documents.
#
# The short X.Y version.
version = '1.11'
version = '1.12'
# The full version, including alpha/beta/rc tags.
release = '1.11.2'
release = '1.12.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -8,6 +8,8 @@ all Arduino-based code because the ``SPI`` library is also available in ESPHome.
See the other custom component guides for how to register components and make
them publish values.
Please refer to the SPI library docs for more information.
.. code-block:: cpp
#include "esphome.h"
@ -16,18 +18,13 @@ them publish values.
class MyCustomComponent : public Component {
public:
void setup() override {
SPI.pins(SCK_PIN, MISO_PIN, MOSI_PIN);
SPI.pins(SCK_PIN, MISO_PIN, MOSI_PIN, CS_PIN);
SPI.begin();
pinMode(CS_PIN, OUTPUT);
}
void loop() override {
digitalWrite(CS_PIN, LOW);
SPI.beginTransaction(...);
SPI.beginTransaction(...)
SPI.write(0x42);
digitalWrite(CS_PIN, HIGH);
}
};

View File

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

View File

@ -271,7 +271,7 @@ in Home Assistant, replace the last part with this:
number: GPIO13
inverted: True
# Note: do *not* make the relay a dimmable (PWM) signal, relays cannot handle that
- platform: binary
- platform: gpio
id: s20_relay
pin: GPIO12

View File

@ -200,6 +200,13 @@ of nodes inherit:
<<: !include common.yaml
.. tip::
To hide these base files from the dashboard, you can
- Place them in a subdirectory (dashboard only shows files in top-level dir)
- Prepend a dot to the filename, like ``.base.yaml``
See Also
--------

1
images/mcp23017.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="61.333" width="301.333"><path d="M19.333.8H282c10.31 0 18.667 8.357 18.667 18.667V40.8c0 10.31-8.358 18.667-18.667 18.667H19.333C9.024 59.467.667 51.109.667 40.8V19.467C.667 9.157 9.024.8 19.333.8z"/><path d="M19.333.8H282c10.31 0 18.667 8.357 18.667 18.667V40.8c0 10.31-8.358 18.667-18.667 18.667H19.333C9.024 59.467.667 51.109.667 40.8V19.467C.667 9.157 9.024.8 19.333.8z" fill="none" stroke="#000" stroke-width="1.3333" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"/><g aria-label="MCP23017" fill="#fff"><path d="M41.687 46.8l-.094-14.887L34.5 43.86h-4.853l-7.094-11.433V46.8H12.52V14.133h9.053l10.64 17.407 10.36-17.407h9.054L51.72 46.8zM77.933 47.547q-5.18 0-9.333-2.147-4.153-2.193-6.533-6.067-2.334-3.92-2.334-8.866 0-4.947 2.334-8.82 2.38-3.92 6.533-6.067 4.153-2.193 9.333-2.193 4.76 0 8.494 1.68 3.733 1.68 6.16 4.853l-6.954 6.207Q82.6 22.3 78.493 22.3q-3.453 0-5.553 2.24-2.1 2.193-2.1 5.927 0 3.733 2.1 5.973 2.1 2.193 5.553 2.193 4.107 0 7.14-3.826l6.954 6.206q-2.427 3.174-6.16 4.854-3.734 1.68-8.494 1.68zM115.487 14.133q4.526 0 7.886 1.494 3.36 1.493 5.18 4.293 1.82 2.8 1.82 6.533 0 3.734-1.82 6.534t-5.18 4.293q-3.36 1.493-7.886 1.493h-4.714V46.8H99.76V14.133zm-.7 16.147q2.24 0 3.36-.98 1.12-1.027 1.12-2.847t-1.12-2.8q-1.12-1.026-3.36-1.026h-4.014v7.653zM162.98 38.26v8.54H136.8v-6.767l11.807-10.92q1.54-1.446 2.053-2.473.513-1.027.513-2.007 0-1.213-.84-1.866-.793-.7-2.333-.7-1.493 0-2.8.793-1.307.793-2.007 2.24l-8.306-4.153q1.866-3.5 5.46-5.507 3.593-2.053 8.68-2.053 3.873 0 6.86 1.26 2.986 1.26 4.666 3.593 1.68 2.333 1.68 5.367 0 2.706-1.166 5.086-1.12 2.334-4.434 5.32l-4.666 4.247zM187.56 27.06q3.78.933 5.787 3.407 2.053 2.426 2.053 5.88 0 2.94-1.633 5.506-1.587 2.52-4.947 4.107-3.36 1.587-8.353 1.587-3.454 0-6.907-.747-3.407-.747-5.973-2.193l3.733-8.12q2.007 1.166 4.293 1.773 2.334.607 4.48.607 1.914 0 3.08-.654 1.167-.653 1.167-1.866 0-2.24-3.873-2.24h-4.34V27.34l4.806-4.9h-11.666v-8.307h24.36V20.9zM216.713 47.547q-4.34 0-7.7-2.007-3.313-2.053-5.226-5.88-1.867-3.873-1.867-9.193 0-5.32 1.867-9.147 1.913-3.873 5.226-5.88 3.36-2.053 7.7-2.053t7.654 2.053q3.36 2.007 5.226 5.88 1.914 3.827 1.914 9.147t-1.914 9.193q-1.866 3.827-5.226 5.88-3.314 2.007-7.654 2.007zm0-8.82q3.734 0 3.734-8.26t-3.734-8.26q-3.733 0-3.733 8.26t3.733 8.26zM253.24 14.133V46.8h-11.013V22.44h-5.6v-8.307zM288.833 14.133V20.9L277.96 46.8h-12.04l10.36-24.127h-6.3v4.76h-9.1v-13.3z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -247,6 +247,7 @@ Text Sensor Components
Home Assistant, components/text_sensor/homeassistant, home-assistant.svg
MQTT Subscribe Text, components/text_sensor/mqtt_subscribe, mqtt.png
Version, components/text_sensor/version, new-box.svg
WiFi Info, components/text_sensor/wifi_info, network-wifi.svg
Template Text Sensor, components/text_sensor/template, description.svg
Custom Text Sensor, components/text_sensor/custom, language-cpp.svg
@ -257,6 +258,7 @@ Misc Components
Debug Component, components/debug, bug-report.svg
PCF8574 I/O Expander, components/pcf8574, pcf8574.jpg
MCP23017 I/O Expander, components/mcp23017, mcp23017.svg
ESP32 BLE Tracker, components/esp32_ble_tracker, bluetooth.svg
ESP32 BLE Beacon, components/esp32_ble_beacon, bluetooth.svg
Status LED, components/status_led, led-on.svg