Files
esphome/tests/components/uart/test.esp8266-ard.yaml

52 lines
942 B
YAML

esphome:
on_boot:
then:
- uart.write:
id: uart_id
data: 'Hello World'
- uart.write:
id: uart_id
data: [0x00, 0x20, 0x42]
uart:
- id: uart_id
tx_pin: 4
rx_pin: 5
baud_rate: 9600
data_bits: 8
rx_buffer_size: 512
parity: EVEN
stop_bits: 2
- id: uart_debug
tx_pin: 14
rx_pin: 12
baud_rate: 115200
debug:
debug_prefix: "[UART1] "
switch:
- platform: uart
name: "UART Switch Array"
uart_id: uart_id
data: [0x01, 0x02, 0x03]
- platform: uart
name: "UART Switch Dual"
uart_id: uart_id
data:
turn_on: [0xA0, 0xA1]
turn_off: [0xB0, 0xB1]
button:
- platform: uart
name: "UART Button"
uart_id: uart_id
data: [0xFF, 0xEE]
event:
- platform: uart
uart_id: uart_id
name: "UART Event"
event_types:
- "string_event_A": "*A#"
- "bytes_event_B": [0x2A, 0x42, 0x23]