wifi:
  ssid: MySSID
  password: password1

udp:
  id: my_udp
  listen_address: 239.0.60.53
  addresses:
    - "239.0.60.53"
    - "192.168.1.255"
    - "10.0.0.255"
  on_receive:
    - logger.log:
        format: "Received %zu bytes"
        args: [data.size()]
    - udp.write:
        id: my_udp
        data: "hello world"
    - udp.write:
        id: my_udp
        data: !lambda |-
          return std::vector<uint8_t>{1,3,4,5,6};

number:
  - platform: template
    name: "UDP Number"
    id: udp_my_number
    optimistic: true
    min_value: 0
    max_value: 100
    step: 1

button:
  - platform: template
    name: "UDP Button"
    on_press:
      then:
        - udp.write:
            data: [0x01, 0x02, 0x03]
        - udp.write: !lambda |-
            return {0x10, 0x20, (uint8_t)id(udp_my_number).state};
