mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
Add Event Component to UART (#11765)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
@@ -75,3 +75,11 @@ button:
|
||||
- uart.write: !lambda |-
|
||||
std::string cmd = "VALUE=" + str_sprintf("%.0f", id(test_number).state) + "\r\n";
|
||||
return std::vector<uint8_t>(cmd.begin(), cmd.end());
|
||||
|
||||
event:
|
||||
- platform: uart
|
||||
uart_id: uart_uart
|
||||
name: "UART Event"
|
||||
event_types:
|
||||
- "string_event_A": "*A#"
|
||||
- "bytes_event_B": [0x2A, 0x42, 0x23]
|
||||
|
||||
@@ -31,3 +31,11 @@ button:
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user