Skip to content

Commit

Permalink
Merge branch 'next' into climate-gree-yx1ff
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyrobi authored Aug 27, 2024
2 parents f2f54c1 + f2c3524 commit 987fd3d
Show file tree
Hide file tree
Showing 113 changed files with 4,444 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 2024.7.3
PROJECT_NUMBER = 2024.9.0-dev

# 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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ESPHOME_PATH = ../esphome
ESPHOME_REF = 2024.7.3
ESPHOME_REF = 2024.8.0
PAGEFIND_VERSION=1.1.0
PAGEFIND=pagefind
NET_PAGEFIND=../pagefindbin/pagefind
Expand Down
Binary file added _static/changelog-2024.8.0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion _static/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.7.3
2024.9.0-dev
301 changes: 301 additions & 0 deletions changelog/2024.8.0.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion changelog/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Changelog
=========

.. redirect::
:url: /changelog/2024.7.0.html
:url: /changelog/2024.8.0.html

.. toctree::
:glob:
Expand Down
2 changes: 1 addition & 1 deletion changelog/v1.12.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ It's release day! 🎉 Today I'm happy to release ESPHome 1.12.0. What's new? A
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>`,
``homeassistant.service`` call). With 1.12 you get :ref:`User-defined services <api-device-actions>`,
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!

Expand Down
1 change: 1 addition & 0 deletions components/alarm_control_panel/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Configuration variables:
- **on_chime** (*Optional*, :ref:`Action <config-action>`): An automation to perform
when a zone has been marked as chime in the configuration, and it changes from closed to open.
See :ref:`alarm_control_panel_on_chime_trigger`.
- If MQTT enabled, all other options from :ref:`MQTT Component <config-mqtt-component>`.
- If Webserver enabled, ``web_server_sorting_weight`` can be set. See :ref:`Webserver Entity Sorting <config-webserver-sorting>`.


Expand Down
69 changes: 34 additions & 35 deletions components/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Configuration variables:
document.getElementById("api-key").value = bytesArrToBase64(array);
</script>

- **services** (*Optional*, list): A list of user-defined services. See :ref:`api-services`.
- **actions** (*Optional*, list): A list of user-defined actions. See :ref:`api-device-actions`.
- **reboot_timeout** (*Optional*, :ref:`config-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
the ESP is connected to the network, when in fact it is not - only a full reboot fixes it.
Expand All @@ -79,7 +79,7 @@ Actions
-------

Before using any of the actions below, you'll need to tell Home Assistant to allow your device to
make service calls.
perform actions.

Open the ESPHome integration page on your Home Assistant instance:

Expand All @@ -91,7 +91,7 @@ Then:

#. Find your device in the device list
#. Click the "configure" button next to it
#. Check the "Allow the device to make Home Assistant service calls" box
#. Check the "Allow the device to perform Home Assistant actions" box
#. Then click "submit".

.. _api-homeassistant_event_action:
Expand All @@ -102,7 +102,7 @@ Then:
.. note::

Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to perform actions.

When using the native API with Home Assistant, you can create events in the Home Assistant event bus
straight from ESPHome :ref:`Automations <automation>`.
Expand All @@ -127,31 +127,30 @@ Configuration variables:
- **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-homeassistant_service_action:
.. _api-homeassistant_action-action:

``homeassistant.service`` Action
``homeassistant.action`` Action
********************************

.. note::

Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to perform actions.

When using the native API with Home Assistant, you can create Home Assistant service
calls straight from ESPHome :ref:`Automations <automation>`.
When using the native API with Home Assistant, you can perform Home Assistant actions straight from ESPHome :ref:`Automations <automation>`.

.. code-block:: yaml
# In some trigger
on_...:
# Simple
- homeassistant.service:
service: notify.html5
- homeassistant.action:
action: notify.html5
data:
message: Button was pressed
# With templates and variables
- homeassistant.service:
service: notify.html5
- homeassistant.action:
action: notify.html5
data:
title: New Humidity
data_template:
Expand All @@ -163,10 +162,10 @@ calls straight from ESPHome :ref:`Automations <automation>`.
Configuration variables:
````````````````````````

- **service** (**Required**, string): The Home Assistant `Service <https://www.home-assistant.io/docs/scripts/service-calls/>`__
to call.
- **data** (*Optional*, mapping): Optional *static* data to pass along with the service call.
- **data_template** (*Optional*, mapping): Optional template data to pass along with the service call.
- **action** (**Required**, string): The Home Assistant `Action <https://www.home-assistant.io/docs/scripts/service-calls/>`__
to perform.
- **data** (*Optional*, mapping): Optional *static* data to perform the action with.
- **data_template** (*Optional*, mapping): Optional template data to perform the action with.
This is evaluated on the Home Assistant side with Home Assistant's templating engine.
- **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.
Expand All @@ -182,7 +181,7 @@ the parameters in plain format.
set_light_rgb:
alias: 'ESPHome RGB light set'
sequence:
- service: light.turn_on
- action: light.turn_on
data_template:
entity_id: '{{ light_name }}'
rgb_color:
Expand All @@ -196,8 +195,8 @@ Then, in ESPHome:
# In some trigger
on_...:
- homeassistant.service:
service: script.set_light_rgb
- homeassistant.action:
action: script.set_light_rgb
data:
light_name: 'my_light'
red: '255'
Expand All @@ -212,7 +211,7 @@ Then, in ESPHome:
.. note::

Be sure to :ref:`follow the instructions above <api-actions>` to tell Home Assistant to allow
your device to make service calls.
your device to make action calls.

When using the native API with Home Assistant, you can push tag_scanned to Home Assistant
straight from ESPHome :ref:`Automations <automation>`.
Expand Down Expand Up @@ -289,27 +288,27 @@ if logs are shown remotely.
then:
- logger.log: API is connected!
.. _api-services:
.. _api-device-actions:

User-defined Services
---------------------
User-defined Actions
--------------------

It is also possible to get data from Home Assistant to ESPHome with user-defined services.
When you declare services in your ESPHome YAML file, they will automatically show up in
It is also possible to get data from Home Assistant to ESPHome with user-defined actions.
When you declare actions in your ESPHome YAML file, they will automatically show up in
Home Assistant and you can call them directly.

.. code-block:: yaml
# Example configuration entry
api:
services:
- service: start_laundry
actions:
- action: start_laundry
then:
- switch.turn_on: relay
- delay: 3h
- switch.turn_off: relay
For example with the configuration seen above, after uploading you will see a service
For example with the configuration seen above, after uploading you will see an action
called ``esphome.livingroom_start_laundry`` (livingroom is the node name) which you can
then call.

Expand All @@ -319,8 +318,8 @@ Additionally, you can also transmit data from Home Assistant to ESPHome with thi
# Example configuration entry
api:
services:
- service: start_effect
actions:
- action: start_effect
variables:
my_brightness: int
my_effect: string
Expand All @@ -331,18 +330,18 @@ Additionally, you can also transmit data from Home Assistant to ESPHome with thi
effect: !lambda 'return my_effect;'
Using the ``variables`` key you can tell ESPHome which variables to expect from Home Assistant.
For example the service seen above would be executed with something like this:
For example the action seen above would be executed with something like this:

.. code-block:: yaml
# Example Home Assistant Service Call
service: esphome.livingroom_start_effect
# Example Home Assistant Action
action: esphome.livingroom_start_effect
data_template:
my_brightness: "{{ states.brightness.state }}"
my_effect: "Rainbow"
Then each variable you define in the ``variables`` section is accessible in the automation
triggered by the user-defined service through the name you gave it in the variables section
triggered by the user-defined action through the name you gave it in the variables section
(note: this is a local variable, so do not wrap it in ``id(...)`` to access it).

There are currently 4 types of variables:
Expand Down
39 changes: 39 additions & 0 deletions components/binary_sensor/lvgl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
LVGL Binary Sensor
==================

.. seo::
:description: Instructions for setting up an LVGL widget binary sensor.
:image: ../images/lvgl_c_bns.png

The ``lvgl`` binary sensor platform creates a binary sensor from an LVGL widget
and requires :doc:`LVGL </components/lvgl/index>` to be configured.

Supported widget is :ref:`lvgl-widget-button`. A single binary sensor supports only a single widget; in other words, it's not possible to have multiple widgets associated with a single ESPHome binary sensor component.

Configuration variables:
------------------------

- **widget** (**Required**): The ID of a supported widget configured in LVGL, which will reflect the state of the binary sensor.
- All other variables from :ref:`Binary Sensor <config-binary_sensor>`.

Example:

.. code-block:: yaml
binary_sensor:
- platform: lvgl
widget: btn_id
name: LVGL push button
See Also
--------
- :doc:`LVGL Main component </components/lvgl/index>`
- :ref:`Button widget <lvgl-widget-button>`
- :doc:`/components/sensor/lvgl`
- :doc:`/components/number/lvgl`
- :doc:`/components/switch/lvgl`
- :doc:`/components/select/lvgl`
- :doc:`/components/light/lvgl`
- :doc:`/components/text/lvgl`
- :doc:`/components/text_sensor/lvgl`
- :ghedit:`Edit`
6 changes: 3 additions & 3 deletions components/ble_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,16 @@ Secure connection with a dynamically generated passkey:
.. code-block:: yaml
api:
services:
- service: passkey_reply
actions:
- action: passkey_reply
variables:
passkey: int
then:
- logger.log: "Authenticating with passkey"
- ble_client.passkey_reply:
id: my_ble_client
passkey: !lambda return passkey;
- service: numeric_comparison_reply
- action: numeric_comparison_reply
variables:
accept: bool
then:
Expand Down
Loading

0 comments on commit 987fd3d

Please sign in to comment.