diff --git a/Doxygen b/Doxygen index 6a2a45631..9f37feb92 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 = 2021.8.2 +PROJECT_NUMBER = 2021.9.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 f79a84e1c..0f55f542b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2021.8.2 +ESPHOME_REF = 2021.9.0b1 .PHONY: html html-strict cleanhtml deploy help webserver Makefile netlify netlify-api api netlify-dependencies svg2png copy-svg2png diff --git a/_static/changelog-2021.9.0.png b/_static/changelog-2021.9.0.png new file mode 100644 index 000000000..9395405de Binary files /dev/null and b/_static/changelog-2021.9.0.png differ diff --git a/_static/version b/_static/version index 055002ff2..620d9cc1a 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2021.8.2 \ No newline at end of file +2021.9.0b1 \ No newline at end of file diff --git a/changelog/2021.9.0.rst b/changelog/2021.9.0.rst new file mode 100644 index 000000000..1aff2947c --- /dev/null +++ b/changelog/2021.9.0.rst @@ -0,0 +1,155 @@ +ESPHome 2021.9.0 - 15th September 2021 +====================================== + +.. seo:: + :description: Changelog for ESPHome 2021.9.0. + :image: /_static/changelog-2021.9.0.png + :author: ESPHome + :author_twitter: @esphome_ + +.. imgtable:: + :columns: 2 + + AirThings BLE, components/sensor/airthings_ble, airthings_logo.png + ST7920, components/display/st7920, st7920.jpg + + + +API Encryption +-------------- + +:ghuser:`OttoWinter` has been hard at work adding a layer of encryption to the API which utilises the +``noise`` protocol. This releases adds the capabilities to ESPHome devices, but Home Assistant (or other clients) +will need to upgrade their client libraries (e.g. ``aioesphomeapi``) before they can connect and communicate to +devices with encryption. This is scheduled to be available in Home Assistant 2021.10. + +Midea AC +-------- + +``platform: midea_ac`` has been changed to ``platform: midea`` in this release and has +quite a few upgrades. Check the docs for the new features. :doc:`/components/climate/midea` + +SDM Meters +---------- + +:doc:`SDM Meters` have been fixed to use kWh instead of Wh +as the energy unit of measurement. + +Template Select/Number/Switch +----------------------------- + +The template selects, numbers and switches now have more validations on them preventing weird usage. +If you do not set a ``lambda`` then you are required to make them either ``optimistic: true``, or +utilise the ``set_action`` (select/number) / ``turn_on_trigger`` (switch). + + +Full list of changes +-------------------- + +New Features +^^^^^^^^^^^^ + +- Allow using a git source for a package :esphomepr:`2193` by :ghuser:`jesserockz` (new-feature) + +New Components +^^^^^^^^^^^^^^ + +- Add st7920 display, :esphomepr:`1440` by :ghuser:`marsjan155` (new-integration) +- Support for the AirThings Wave Plus :esphomepr:`1656` by :ghuser:`jeromelaban` (new-integration) + +Breaking Changes +^^^^^^^^^^^^^^^^ + +- Fix SDM energy units to be KILO... :esphomepr:`2206` by :ghuser:`jesserockz` (breaking-change) +- Reject template select/number/switches that don't handle user input :esphomepr:`2230` by :ghuser:`oxan` (breaking-change) +- Remove last_reset_type and convert all those sensors to TOTAL_INCREASING :esphomepr:`2233` by :ghuser:`jesserockz` (breaking-change) +- Midea support v2 :esphomepr:`2188` by :ghuser:`dudanov` (breaking-change) + +All changes +^^^^^^^^^^^ + +- Minor code cleanup in light components :esphomepr:`2162` by :ghuser:`mmakaay` +- Add device class update to binary sensor :esphomepr:`2170` by :ghuser:`frenck` +- Total daily energy methods :esphomepr:`2163` by :ghuser:`nuttytree` +- Set SDM voltage state class to measurement :esphomepr:`2181` by :ghuser:`jesserockz` +- Add macros header with more usable Arduino version defines :esphomepr:`2145` by :ghuser:`oxan` +- Clean-up constant definitions :esphomepr:`2148` by :ghuser:`oxan` +- Remove double scheduling from addressable lights :esphomepr:`1963` by :ghuser:`oxan` +- Reduce static RAM usage :esphomepr:`2140` by :ghuser:`oxan` +- Fix template select log message mentioning number :esphomepr:`2194` by :ghuser:`jesserockz` +- Add deprecated attribute to some deprecated types/methods :esphomepr:`2185` by :ghuser:`oxan` +- Store source package in Component for debugging :esphomepr:`2070` by :ghuser:`OttoWinter` +- ST7789V: Make backlight_pin optional :esphomepr:`2180` by :ghuser:`speijnik` +- Fix SDM energy units to be KILO... :esphomepr:`2206` by :ghuser:`jesserockz` (breaking-change) +- Optionally set direction on fan.turn_on action :esphomepr:`2171` by :ghuser:`WeekendWarrior1` +- Add st7920 display, :esphomepr:`1440` by :ghuser:`marsjan155` (new-integration) +- Fix css/js file loading for webserver when esphome not executed form config directory :esphomepr:`2207` by :ghuser:`jesserockz` +- cs_pin made optional for ili9341 :esphomepr:`2219` by :ghuser:`a13ssandr0` +- Fix Packages when using MQTT :esphomepr:`2210` by :ghuser:`paulmonigatti` +- Update known boards :esphomepr:`2190` by :ghuser:`oxan` +- Bump dashboard to 20210826.0 :esphomepr:`2211` by :ghuser:`jesserockz` +- Remove footer validation for fujitsu_general :esphomepr:`2196` by :ghuser:`marciogranzotto` +- Glmnet schema 202105 :esphomepr:`2220` by :ghuser:`glmnet` +- Add H-Bridge fan component :esphomepr:`2212` by :ghuser:`WeekendWarrior1` +- Bump black from 21.7b0 to 21.8b0 :esphomepr:`2222` by :ghuser:`dependabot[bot]` +- Bump pytest from 6.2.4 to 6.2.5 :esphomepr:`2223` by :ghuser:`dependabot[bot]` +- Support for the AirThings Wave Plus :esphomepr:`1656` by :ghuser:`jeromelaban` (new-integration) +- Fix some lint errors in pylint 2.10.2 :esphomepr:`2226` by :ghuser:`jesserockz` +- Add transitions to light flash :esphomepr:`2201` by :ghuser:`alexyao2015` +- iBeacon support for ble_presence :esphomepr:`1627` by :ghuser:`ignisf` +- Cleanup flash transitions :esphomepr:`2227` by :ghuser:`alexyao2015` +- Add is_on and is_off conditions for the fan component :esphomepr:`2225` by :ghuser:`nuttytree` +- Bump pylint from 2.9.6 to 2.10.2 :esphomepr:`2197` by :ghuser:`dependabot[bot]` +- mqtt_sensor: properly send state_class via MQTT :esphomepr:`2228` by :ghuser:`ayufan` +- Change uptime's state_class to total_increasing (esphome/issues#2337) :esphomepr:`2205` by :ghuser:`DAVe3283` +- Expose WHITE/CWWW/RGBCT color modes over MQTT :esphomepr:`2231` by :ghuser:`oxan` +- Reject template select/number/switches that don't handle user input :esphomepr:`2230` by :ghuser:`oxan` (breaking-change) +- Fix UARTComponent hardware vs software UART0 conflict :esphomepr:`2229` by :ghuser:`ferbar` +- Move to use zeroconf library instead of inline copy :esphomepr:`2192` by :ghuser:`jesserockz` +- Allow using a git source for a package :esphomepr:`2193` by :ghuser:`jesserockz` (new-feature) +- Remove last_reset_type and convert all those sensors to TOTAL_INCREASING :esphomepr:`2233` by :ghuser:`jesserockz` (breaking-change) +- Dont dump legacy fields :esphomepr:`2241` by :ghuser:`jesserockz` +- Fix encoding bug :esphomepr:`2242` by :ghuser:`jesserockz` +- Light: include ON_OFF capability to BRIGHTNESS ColorMode :esphomepr:`2204` by :ghuser:`jesserockz` +- LOG_UPDATE_INTERVAL: correctly report "never" :esphomepr:`2240` by :ghuser:`Habbie` +- Fix runtime exception due to dict typing :esphomepr:`2243` by :ghuser:`alexyao2015` +- template: select: fix initial_value cannot be used with lambda :esphomepr:`2244` by :ghuser:`ayufan` +- Add device classes new in HA 2021.9 :esphomepr:`2248` by :ghuser:`oxan` +- Logger prevent recursive logging :esphomepr:`2251` by :ghuser:`OttoWinter` +- Add new trigger to fan component `on_speed_set` :esphomepr:`2246` by :ghuser:`dgtal1` +- Fix fan speed restore issue on boot :esphomepr:`1867` by :ghuser:`wifwucite` +- Template sensors always publish on update interval :esphomepr:`2224` by :ghuser:`nuttytree` +- Socket component :esphomepr:`2250` by :ghuser:`OttoWinter` +- Allow .yml files in dashboard :esphomepr:`2257` by :ghuser:`jesserockz` +- Bump dashboard to 20210908.0 and fix card names for yml :esphomepr:`2258` by :ghuser:`jesserockz` +- Fix socket not setting callbacks early enough :esphomepr:`2260` by :ghuser:`OttoWinter` +- Convert API to use sockets :esphomepr:`2253` by :ghuser:`OttoWinter` +- Midea support v2 :esphomepr:`2188` by :ghuser:`dudanov` (breaking-change) +- ccs811: publish firmware version; log bootloader and HW version; fix a bug :esphomepr:`2006` by :ghuser:`Habbie` +- API encryption :esphomepr:`2254` by :ghuser:`OttoWinter` +- Revert "Dont dump legacy fields" :esphomepr:`2259` by :ghuser:`jesserockz` +- pm1006: add support for sending a measurement request :esphomepr:`2214` by :ghuser:`Habbie` +- SGP40 sensor start-up fix :esphomepr:`2178` by :ghuser:`kbx81` +- PMSA003i Update state_class and async :esphomepr:`2216` by :ghuser:`sjtrny` + +Past Changelogs +--------------- + +.. toctree:: + :maxdepth: 1 + + 2021.8.0 + v1.20.0 + v1.19.0 + v1.18.0 + v1.17.0 + v1.16.0 + v1.15.0 + v1.14.0 + v1.13.0 + v1.12.0 + v1.11.0 + v1.10.0 + v1.9.0 + v1.8.0 + v1.7.0 diff --git a/changelog/index.rst b/changelog/index.rst index e457e2f15..eecc2c524 100644 --- a/changelog/index.rst +++ b/changelog/index.rst @@ -2,7 +2,7 @@ Changelog ========= .. redirect:: - :url: /changelog/2021.8.0.html + :url: /changelog/2021.9.0.html .. toctree:: :glob: diff --git a/components/api.rst b/components/api.rst index 5a77612bf..50bec505f 100644 --- a/components/api.rst +++ b/components/api.rst @@ -30,6 +30,38 @@ Configuration variables: - **port** (*Optional*, integer): The port to run the API Server on. Defaults to ``6053``. - **password** (*Optional*, string): The password to protect the API Server with. Defaults to no password. +- **encryption** (*Optional*): Enable transport encryption of the API layer. + + - **key** (**Required**, string): The pre-shared key for the encryption. This is a 32-byte base64 encoded string. + Below you can copy a key randomly generated in your browser: + + .. raw:: html + + + + - **services** (*Optional*, list): A list of user-defined services. See :ref:`api-services`. - **reboot_timeout** (*Optional*, :ref:`time `): The amount of time to wait before rebooting when no client connects to the API. This is needed because sometimes the low level ESP functions report that diff --git a/components/binary_sensor/ble_presence.rst b/components/binary_sensor/ble_presence.rst index d19e05b33..93fe5393f 100644 --- a/components/binary_sensor/ble_presence.rst +++ b/components/binary_sensor/ble_presence.rst @@ -26,6 +26,10 @@ Bluetooth Low Energy device. - platform: ble_presence service_uuid: '11aa' name: "ESP32 BLE Tracker Test Service 16 bit" + # Presence based on iBeacon UUID + - platform: ble_presence + ibeacon_uuid: '68586f1e-89c2-11eb-8dcd-0242ac130003' + name: "ESP32 BLE Tracker Test Service iBeacon" .. note:: @@ -39,10 +43,19 @@ Configuration variables: - **name** (**Required**, string): The name of the binary sensor. - **mac_address** (*Optional*, MAC Address): The MAC address to track for this - binary sensor. Either this or ``service_uuid`` has to be present. + binary sensor. Note that exactly one of ``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` + must be present. - **service_uuid** (*Optional*, string): 16 bit, 32 bit, or 128 bit BLE Service UUID - which can be tracked if the device randomizes the MAC address. Either - this or ``mac_address`` has to be present. + which can be tracked if the device randomizes the MAC address. Note that exactly one of + ``mac_address``, ``service_uuid`` or ``ibeacon_uuid`` must be present. +- **ibeacon_uuid** (*Optional*, string): The `universally unique identifier `__ + to identify the beacon that needs to be tracked. Note that exactly one of ``mac_address``, + ``service_uuid`` or ``ibeacon_uuid`` must be present. +- **ibeacon_major** (*Optional*, integer): The iBeacon major identifier of the beacon that needs + to be tracked. Usually used to group beacons, for example for grouping all beacons in the + same building. +- **ibeacon_minor** (*Optional*, integer): The iBeacon minor identifier of the beacon that needs + to be tracked. Usually used to identify beacons within an iBeacon group. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - All other options from :ref:`Binary Sensor `. @@ -68,17 +81,41 @@ boot-up. Then, when a BLE device is discovered, you should see messages like address type and advertised name. If you don't see these messages, your device is unfortunately currently not supported. +.. code-block:: yaml + + # Example configuration entry for finding + # Service UUIDs and iBeacon UUIDs and identifiers + esp32_ble_tracker: + + logger: + level: VERY_VERBOSE + +You can increase the :ref:`log level ` to ``VERY_VERBOSE`` to review detailed +data for each discovered BLE device. This will make ESPHome print Service UUIDs, iBeacon UUIDs, +iBeacon major and minor identifiers, BLE manufacturer data, RSSI and other data useful for +debugging purposes. Note that this is useful only during set-up and a less verbose log level +should be specified afterwards. + Please note that devices that show a ``RANDOM`` address type in the logs cannot be used for -MAC address based tracking, since their MAC-address periodically changes. Instead you can create -a BLE beacon, set a unique 16 bit, 32 bit or 128 bit Service UUID and track your device based on that. -Make sure you don't pick a `GATT Service UUID `__, -otherwise generic services might give you incorrect tracking results. +MAC address based tracking, since their MAC-address periodically changes. Instead you can: + +- Create a BLE beacon, set a unique 16 bit, 32 bit or 128 bit Service UUID and track your device + based on that. Make sure you don't pick a `GATT Service UUID + `__, otherwise generic services + might give you incorrect tracking results. + +- Create an iBeacon and track it based on its iBeacon UUID. You can also optionally specify + major and minor numbers to match if additional filtering is required. ESPHome offers this + functionality via the :doc:`ESP32 Bluetooth Low Energy Beacon ` + component. Several iOS and Android applications, including the open source Home Assistant + mobile application also provide means to create iBeacons. See Also -------- - :doc:`/components/esp32_ble_tracker` +- :doc:`/components/esp32_ble_beacon` - :doc:`/components/binary_sensor/index` - :apiref:`ble_presence/ble_presence.h` - `ESP32 BLE for Arduino `__ by `Neil Kolban `__. diff --git a/components/climate/midea.rst b/components/climate/midea.rst new file mode 100644 index 000000000..33093243e --- /dev/null +++ b/components/climate/midea.rst @@ -0,0 +1,299 @@ +Midea Air Conditioner +===================== + +.. seo:: + :description: Instructions for setting up a Midea climate device + :image: air-conditioner.png + +The ``midea`` component creates a Midea air conditioner climate device. + +.. note:: + + This protocol also used by some vendors: + + - `Electrolux `_ + - `Qlima `_ + - `Artel `_ + - `Carrier `_ + - `Comfee `_ + - `Inventor `_ + - and maybe others + + Control is possible with a custom dongle. Example of hardware implementation is `IoT Uni Dongle `_. + +.. code-block:: yaml + + # Example configuration entry + + # Disable logging over UART (required) + logger: + baud_rate: 0 + + # UART settings for Midea dongle (required) + uart: + tx_pin: 1 # hardware dependant + rx_pin: 3 # hardware dependant + baud_rate: 9600 + + # Main settings + climate: + - platform: midea + name: Midea Climate # Use a unique name. + transmitter_id: # Optional. Add this option to use IR transmitter. + period: 1s # Optional + timeout: 2s # Optional + num_attempts: 3 # Optional + autoconf: true # Autoconfigure most options. + beeper: true # Beep on commands. + visual: # Optional. Example of visual settings override. + min_temperature: 17 °C # min: 17 + max_temperature: 30 °C # max: 30 + temperature_step: 0.5 °C # min: 0.5 + supported_modes: # All capabilities in this section detected by autoconf. + - FAN_ONLY # This capability is always used. + - HEAT_COOL + - COOL + - HEAT + - DRY + custom_fan_modes: + - SILENT + - TURBO + supported_presets: # All capabilities in this section detected by autoconf. + - ECO + - BOOST + - SLEEP # This capability is always used. + custom_presets: # All capabilities in this section detected by autoconf. + - FREEZE_PROTECTION + supported_swing_modes: + - VERTICAL # This capability is always used. + - HORIZONTAL + - BOTH + outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity). + name: Temp + power_usage: # Optional. Power usage sensor (only for devices that support this feature). + name: Power + humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature). + name: Humidity + +Configuration variables: +------------------------ + +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :doc:`../uart` if you want + to use multiple UART buses. +- **name** (**Required**, string): The name of the climate device. +- **transmitter_id** (*Optional*, :ref:`config-id`): Set if you use :doc:`../remote_transmitter` component for IR commands transmit. +- **period** (*Optional*, :ref:`time `): Minimal period between requests to the appliance. Defaults to ``1s``. +- **timeout** (*Optional*, :ref:`time `): Request response timeout until next request attempt. Defaults to ``2s``. +- **num_attempts** (*Optional*, integer 1-5): Number of request attempts. Defaults to ``3``. +- **autoconf** (*Optional*, boolean): Get capabilities automatically. Allows you not to manually define most of the capabilities of the appliance. + Defaults to ``True``. +- **beeper** (*Optional*, boolean): Beeper feedback on command. Defaults to ``False``. +- **supported_modes** (*Optional*, list): List of supported modes. Possible values are: ``HEAT_COOL``, ``COOL``, ``HEAT``, ``DRY``, ``FAN_ONLY``. +- **custom_fan_modes** (*Optional*, list): List of supported custom fan modes. Possible values are: ``SILENT``, ``TURBO``. +- **supported_presets** (*Optional*, list): List of supported presets. Possible values are: ``ECO``, ``BOOST``, ``SLEEP``. +- **custom_presets** (*Optional*, list): List of supported custom presets. Possible values are: ``FREEZE_PROTECTION``. +- **supported_swing_modes** (*Optional*, list): List of supported swing modes. Possible values are: ``VERTICAL``, ``HORIZONTAL``, ``BOTH``. +- **outdoor_temperature** (*Optional*): The information for the outdoor temperature + sensor. + + - **name** (**Required**, string): The name of the sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. +- **power_usage** (*Optional*): The information for the current power consumption + sensor. + + - **name** (**Required**, string): The name of the sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. +- **humidity_setpoint** (*Optional*): The information for the humidity indoor + sensor (experimental). + + - **name** (**Required**, string): The name of the sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. +- All other options from :ref:`Climate `. + +Automations +----------- + +.. _midea_ac-power_on_action: + +``midea_ac.power_on`` Action +****************************** + +This action turn on power. The mode and preset will be restored to the last state before turned off. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.power_on: + +.. _midea_ac-power_off_action: + +``midea_ac.power_off`` Action +****************************** + +This action turn off power. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.power_off: + + +.. _midea_ac-follow_me_action: + +``midea_ac.follow_me`` Action +***************************** + +This action transmit IR FollowMe command telling the air conditioner a more accurate +room temperature value to be used instead of the internal indoor unit sensor. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.follow_me: + temperature: !lambda "return x;" + beeper: false + +Configuration variables: + +- **temperature** (**Required**, float, :ref:`templatable `): Set the + value of a internal temperature sensor. +- **beeper** (*Optional*, bool, :ref:`templatable `): set beep on update. + Defaults to ``False`` + + +.. _midea_ac-display_toggle_action: + +``midea_ac.display_toggle`` Action +********************************** + +This action toggle ac screen. Works via UART if supported or :doc:`../remote_transmitter`. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.display_toggle: + + +.. _midea_ac-swing_step_action: + +``midea_ac.swing_step`` Action +****************************** + +This action adjust the louver by one step. :doc:`../remote_transmitter` required. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.swing_step: + + +.. _midea_ac-beeper_on_action: + +``midea_ac.beeper_on`` Action +****************************** + +This action turn on beeper feedback. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.beeper_on: + +.. _midea_ac-beeper_off_action: + +``midea_ac.beeper_off`` Action +****************************** + +This action turn off beeper feedback. + +.. code-block:: yaml + + on_...: + then: + - midea_ac.beeper_off: + + +Additional control options using IR commands +-------------------------------------------- + +It is possible to use the FollowMe function and some other features available only through IR commands. +Below is an example of how to send FollowMe commands with the values of your sensor using the :doc:`../remote_transmitter` +component, as well as control the light of the LED display. + +.. code-block:: yaml + + # Example configuration entry + + remote_transmitter: + pin: GPIO13 # For iot-uni-stick. + carrier_duty_percent: 100% # 50% for IR LED, 100% for direct connect to TSOP IR receiver output. + + sensor: + - platform: homeassistant + entity_id: sensor.room_sensor # Sensor from HASS + internal: true + filters: + - throttle: 10s + - heartbeat: 2min # Maximum interval between updates. + - debounce: 1s + on_value: + midea_ac.follow_me: + temperature: !lambda "return x;" + beeper: false # Optional. Beep on update. + + # template momentary switches for sending display control command and swing step actions + switch: + - platform: template + name: Display Toggle + icon: mdi:theme-light-dark + turn_on_action: + midea_ac.display_toggle: + - platform: template + name: Swing Step + icon: mdi:tailwind + turn_on_action: + midea_ac.swing_step: + + +Example of Beeper Control Using a Switch +---------------------------------------- + +.. code-block:: yaml + + switch: + - platform: template + name: Beeper + icon: mdi:volume-source + optimistic: true + turn_on_action: + midea_ac.beeper_on: + turn_off_action: + midea_ac.beeper_off: + +Acknowledgments: +---------------- + +Thanks to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories: + +* `Mac Zhou `_ +* `NeoAcheron `_ +* `Rene Klootwijk `_ + +Special thanks to the project `IRremoteESP8266 `_ for describing the IR protocol. + +See Also +-------- + +- :doc:`/components/climate/index` +- :apiref:`climate/midea_ac.h` +- :ghedit:`Edit` diff --git a/components/climate/midea_ac.rst b/components/climate/midea_ac.rst deleted file mode 100644 index f6a55daea..000000000 --- a/components/climate/midea_ac.rst +++ /dev/null @@ -1,128 +0,0 @@ -Midea Air Conditioner -===================== - -.. seo:: - :description: Instructions for setting up a Midea climate device - :image: air-conditioner.png - -The ``midea_ac`` component creates a Midea air conditioner climate device. - -This component requires a auto-loaded ``midea-dongle`` component, that use hardware UART. - -.. note:: - - This protocol also used by some vendors: - - - `Electrolux `_ - - `Qlima `_ - - `Artel `_ - - `Carrier `_ - - `Comfee `_ - - `Inventor `_ - - and maybe others - - Example of hardware implementation is `Midea Open Dongle `_ in free `KiCad `_ format. - -.. code-block:: yaml - - # Example configuration entry - - # Disable logging over UART (required) - logger: - baud_rate: 0 - - # UART settings for Midea dongle (required) - uart: - tx_pin: 1 - rx_pin: 3 - baud_rate: 9600 - - # Optional (if you want modify settings) - midea_dongle: - strength_icon: true - - # Main settings - climate: - - platform: midea_ac - name: "My Midea AC" - visual: - min_temperature: 18 °C - max_temperature: 25 °C - temperature_step: 0.1 °C - beeper: true - custom_fan_modes: - - SILENT - - TURBO - preset_eco: true - preset_sleep: true - preset_boost: true - custom_presets: - - FREEZE_PROTECTION - swing_horizontal: true - swing_both: true - outdoor_temperature: - name: "Temp" - power_usage: - name: "Power" - humidity_setpoint: - name: "Hum" - -Configuration variables: ------------------------- - -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. -- **midea_dongle_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the ``midea_dongle`` if you want to use multiple devices. -- **name** (**Required**, string): The name of the climate device. -- **outdoor_temperature** (*Optional*): The information for the outdoor temperature - sensor. - - - **name** (**Required**, string): The name of the sensor. - - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - - All other options from :ref:`Sensor `. -- **power_usage** (*Optional*): The information for the current power consumption - sensor. - - - **name** (**Required**, string): The name of the sensor. - - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - - All other options from :ref:`Sensor `. -- **humidity_setpoint** (*Optional*): The information for the humidity indoor - sensor (experimental). - - - **name** (**Required**, string): The name of the sensor. - - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - - All other options from :ref:`Sensor `. -- **beeper** (*Optional*, boolean): Beeper feedback on command. Defaults to ``false``. -- **custom_fan_modes** (*Optional*, list): List of supported custom fan modes. Possible values are: SILENT, TURBO. -- **preset_eco** (*Optional*, boolean): ECO preset support. Defaults to ``false``. -- **preset_sleep** (*Optional*, boolean): SLEEP preset support. Defaults to ``false``. -- **preset_boost** (*Optional*, boolean): BOOST preset support. Defaults to ``false``. -- **custom_presets** (*Optional*, list): List of supported custom presets. Possible values are: FREEZE_PROTECTION. -- **swing_horizontal** (*Optional*, boolean): Enable **swing horizontal** option. Defaults to ``false``. -- **swing_both** (*Optional*, boolean): Enable **swing both** option. Defaults to ``false``. -- All other options from :ref:`Climate `. - -Configuration variables of midea-dongle component: -************************************************** - -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. -- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :doc:`../uart` if you want - to use multiple UART buses. -- **strength_icon** (*Optional*, boolean): Set if your device have signal strength icon - and you want to use this feature. By default, on connected state, icon show maximum signal quality. Defaults to ``false``. - - -Acknowledgments: ----------------- - -Thanks to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories: - -* `Mac Zhou `_ -* `NeoAcheron `_ -* `Rene Klootwijk `_ - -See Also --------- - -- :doc:`/components/climate/index` -- :apiref:`climate/midea_ac.h` -- :ghedit:`Edit` diff --git a/components/display/images/st7920-full.jpg b/components/display/images/st7920-full.jpg new file mode 100644 index 000000000..744284a0c Binary files /dev/null and b/components/display/images/st7920-full.jpg differ diff --git a/components/display/st7789v.rst b/components/display/st7789v.rst index 89606c15b..a31af4619 100644 --- a/components/display/st7789v.rst +++ b/components/display/st7789v.rst @@ -53,10 +53,10 @@ hardwired programming. (OTA updates are of course possible after ESPHome is init Configuration variables: ************************ -- **backlight_pin** (**Required**, :ref:`Pin Schema `): The display's backlight pin. - **cs_pin** (**Required**, :ref:`Pin Schema `): The CS pin. - **dc_pin** (**Required**, :ref:`Pin Schema `): The DC pin. - **reset_pin** (**Required**, :ref:`Pin Schema `): The RESET pin. +- **backlight_pin** (*Optional*, :ref:`Pin Schema `): The display's backlight pin. - **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display. See :ref:`display-engine` for more information. - **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``5s``. diff --git a/components/display/st7920.rst b/components/display/st7920.rst new file mode 100644 index 000000000..9c43ffadd --- /dev/null +++ b/components/display/st7920.rst @@ -0,0 +1,64 @@ +ST7920 LCD Graphic Display +========================== + +.. seo:: + :description: Instructions for setting up ST7920 LCD display drivers. + :image: st7920.jpg + +.. _st7920: + +Usage +----- + +The ``st7920`` display platform allows you to use +ST7920 (`datasheet `__, +`electrodragon `__) +displays with ESPHome. Note that this component is for displays that are connected via the 3-Wire :ref:`SPI bus `. +It's a monochrome LCD graphic display. + +.. figure:: images/st7920-full.jpg + :align: center + :width: 75.0% + + ST7920 LCD Graphic Display + +Connect D5 to the E pin you chose for the :ref:`SPI bus `, connect D7 to the R/W pin and ``RS`` to some GPIO pins on the ESP. +For SPI communication it's important to connect PSB on the LCD to GND. + +.. code-block:: yaml + + # Example configuration entry + spi: + clk_pin: D5 + mosi_pin: D7 + + display: + - platform: st7920 + cs_pin: + number: 4 + inverted: true + lambda: |- + it.print(0, 0, id(font), "Hello World!"); + + +Configuration variables: +************************ + +- **cs_pin** (**Required**, :ref:`Pin Schema `): Sometimes also called ``RS``. For ST7920 should be inverted. +- **width** (**Required**, int): The "width" of a screen. Defaults to 128. +- **height** (**Required**, int): The "height" of a screen. Defaults to 64; +- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in ``lambda:`` will be rotated + by this option. One of ``0°`` (default), ``90°``, ``180°``, ``270°``. +- **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display. + See :ref:`display-engine` for more information. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to re-draw the screen. Defaults to ``60s``. +- **pages** (*Optional*, list): Show pages instead of a single lambda. See :ref:`display-pages`. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. + + +See Also +-------- + +- :doc:`index` +- :apiref:`st7920/st7920.h` +- :ghedit:`Edit` diff --git a/components/esp32_ble_beacon.rst b/components/esp32_ble_beacon.rst index d339303b3..220ce9830 100644 --- a/components/esp32_ble_beacon.rst +++ b/components/esp32_ble_beacon.rst @@ -74,6 +74,7 @@ See Also -------- - :doc:`esp32_ble_tracker` +- :doc:`binary_sensor/ble_presence` - :apiref:`esp32_ble_beacon/esp32_ble_beacon.h` - `ESP32 BLE for Arduino `__ by `Neil Kolban `__. - :ghedit:`Edit` diff --git a/components/fan/hbridge.rst b/components/fan/hbridge.rst new file mode 100644 index 000000000..5a5a051ba --- /dev/null +++ b/components/fan/hbridge.rst @@ -0,0 +1,77 @@ +H-bridge Fan +============ + +.. seo:: + :description: Instructions for setting up hbridge controlled fans (or motors). + :image: fan.png + +The `'hbridge`' fan platform allows you to use a compatible `h-bridge` (L298N, DRV8871, MX1508, BTS7960, L9110S, DRV8833, TB6612, etc.) to control a fan (or motor). + +.. figure:: images/L298N_module.jpg + :align: center + :target: `kuongshun`_ + :width: 50.0% + + L298N H-bridge module. Image by `kuongshun`_. + +.. _kuongshun: https://kuongshun.com/products/l298n-stepper-motor-driver-board-red + +.. figure:: images/fan-ui.png + :align: center + :width: 80.0% + +.. code-block:: yaml + + # Example configuration entry + fan: + - platform: hbridge + output: my_output_1 + name: "Living Room Fan" + pin_a: motor_forward_pin + pin_b: motor_reverse_pin + # enable_pin: motor_enable + decay_mode: slow # slow decay mode (braking) or fast decay (coasting). + +Configuration variables: +------------------------ + +- **pin_a** (**Required**, :ref:`config-id`): The id of the + :ref:`float output ` connected to Pin A (alternatively IN1, etc.) of the h-bridge. +- **pin_b** (**Required**, :ref:`config-id`): The id of the + :ref:`float output ` connected to Pin B (alternatively IN2, etc.) of the h-bridge. +- **enable_pin** (**Optional**, :ref:`config-id`): The id of the + :ref:`float output ` connected to the Enable pin of the h-bridge (if h-bridge uses enable). +- **decay_mode** (**Optional**, string): The decay mode you want to use with + the h-bridge. Either ``slow`` (braking) or ``fast`` (coasting). Defaults to ``slow``. +- **name** (**Required**, string): The name for this fan. +- **oscillation_output** (*Optional*, :ref:`config-id`): The id of the + :ref:`output ` to use for the oscillation state of this fan. Default is empty. +- **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. The value is used + to calculate the percentages for each speed. E.g. ``2`` means that you have 50% and 100% while ``100`` + will allow 1% increments in the output. Defaults to ``100``. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Fan Component `. + +.. _fan-hbridge_brake_action: + +``fan.hbridge.brake`` Action +---------------------------- + +Set all h-bridge pins high, shorting the fan/motor's windings and forcing the motor to actively stop. + +.. code-block:: yaml + + on_...: + then: + - fan.hbridge.brake: fan_1 + +See Also +-------- + +- :doc:`/components/output/index` +- :doc:`/components/fan/index` +- :doc:`/components/output/ledc` +- :doc:`/components/output/esp8266_pwm` +- :apiref:`fan/fan_state.h` +- `Adafruit's excellent H-bridge tutorial `__ +- :ghedit:`Edit` diff --git a/components/fan/images/L298N_module.jpg b/components/fan/images/L298N_module.jpg new file mode 100644 index 000000000..f464ff4df Binary files /dev/null and b/components/fan/images/L298N_module.jpg differ diff --git a/components/fan/index.rst b/components/fan/index.rst index adfa2539e..d29fafe64 100644 --- a/components/fan/index.rst +++ b/components/fan/index.rst @@ -54,6 +54,8 @@ Automation triggers: when the fan is turned on. See :ref:`fan-on_turn_on_off_trigger`. - **on_turn_off** (*Optional*, :ref:`Action `): An automation to perform when the fan is turned off. See :ref:`fan-on_turn_on_off_trigger`. +- **on_speed_set** (*Optional*, :ref:`Action `): An automation to perform + when the fan speed is set/changed. See :ref:`fan-on_speed_set_trigger`. .. _fan-toggle_action: @@ -104,6 +106,27 @@ Configuration options: Set the oscillation state of the fan. Defaults to not affecting oscillation. - **speed** (*Optional*, int, :ref:`templatable `): Set the speed level of the fan. Can be a number between 1 and the maximum speed level of the fan. +- **direction** (*Optional*, string, :ref:`templatable `): + Set the diretion of the fan. Can be either ``forward`` or ``reverse``. Defaults to not changing the direction. + +.. _fan-is_on_condition: +.. _fan-is_off_condition: + +``fan.is_on`` / ``fan.is_off`` Condition +********************************************** + +This :ref:`condition ` passes if the given fan is on/off. + +.. code-block:: yaml + + # in a trigger: + on_...: + if: + condition: + fan.is_on: my_fan + # same goes for is_off + then: + - script.execute: my_script .. _fan-on_turn_on_off_trigger: @@ -123,6 +146,21 @@ if a command to turn the fan on or off already matches the current state. on_turn_off: - logger.log: "Fan Turned Off!" +.. _fan-on_speed_set_trigger: + +``fan.on_speed_set`` Trigger +**************************************************** + +This trigger is activated each time the fan speed is changed. It will fire when the speed is either set via API e.g. in Home Assistant or locally by an automation or a lambda function. + +.. code-block:: yaml + + fan: + - platform: speed # or any other platform + # ... + on_speed_set: + - logger.log: "Fan Speed was changed!" + Full Fan Index -------------- diff --git a/components/light/index.rst b/components/light/index.rst index 9dcee7906..735e7064a 100644 --- a/components/light/index.rst +++ b/components/light/index.rst @@ -32,6 +32,8 @@ Configuration variables: Defaults to ``2.8``. - **default_transition_length** (*Optional*, :ref:`config-time`): The default transition length to use when no transition length is set in the light call. Defaults to ``1s``. +- **flash_transition_length** (*Optional*, :ref:`config-time`): The transition length to use when flash + is called. Defaults to ``0s``. - **restore_mode** (*Optional*): Control how the light attempts to restore state on bootup. For restoring on ESP8266s, also see ``esp8266_restore_from_flash`` in the :doc:`esphome section `. diff --git a/components/remote_receiver.rst b/components/remote_receiver.rst index 0f468087f..bb57937e3 100644 --- a/components/remote_receiver.rst +++ b/components/remote_receiver.rst @@ -31,6 +31,7 @@ Configuration variables: Set to ``all`` to dump all available codecs: - **lg**: Decode and dump LG infrared codes. + - **midea**: Decode and dump Midea infrared codes. - **nec**: Decode and dump NEC infrared codes. - **panasonic**: Decode and dump Panasonic infrared codes. - **pioneer**: Decode and dump Pioneer infrared codes. @@ -64,6 +65,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_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. - **on_nec** (*Optional*, :ref:`Automation `): An automation to perform when a NEC remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::NECData` is passed to the automation for use in lambdas. @@ -141,6 +145,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``. +- **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` + for more info. Usually you only need to copy first 5 bytes directly from the dumper output. + - **nec**: Trigger on a decoded NEC remote code with the given data. - **address** (**Required**, int): The address to trigger on, see dumper output for more info. diff --git a/components/remote_transmitter.rst b/components/remote_transmitter.rst index cf587c241..c2a9cb88a 100644 --- a/components/remote_transmitter.rst +++ b/components/remote_transmitter.rst @@ -139,6 +139,24 @@ 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_midea: + +``remote_transmitter.transmit_midea`` Action +******************************************** + +This :ref:`action ` sends a 40-bit Midea code to a remote transmitter. 8-bits of checksum added automatically. + +.. code-block:: yaml + + on_...: + - remote_transmitter.transmit_midea: + code: [0xA2, 0x08, 0xFF, 0xFF, 0xFF] + +Configuration variables: + +- **code** (**Required**, list): The 40-bit Midea code to send as a list of hex or integers. +- All other options from :ref:`remote_transmitter-transmit_action`. + ``remote_transmitter.transmit_nec`` Action ****************************************** diff --git a/components/sensor/airthings_ble.rst b/components/sensor/airthings_ble.rst new file mode 100644 index 000000000..de8ea51a0 --- /dev/null +++ b/components/sensor/airthings_ble.rst @@ -0,0 +1,79 @@ +AirThings BLE Sensors +======================== + +.. seo:: + :description: Instructions for setting up AirThings bluetooth-based sensors in ESPHome. + :keywords: AirThings, BLE, Bluetooth, Wave Plus + +The ``airthings_wave_plus`` sensor platform lets you track the output of AirThings Bluetooth Low Energy devices. + +This component will track radon, airborne chemicals, CO2, temperature and humidity and others depending on the device sensors. + +Device Discovery +----------------- + +AirThings devices can be found using the ``airthings_ble`` ble scanner. + +To find out your device's MAC address, add the following to your ESPHome configuration: + +.. code-block:: yaml + + logger: + level: DEBUG # Required for the tracker to show the device + + esp32_ble_tracker: + airthings_ble: + +The device will then listen for nearby devices, and display a message like this one: + +`` +[D][airthings_ble:019]: +Found AirThings device Serial: 123456789 (MAC: 01:02:03:04:05:06) +`` + +Once the device is found, **remove the ``airthings_ble:`` device tracker** from your configuration and take note of the device MAC address, and use it when configuring a sensor below. + +Supported Devices +----------------- + +Wave Plus +********* + +AirThings Wave Plus tracks radon (24h and long term), airborne chemicals, CO2, temperature, atmospheric pressure and humidity. + +.. figure:: images/airthings_wave_plus.jpg + :align: center + :width: 60.0% + +Configuration example: + +.. code-block:: yaml + + sensor: + - platform: airthings_wave_plus + ble_client_id: airthings01 + update_interval: 5min # default + temperature: + name: "WavePlus Temperature" + radon: + name: "WavePlus Radon" + radon_long_term: + name: "WavePlus Radon Long Term" + pressure: + name: "WavePlus Pressure" + humidity: + name: "WavePlus Humidity" + co2: + name: "WavePlus CO2" + tvoc: + name: "WavePlus VOC" + + ble_client: + - mac_address: 01:02:03:04:05:06 + id: airthings01 + + esp32_ble_tracker: + +.. note:: + + The sensor uses active polling of devices every 5 minutes as per the device reported internal refresh timeout. diff --git a/components/sensor/ccs811.rst b/components/sensor/ccs811.rst index 0ace2c61f..20825bd3c 100644 --- a/components/sensor/ccs811.rst +++ b/components/sensor/ccs811.rst @@ -54,6 +54,9 @@ Configuration variables: - **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``. +- **version:** (*Optional*): This sensor reports the firmware ('application') version in text, with the internal hex representation of the version number behind it, so version 1.0.0 will be reported as '1.0.0 (0x1000)'. + + - **name** (**Required**, string): The name for the version sensor. Advanced: diff --git a/components/sensor/images/airthings_wave_plus.jpg b/components/sensor/images/airthings_wave_plus.jpg new file mode 100644 index 000000000..562659a96 Binary files /dev/null and b/components/sensor/images/airthings_wave_plus.jpg differ diff --git a/components/sensor/index.rst b/components/sensor/index.rst index 2c8ca2820..d1a3da4e9 100644 --- a/components/sensor/index.rst +++ b/components/sensor/index.rst @@ -48,9 +48,6 @@ Configuration variables: - **state_class** (*Optional*, string): The state class for the sensor. See https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes for a list of available options. Set to ``""`` to remove the default state class of a sensor. -- **last_reset_type** (*Optional*, string): The last reset type to use for the sensor. - Currently there is no gain in overriding this string in YAML and it should be set in the platform code. - Set to ``""`` to remove the default last reset type of a sensor. - **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. The icon set here is ignored by Home Assistant, if a device class is already set. - **accuracy_decimals** (*Optional*, int): Manually set the accuracy of decimals to use when reporting values. diff --git a/components/sensor/pm1006.rst b/components/sensor/pm1006.rst index 77f061ca2..4a8491883 100644 --- a/components/sensor/pm1006.rst +++ b/components/sensor/pm1006.rst @@ -15,10 +15,8 @@ with ESPHome. IKEA VINDRIKTNING Particulate Matter Sensor with PM1006 inside -As the communication with the PM1006 is done using UART, you need to have an :ref:`UART bus ` in your configuration with the ``rx_pin`` connected to the TX pin of the -PM1006. -This component is currently RX-only, as the IKEA VINDRIKTNING already sends commands to the PM1006. -Additionally, you need to set the baud rate to 9600. +As the communication with the PM1006 is done using UART, you need to have an :ref:`UART bus ` in your configuration with the ``rx_pin`` connected to the TX pin of the PM1006. +The baud rate needs to be set to 9600. .. code-block:: yaml @@ -32,7 +30,7 @@ Additionally, you need to set the baud rate to 9600. pm_2_5: name: "Particulate Matter 2.5µm Concentration" -Unlike some other sensors, there is no configurable update interval, as this is a 'passive' implementation that picks up whatever the VINDRIKTNING MCU has requested from the sensor. +In common usage, with the IKEA VINDRIKTNING still controlling the pm1006 sensor, there is no update interval, and this implementation will passively pick up whatever the VINDRIKTNING MCU has requested from the sensor. The implementation was inspired by https://github.com/Hypfer/esp8266-vindriktning-particle-sensor; you can also see the pinout there. However, we recommend mounting your ESP below the fan (which blows out the front) so you do not obstruct the airflow. @@ -47,6 +45,30 @@ Configuration variables: - **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component ` if you want to use multiple UART buses. +- **update_interval** (*Optional*, defaults to ``never``): If you need to actively request measurements to the sensor, set this to some sensible interval. The IKEA VINDRIKTNING does measurements every 20 seconds. + +Using this component standalone +------------------------------- + +If you acquired a pm1006 outside of an IKEA VINDRIKTNING, or if you removed the IKEA MCU or replaced the whole PCB, you will need to actively request measurements. +In that case, you need a TX pin, and you need to set an update interval. + +Example config: + +.. code-block:: yaml + + # Example configuration entry + uart: + rx_pin: D2 + tx_pin: D1 + baud_rate: 9600 + + sensor: + - platform: pm1006 + pm_2_5: + name: "Particulate Matter 2.5µm Concentration" + update_interval: 20s + See Also -------- diff --git a/components/sensor/template.rst b/components/sensor/template.rst index f1268b575..342f5d93a 100644 --- a/components/sensor/template.rst +++ b/components/sensor/template.rst @@ -35,8 +35,9 @@ Configuration variables: - **name** (**Required**, string): The name of the sensor. - **lambda** (*Optional*, :ref:`lambda `): Lambda to be evaluated every update interval to get the new value of the sensor -- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the - sensor. Defaults to ``60s``. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to publish the value of the + sensor, either the result of the lambda function or if no lambda function the last value + published using the publish action. Defaults to ``60s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - All other options from :ref:`Sensor `. diff --git a/components/sensor/total_daily_energy.rst b/components/sensor/total_daily_energy.rst index d6ff626c1..f55271d47 100644 --- a/components/sensor/total_daily_energy.rst +++ b/components/sensor/total_daily_energy.rst @@ -39,6 +39,8 @@ Configuration variables: - **name** (**Required**, string): The name of the sensor. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **min_save_interval** (*Optional*, :ref:`config-time`): The minimum time span between saving updated values to storage. This is to keep wearout of memory low. Defaults to ``0s``. +- **method** (*Optional*, string): The method to use for calculating the total daily energy. One of + ``trapezoid``, ``left`` or ``right``. Defaults to ``right``. - All other options from :ref:`Sensor `. Converting from W to kW diff --git a/components/text_sensor/template.rst b/components/text_sensor/template.rst index bdab12e0a..3f50cd28d 100644 --- a/components/text_sensor/template.rst +++ b/components/text_sensor/template.rst @@ -31,8 +31,9 @@ Configuration variables: - **name** (**Required**, string): The name of the text sensor. - **lambda** (*Optional*, :ref:`lambda `): Lambda to be evaluated every update interval to get the new value of the text sensor -- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the - text sensor. Defaults to ``60s``. +- **update_interval** (*Optional*, :ref:`config-time`): The interval to publish the value of the + text sensor, either the result of the lambda function or if no lambda function the last value + published using the publish action. Defaults to ``60s``. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - All other options from :ref:`Text Sensor `. diff --git a/conf.py b/conf.py index 63968b346..90ac616a2 100644 --- a/conf.py +++ b/conf.py @@ -67,9 +67,9 @@ author = "Otto Winter" # built documents. # # The short X.Y version. -version = "2021.8" +version = "2021.9" # The full version, including alpha/beta/rc tags. -release = "2021.8.2" +release = "2021.9.0b1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/guides/automations.rst b/guides/automations.rst index a0b0b0382..3c701c307 100644 --- a/guides/automations.rst +++ b/guides/automations.rst @@ -402,6 +402,7 @@ All Conditions - :ref:`light.is_on ` / :ref:`light.is_off ` - :ref:`display.is_displaying_page ` - :ref:`number.in_range ` +- :ref:`fan.is_on ` / :ref:`fan.is_off ` All Lambda Calls ---------------- diff --git a/guides/configuration-types.rst b/guides/configuration-types.rst index 569d1c1d2..760f7fc96 100644 --- a/guides/configuration-types.rst +++ b/guides/configuration-types.rst @@ -270,6 +270,9 @@ config in the main yaml file. All definitions from packages will be merged with config in non-destructive way so you could always override some bits and pieces of package configuration. +Local packages +************** + Consider the following example where the author put common pieces of configuration like WiFi and I²C into base files and extends it with some device specific configurations in the main config. @@ -346,6 +349,32 @@ merged with the services definitions from main config file. switch: - !include common/switch/restart_switch.config.yaml + +Remote/git Packages +******************* + +Packages can also be loaded from a git repository by utilizing the correct config syntax. + +.. code-block:: yaml + + packages: + # Git repo examples + remote_package: + url: https://github.com/esphome/non-existant-repo + ref: main # optional + files: [file1.yml, file2.yml] + refresh: 1d # optional + + # A single file can be expressed using `file` or `files` as a string + remote_package_two: + url: https://github.com/esphome/non-existant-repo + file: file1.yml # cannot be combined with `files` + # files: file1.yml + + # shorthand form github://username/repository/[folder/]file-path.yml[@branch-or-tag] + remote_package_three: github://esphome/non-existant-repo/file1.yml@main + + See Also -------- diff --git a/guides/supporters.rst b/guides/supporters.rst index 54aa783a0..b5b52b8d0 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -22,6 +22,7 @@ Contributors - `2016for (@2016for) `__ - `Pavel Golovin (@31337Ghost) `__ - `David Martin (@3ative) `__ +- `Alessandro Campolo (@a13ssandr0) `__ - `Aalian Khan (@AalianKhan) `__ - `Abel Matser (@abelmatser) `__ - `Abílio Costa (@abmantis) `__ @@ -157,6 +158,7 @@ Contributors - `Destix (@Destix) `__ - `Develo (@devyte) `__ - `Dezorian (@Dezorian) `__ +- `dgtal1 (@dgtal1) `__ - `Alain Turbide (@Dilbert66) `__ - `Mark (@Diramu) `__ - `Dirk Heinke (@DirkHeinke) `__ @@ -278,6 +280,7 @@ Contributors - `Ian Leeder (@ianleeder) `__ - `icarome (@icarome) `__ - `igg (@igg) `__ +- `Petko Bordjukov (@ignisf) `__ - `ikatkov (@ikatkov) `__ - `Michael (@imeekle) `__ - `imgbot[bot] (@imgbot[bot]) `__ @@ -298,6 +301,7 @@ Contributors - `jeff-h (@jeff-h) `__ - `Jeff Rescignano (@JeffResc) `__ - `Jej (@jej) `__ +- `Jérôme Laban (@jeromelaban) `__ - `Jesse Hills (@jesserockz) `__ - `Jim Bauwens (@jimbauwens) `__ - `Jérémy JOURDIN (@JJK801) `__ @@ -309,6 +313,7 @@ Contributors - `Johan van der Kuijl (@johanvanderkuijl) `__ - `Johboh (@Johboh) `__ - `John Erik Halse (@johnerikhalse) `__ +- `JonasEr (@JonasEr) `__ - `Jonathan Adams (@jonathanadams) `__ - `Jonathan Treffler (@JonathanTreffler) `__ - `JonnyaiR (@jonnyair) `__ @@ -351,6 +356,7 @@ Contributors - `Jakub Šimo (@kubik369) `__ - `kvvoff (@kvvoff) `__ - `Ken Davidson (@kwdavidson) `__ +- `Kyle Hendricks (@kylehendricks) `__ - `Kyle Manna (@kylemanna) `__ - `la7dja (@la7dja) `__ - `Stefan Lässer (@Laess3r) `__ @@ -380,12 +386,14 @@ Contributors - `Manuel Díez (@manutenfruits) `__ - `Marcel van der Veldt (@marcelveldt) `__ - `Marc (@MarcHagen) `__ +- `Marcio Granzotto Rodrigues (@marciogranzotto) `__ - `Marc Teale (@marcteale) `__ - `marecabo (@marecabo) `__ - `Marvin Gaube (@margau) `__ - `Martynas Griškonis (@Margriko) `__ - `Mario (@mario-tux) `__ - `Matthew Harrold (@marrold) `__ +- `marsjan155 (@marsjan155) `__ - `Martin (@martgras) `__ - `Martin Hjelmare (@MartinHjelmare) `__ - `MartinWelsch (@MartinWelsch) `__ @@ -689,4 +697,4 @@ Contributors - `ZTX18 (@ZTX18) `__ - `Christian Zufferey (@zuzu59) `__ -*This page was last updated August 25, 2021.* +*This page was last updated September 9, 2021.* diff --git a/images/airthings_logo.png b/images/airthings_logo.png new file mode 100644 index 000000000..21795c621 Binary files /dev/null and b/images/airthings_logo.png differ diff --git a/images/st7920.jpg b/images/st7920.jpg new file mode 100644 index 000000000..24be8062f Binary files /dev/null and b/images/st7920.jpg differ diff --git a/index.rst b/index.rst index 2421dbb51..e32692017 100644 --- a/index.rst +++ b/index.rst @@ -168,6 +168,7 @@ Air Quality *********** .. imgtable:: + AirThings BLE, components/sensor/airthings_ble, airthings_logo.png, Radon, CO2, Volatile organics CCS811, components/sensor/ccs811, ccs811.jpg, CO2 & Volatile organics HM3301, components/sensor/hm3301, hm3301.jpg, Particulate MH-Z19, components/sensor/mhz19, mhz19.jpg, CO2 & Temperature @@ -255,6 +256,7 @@ Environmental .. imgtable:: AHT10, components/sensor/aht10, aht10.jpg, Temperature & Humidity + AirThings BLE, components/sensor/airthings_ble, airthings_logo.png, Temperature & Humidity & Pressure AM2320, components/sensor/am2320, am2320.jpg, Temperature & Humidity BME280, components/sensor/bme280, bme280.jpg, Temperature & Humidity & Pressure BME680, components/sensor/bme680, bme680.jpg, Temperature & Humidity & Pressure & Gas @@ -449,6 +451,7 @@ Fan Components Fan Core, components/fan/index, folder-open.svg Binary Fan, components/fan/binary, fan.svg + H-bridge Fan, components/fan/hbridge, fan.svg Speed Fan, components/fan/speed, fan.svg Tuya Fan, components/fan/tuya, tuya.png @@ -472,6 +475,7 @@ Display Components SSD1351, components/display/ssd1351, ssd1351.jpg ST7735, components/display/st7735, st7735.jpg ST7789V, components/display/st7789v, st7789v.jpg + ST7920, components/display/st7920, st7920.jpg ILI9341, components/display/ili9341, ili9341.jpg Waveshare E-Paper, components/display/waveshare_epaper, waveshare_epaper.jpg Inkplate 6, components/display/inkplate6, inkplate6.jpg @@ -516,7 +520,7 @@ Climate Components PID Controller, components/climate/pid, function.svg IR Remote Climate, components/climate/ir_climate, air-conditioner-ir.svg Tuya Climate, components/climate/tuya, tuya.png - Midea Air Conditioner, components/climate/midea_ac, midea.svg + Midea, components/climate/midea, midea.svg Anova Cooker, components/climate/anova, anova.png Number Components