-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaxxfan-receiver-example.yaml
38 lines (33 loc) · 1.01 KB
/
maxxfan-receiver-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# MAXXFAN RECEIVER EXAMPLE
#
# Please modify this configuration to suit your needs.
esphome:
name: maxxfan-receiver-example
friendly_name: Maxxfan Receiver Example
esp32:
board: esp32-c3-devkitm-1 # Change this for the board you are using
framework:
type: arduino
logger:
# Import the maxxfan protocol component.
external_components:
# Import the component from Github.
# - source: github://j9brown/esphome-maxxfan-protocol@main
# components: [ maxxfan_protocol ]
# Import the component from a local directory.
- source: components
# Enable the Maxxfan protocol.
maxxfan_protocol:
# Configure the IR receiver.
remote_receiver:
- id: ir_receiver
pin:
number: 2 # Change this to the pin your IR receiver is attached to
mode: input
inverted: true
dump: maxxfan
on_maxxfan:
then:
lambda: |-
// The variable 'x' holds a MaxxfanData object parsed from the received message
ESP_LOGD("maxxfan-example", "Fan state: %s", x.fan_on ? "on" : "off");