Added note about nec protocol fix (#1618)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Sergey V. DUDANOV 2021-11-20 23:33:19 +04:00 committed by GitHub
parent 8db4cc6911
commit ee60f76e37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -71,6 +71,13 @@ Automations:
- **on_nec** (*Optional*, :ref:`Automation <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.
.. note::
In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC standard.
Therefore, if the the configuration file has come from an earlier version of ESPhome, it is necessary to reverse the order of the address and command bits when moving to 2021.12 or above.
For example, address: 0x84ED, command: 0x13EC becomes 0xB721 and 0x37C8 respectively.
- **on_sony** (*Optional*, :ref:`Automation <automation>`): An automation to perform when a
Sony remote code has been decoded. A variable ``x`` of type :apistruct:`remote_base::SonyData`
is passed to the automation for use in lambdas.
@ -152,6 +159,12 @@ Remote code selection (exactly one of these has to be included):
- **nec**: Trigger on a decoded NEC remote code with the given data.
.. note::
In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC standard.
Therefore, if the the configuration file has come from an earlier version of ESPhome, it is necessary to reverse the order of the address and command bits when moving to 2021.12 or above.
For example, address: 0x84ED, command: 0x13EC becomes 0xB721 and 0x37C8 respectively.
- **address** (**Required**, int): The address to trigger on, see dumper output for more info.
- **command** (**Required**, int): The NEC command to listen for.

View File

@ -183,6 +183,12 @@ Configuration variables:
This :ref:`action <config-action>` sends an NEC infrared remote code to a remote transmitter.
.. note::
In version 2021.12, the order of transferring bits was corrected from MSB to LSB in accordance with the NEC standard.
Therefore, if the the configuration file has come from an earlier version of ESPhome, it is necessary to reverse the order of the address and command bits when moving to 2021.12 or above.
For example, address: 0x84ED, command: 0x13EC becomes 0xB721 and 0x37C8 respectively.
.. code-block:: yaml
on_...: