1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 08:41:59 +00:00
Files
esphome/tests/integration/fixtures/udp_send_receive.yaml
2026-01-17 15:50:23 -10:00

34 lines
673 B
YAML

esphome:
name: udp-test
host:
api:
services:
- service: send_udp_message
then:
- udp.write:
id: test_udp
data: "HELLO_UDP_TEST"
- service: send_udp_bytes
then:
- udp.write:
id: test_udp
data: [0x55, 0x44, 0x50, 0x5F, 0x42, 0x59, 0x54, 0x45, 0x53] # "UDP_BYTES"
logger:
level: DEBUG
udp:
- id: test_udp
addresses:
- "127.0.0.1"
- "127.0.0.2"
port:
listen_port: UDP_LISTEN_PORT_PLACEHOLDER
broadcast_port: UDP_BROADCAST_PORT_PLACEHOLDER
on_receive:
- logger.log:
format: "Received UDP: %d bytes"
args: [data.size()]