Files
esphome/tests/components/uart/test.esp8266-ard.yaml
eoasmxd 1b31253287 Add Event Component to UART (#11765)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2025-12-22 12:19:48 -10:00

42 lines
763 B
YAML

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