Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter committed May 12, 2019
1 parent b2fe722 commit 8714761
Show file tree
Hide file tree
Showing 145 changed files with 1,343 additions and 630 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -4,7 +4,6 @@
**Related issue (if applicable):** fixes <link to issue>

**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):** esphome/esphome#<esphome PR number goes here>
**Pull request in [esphome-core](https://github.com/esphome/esphome-core) with C++ framework changes (if applicable):** esphome/esphome-core#<esphome-core PR number goes here>

## Checklist:

Expand Down
47 changes: 3 additions & 44 deletions Doxygen
Expand Up @@ -791,7 +791,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = $(ESPHOME_CORE_PATH)/src
INPUT = $(ESPHOME_PATH)/esphome

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand All @@ -817,50 +817,9 @@ INPUT_ENCODING = UTF-8
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.

FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.tcc \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.idl \
*.ddl \
*.odl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.cs \
*.d \
*.php \
*.php4 \
*.php5 \
*.phtml \
*.inc \
*.m \
*.markdown \
*.md \
*.mm \
*.dox \
*.py \
*.pyw \
*.f90 \
*.f95 \
*.f03 \
*.f08 \
*.f \
*.for \
*.tcl \
*.vhd \
*.vhdl \
*.ucf \
*.qsf
*.h

# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
Expand Down Expand Up @@ -908,7 +867,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH = $(ESPHOME_CORE_PATH)/examples
EXAMPLE_PATH =

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
Expand Down
16 changes: 8 additions & 8 deletions Makefile
@@ -1,5 +1,5 @@
ESPHOME_CORE_PATH = ../esphome-core
ESPHOME_CORE_TAG = v1.12.2
ESPHOME_PATH = ../esphome
ESPHOME_REF = dev

.PHONY: html cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png

Expand All @@ -17,17 +17,17 @@ help:

api:
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_CORE_PATH)" ]; then \
git clone --branch $(ESPHOME_CORE_TAG) https://github.com/esphome/esphome-core.git $(ESPHOME_CORE_PATH); \
@if [ ! -d "$(ESPHOME_PATH)" ]; then \
git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \
fi
ESPHOME_CORE_PATH=$(ESPHOME_CORE_PATH) doxygen Doxygen
ESPHOME_PATH=$(ESPHOME_PATH) doxygen Doxygen

netlify-api: netlify-dependencies
mkdir -p _build/html/api
@if [ ! -d "$(ESPHOME_CORE_PATH)" ]; then \
git clone --branch $(ESPHOME_CORE_TAG) https://github.com/esphome/esphome-core.git $(ESPHOME_CORE_PATH); \
@if [ ! -d "$(ESPHOME_PATH)" ]; then \
git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \
fi
ESPHOME_CORE_PATH=$(ESPHOME_CORE_PATH) ../doxybin/doxygen Doxygen
ESPHOME_PATH=$(ESPHOME_PATH) ../doxybin/doxygen Doxygen

netlify-dependencies:
mkdir -p ../doxybin
Expand Down
20 changes: 18 additions & 2 deletions components/api.rst
Expand Up @@ -16,7 +16,7 @@ the device manually by clicking "CONFIGURE" on the ESPHome integration and enter
"<NODE_NAME>.local" as the address.

The ESPHome native API is based on a custom TCP protocol using protocol buffers. You can find
the protocol data structure definitions here: https://github.com/esphome/esphome-core/blob/dev/src/esphome/api/api.proto.
the protocol data structure definitions here: https://github.com/esphome/esphome/blob/dev/src/esphome/components/api/api.proto
A python library that implements this protocol can be found `here <https://github.com/esphome/aioesphomeapi>`__.

.. code-block:: yaml
Expand Down Expand Up @@ -157,7 +157,6 @@ Configuration options:
- **variables** (*Optional*, mapping): Optional variables that can be used in the ``data_template``.
Values are :ref:`lambdas <config-lambda>` and will be evaluated before sending the request.


.. _api-services:

User-defined Services
Expand Down Expand Up @@ -221,6 +220,23 @@ There are currently 4 types of variables:
- float: A floating point number. C++ type: ``float``
- string: A string. C++ type: ``std::string``

.. _api.connected_condition:

``api.connected`` Condition
---------------------------

This :ref:`Condition <config-condition>` checks if at least one client is connected to the ESPHome
native API.

.. code-block:: yaml
on_...:
if:
condition:
api.connected:
then:
- logger.log: API is connected!
Advantages over MQTT
--------------------
Expand Down
Expand Up @@ -5,7 +5,7 @@ ESP32 Bluetooth Low Energy Device
:description: Instructions for setting up BLE binary sensors for the ESP32.
:image: bluetooth.png

The ``esp32_ble_tracker`` binary sensor platform lets you track the presence of a
The ``ble_presence`` binary sensor platform lets you track the presence of a
bluetooth low energy device.

.. figure:: images/esp32_ble-ui.png
Expand All @@ -19,7 +19,7 @@ bluetooth low energy device.
scan_interval: 300s
binary_sensor:
- platform: esp32_ble_tracker
- platform: ble_presence
mac_address: AC:37:43:77:5F:4C
name: "ESP32 BLE Tracker Google Home Mini"
Expand Down Expand Up @@ -62,6 +62,6 @@ See Also

- :doc:`/components/esp32_ble_tracker`
- :doc:`/components/binary_sensor/index`
- :apiref:`esp32_ble_tracker.h`
- :apiref:`ble_presence/ble_presence.h`
- `ESP32 BLE for Arduino <https://github.com/nkolban/ESP32_BLE_Arduino>`__ by `Neil Kolban <https://github.com/nkolban>`__.
- :ghedit:`Edit`
5 changes: 2 additions & 3 deletions components/binary_sensor/custom.rst
Expand Up @@ -14,9 +14,8 @@ same as the gpio binary sensor.
.. code-block:: cpp
#include "esphome.h"
using namespace esphome;
class MyCustomBinarySensor : public PollingComponent, public binary_sensor::BinarySensor {
class MyCustomBinarySensor : public PollingComponent, public BinarySensor {
public:
// constructor
MyCustomBinarySensor() : PollingComponent(15000) {}
Expand Down Expand Up @@ -64,7 +63,7 @@ Configuration variables:

- All options from :ref:`Binary Sensor <config-binary_sensor>`.

See :cpp:class:`binary_sensor::BinarySensor`
See :apiclass:`BinarySensor <binary_sensor::BinarySensor>`

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion components/binary_sensor/esp32_touch.rst
Expand Up @@ -155,6 +155,6 @@ See Also
--------

- :doc:`/components/binary_sensor/index`
- :apiref:`binary_sensor/esp32_touch_binary_sensor.h`
- :apiref:`esp32_touch/esp32_touch.h`
- `esp-idf Touch Sensor API <https://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/touch_pad.html>`__
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/gpio.rst
Expand Up @@ -98,5 +98,5 @@ See Also

- :doc:`/components/binary_sensor/index`
- :ref:`config-pin_schema`
- :apiref:`binary_sensor/gpio_binary_sensor.h`
- :apiref:`gpio/binary_sensor/gpio_binary_sensor.h`
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/homeassistant.rst
Expand Up @@ -28,5 +28,5 @@ See Also
--------

- :ref:`automation`
- :apiref:`binary_sensor/homeassistant_binary_sensor.h`
- :apiref:`homeassistant/binary_sensor/homeassistant_binary_sensor.h`
- :ghedit:`Edit`
5 changes: 0 additions & 5 deletions components/binary_sensor/index.rst
Expand Up @@ -300,11 +300,6 @@ This :ref:`Condition <config-condition>` checks if the given binary sensor is ON
# Same syntax for is_off
binary_sensor.is_on: my_binary_sensor
# With duration, true if has been on for at least 5s
binary_sensor.is_on:
id: my_binary_sensor
for: 5s
.. _binary_sensor-lambda_calls:

lambda calls
Expand Down
2 changes: 1 addition & 1 deletion components/binary_sensor/mpr121.rst
Expand Up @@ -53,6 +53,6 @@ See Also
--------

- :ref:`sensor-filters`
- :apiref:`sensor/mpr121_sensor.h`
- :apiref:`mpr121/mpr121.h`
- `Adafruit MPR121 Library <https://github.com/adafruit/Adafruit_MPR121_Library>`__ by `Adafruit <https://www.adafruit.com/>`__
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/nextion.rst
Expand Up @@ -38,5 +38,5 @@ See Also

- :doc:`/components/display/nextion`
- :doc:`index`
- :apiref:`display/nextion.h`
- :apiref:`nextion/nextion.h`
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/pn532.rst
Expand Up @@ -142,5 +142,5 @@ See Also

- :doc:`index`
- :doc:`rdm6300`
- :apiref:`binary_sensor/pn532_component.h`
- :apiref:`pn532/pn532.h`
- :ghedit:`Edit`
24 changes: 23 additions & 1 deletion components/binary_sensor/rdm6300.rst
Expand Up @@ -46,8 +46,30 @@ Configuration variables:

- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
- **on_tag** (*Optional*, :ref:`Automation <automation>`): An automation to perform
when a tag is read. See :ref:`rdm6300-on_tag`.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID for this component.

.. _rdm6300-on_tag:

``on_tag``
----------

This automation will be triggered when the RDM6300 module responds with a tag.

The parameter ``x`` this trigger provides is of type ``uint32_t`` and is the tag UID as a 32-bit
unsigned integer.

.. code-block:: yaml
rdm6300:
# ...
on_tag:
then:
- mqtt.publish:
topic: rdm6300/tag
payload: !lambda 'return x;'
.. _rdm6300-tag:

NFC/RFID Tag
Expand Down Expand Up @@ -104,5 +126,5 @@ See Also

- :doc:`pn532`
- :doc:`/components/binary_sensor/index`
- :apiref:`binary_sensor/rdm6300_component.h`
- :apiref:`rdm6300/rdm6300.h`
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/status.rst
Expand Up @@ -31,5 +31,5 @@ See Also

- :doc:`/components/binary_sensor/index`
- :doc:`/components/mqtt`
- :apiref:`binary_sensor/status_binary_sensor.h`
- :apiref:`status/status_binary_sensor.h`
- :ghedit:`Edit`
2 changes: 1 addition & 1 deletion components/binary_sensor/template.rst
Expand Up @@ -90,5 +90,5 @@ See Also
- :doc:`/components/binary_sensor/index`
- :doc:`/components/sensor/template`
- :ref:`automation`
- :apiref:`binary_sensor/template_binary_sensor.h`
- :apiref:`template/binary_sensor/template_binary_sensor.h`
- :ghedit:`Edit`
5 changes: 2 additions & 3 deletions components/binary_sensor/ttp229.rst
Expand Up @@ -6,7 +6,7 @@ TTP229 Capacitive Touch Sensor
:image: ttp229.jpg
:keywords: TTP229

The ``ttp229`` sensor platform allows you to use your TTP229 `datasheet <https://www.tontek.com.tw/uploads/product/106/TTP229-LSF_V1.0_EN.pdf>`__
The ``ttp229_lsf`` sensor platform allows you to use your TTP229 `datasheet <https://www.tontek.com.tw/uploads/product/106/TTP229-LSF_V1.0_EN.pdf>`__
Capacitive Touch Sensor with ESPHome. The :ref:`I²C <i2c>` is required to be set up in your configuration for this sensor to work.

.. figure:: images/ttp229-full.jpg
Expand All @@ -21,7 +21,6 @@ Capacitive Touch Sensor with ESPHome. The :ref:`I²C <i2c>` is required to be se
# Example configuration entry
ttp229_lsf:
id: ttp229_device
binary_sensor:
- platform: ttp229_lsf
Expand All @@ -48,5 +47,5 @@ See Also
--------

- :ref:`sensor-filters`
- :apiref:`sensor/ttp229_sensor.h`
- :apiref:`ttp229_lsf/ttp229_lsf.h`
- :ghedit:`Edit`

0 comments on commit 8714761

Please sign in to comment.