esphome-docs/esphomeyaml/components/ir_transmitter.rst

47 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2018-05-14 21:15:49 +02:00
IR Transmitter Component
========================
2018-05-13 11:37:02 +02:00
2018-05-14 21:15:49 +02:00
The IR transmitter component lets you send infrared messages to control devices in your home.
2018-05-13 11:37:02 +02:00
First, you need to setup a global hub that specifies which pin your IR
2018-06-01 18:10:00 +02:00
led is connected to. Afterwards you can create :doc:`individual
switches </esphomeyaml/components/switch/ir_transmitter>` that
2018-05-13 11:37:02 +02:00
each send a pre-defined IR code to a device.
2018-05-14 21:15:49 +02:00
.. note::
This component is *much* more accurate on the ESP32, since that chipset has a dedicated
peripheral for sending exact signal sequences.
2018-05-13 11:37:02 +02:00
.. code:: yaml
# Example configuration entry
ir_transmitter:
- id: 'ir_hub1'
pin: 32
# Individual switches
switch:
- platform: ir_transmitter
ir_transmitter_id: 'ir_hub1'
name: "Panasonic TV Off"
panasonic:
address: 0x4004
command: 0x100BCBD
Configuration variables:
2018-06-01 18:10:00 +02:00
------------------------
2018-05-13 11:37:02 +02:00
2018-06-01 18:10:00 +02:00
- **pin** (**Required**, :ref:`config-pin`): The pin of the IR LED.
2018-05-13 11:37:02 +02:00
- **carrier_duty_percent** (*Optional*, int): The duty percentage of
the carrier. 50 for example means that the LED will be on 50% of the
2018-05-14 21:15:49 +02:00
time. Must be in range from 1 to 100. Defaults to 50.
2018-06-01 18:10:00 +02:00
- **id** (*Optional*, :ref:`config-id`): Manually specify
2018-05-13 11:37:02 +02:00
the ID used for code generation. Use this if you have multiple IR
transmitters.
2018-06-01 18:10:00 +02:00
See Also
--------
- :doc:`API Reference </api/switch/ir-transmitter>`
2018-06-04 08:17:22 +02:00
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/ir_transmitter.rst>`__