Fix Template Switch Lamda Example (#1376)

A template switch publish_state method does take a boolean and not a float.
This commit is contained in:
Dominik Bruhn 2021-08-09 10:02:43 +02:00 committed by GitHub
parent e5840ef6a6
commit 530a770c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -89,11 +89,12 @@ Configuration options:
.. note::
This action can also be written in lambdas:
This action can also be written in lambdas, the parameter of the `public_state` method denotes if
the switch is currently on or off:
.. code-block:: cpp
id(template_swi).publish_state(42.0);
id(template_swi).publish_state(false);
See Also
--------