Am43 component docs (#1134)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
buxtronix 2021-08-11 14:07:18 +10:00 committed by GitHub
parent 069b0c05a2
commit 86f389379d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 150 additions and 0 deletions

76
components/cover/am43.rst Normal file
View File

@ -0,0 +1,76 @@
AM43 Cover
==========
.. seo::
:description: Setting up AM43/BLE covers in ESPHome.
:image: am43.png
The ``am43`` cover platform allows you to control an AM43 based
BLE cover motor. These devices are sold under various brands, such
as Zemismart and A-OK. The platform connects to the device over the
ESP32's BLE peripheral and both controls and fetches the position
and state of the motor.
.. note::
This component does NOT support Tuya-based versions of this device,
as the protocol is completely different. If your device is controlled
with the SmartLife app, then it will not work.
.. figure:: images/am43.jpg
:align: right
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
ble_client:
- mac: AA:BB:CC:DD:EE:FF
id: am43_kitchen
cover:
- platform: am43
name: "Kitchen blinds"
ble_client_id: am43_kitchen
Setup
-----
The AM43 should first be setup either with the OEM app or the buttons
following the instruction sheet, so that the speed, direction, limits,
etc are programmed in (this component does not yet support setting these).
Once setup, configure the yaml per the above example, using the MAC
address of your device.
See :ref:`Setting up devices <esp32_ble_tracker-setting_up_devices>` for
how to discover the MAC address.
To make use of the battery and light level sensors, see the
:doc:`/components/sensor/am43` component.
Configuration variables:
------------------------
- **name** (**Required**, string): The name of the cover.
- **ble_client_id** (**Required**, :ref:`config-id`): The id of the ``ble_client`` entry associated with the device.
- **pin** (*Optional*, int): The pin for the device, as
set in the app. The default is usually printed on the
device. Defaults to ``8888``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Cover <config-cover>`.
.. note::
The BLE stack on the ESP32 has a limit of three connected devices.
See Also
--------
- :doc:`index`
- :ref:`automation`
- :apiref:`am43/am43_cover.h`
- :ghedit:`Edit`

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,71 @@
AM43 Sensor
===========
.. seo::
:description: Sensors on AM43/BLE covers in ESPHome.
:image: am43.png
The ``am43`` sensor platform allows you to read the light and
battery sensors on an AM43 BLE cover motor. The platform connects
to the device over the ESP32's BLE peripheral.
.. note::
This component does NOT support Tuya-based versions of this device,
as the protocol is completely different. If your device is controlled
with the SmartLife app, then it will not work.
.. figure:: images/am43.jpg
:align: right
.. code-block:: yaml
# Example configuration entry
esp32_ble_tracker:
ble_client:
- mac: AA:BB:CC:DD:EE:FF
id: am43_device
sensor:
- platform: am43
ble_client_id: am43_device
battery_level:
name: "Kitchen blinds battery"
illuminance:
name: "Kitchen blinds light"
For more details on setting up this device, see the
:doc:`/components/cover/am43` component.
Configuration variables:
------------------------
- **ble_client_id** (**Required**, :ref:`config-id`): The id of the ``ble_client`` entry associated with the device.
- **battery_level** (*Optional*): The information for the battery level sensor.
- **name** (**Required**, string): The name for the battery level sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **illuminance** (*Optional*): The information for the light level sensor.
- **name** (**Required**, string): The name for the light level sensor.
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas.
- All other options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
.. note::
It is recommended to also setup the :doc:`/components/cover/am43`.
See Also
--------
- :doc:`index`
- :doc:`/components/cover/am43`
- :ref:`automation`
- :apiref:`sensor/am43/am43.h`
- :ghedit:`Edit`

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
images/am43.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -183,6 +183,7 @@ Light
*****
.. imgtable::
AM43, components/sensor/am43, am43.jpg, Lux
APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture
BH1750, components/sensor/bh1750, bh1750.jpg, Lux
TCS34725, components/sensor/tcs34725, tcs34725.jpg, Lux & RGB colour
@ -204,6 +205,7 @@ Bluetooth Low Energy (BLE)
**************************
.. imgtable::
AM43, components/sensor/am43, am43.jpg, Lux & Battery level
BLE RSSI, components/sensor/ble_rssi, bluetooth.svg
BLE Client Sensor, components/sensor/ble_client, bluetooth.svg
Inkbird IBS-TH1 Mini, components/sensor/inkbird_ibsth1_mini, inkbird_isbth1_mini.jpg, Temperature & Humidity
@ -479,6 +481,7 @@ Cover Components
Endstop Cover, components/cover/endstop, electric-switch.svg
Time-Based Cover, components/cover/time_based, timer.svg
Custom Cover, components/cover/custom, language-cpp.svg
AM43 Cover, components/cover/am43, am43.jpg
Text Sensor Components
----------------------