mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[packet_transport] Extract packet encoding functionality (#8187)
This commit is contained in:
		| @@ -3,34 +3,18 @@ wifi: | ||||
|   password: password1 | ||||
|  | ||||
| udp: | ||||
|   update_interval: 5s | ||||
|   encryption: "our key goes here" | ||||
|   rolling_code_enable: true | ||||
|   ping_pong_enable: true | ||||
|   id: my_udp | ||||
|   listen_address: 239.0.60.53 | ||||
|   binary_sensors: | ||||
|     - binary_sensor_id1 | ||||
|     - id: binary_sensor_id1 | ||||
|       broadcast_id: other_id | ||||
|   sensors: | ||||
|     - sensor_id1 | ||||
|     - id: sensor_id1 | ||||
|       broadcast_id: other_id | ||||
|   providers: | ||||
|     - name: some-device-name | ||||
|       encryption: "their key goes here" | ||||
|   addresses: ["239.0.60.53"] | ||||
|   on_receive: | ||||
|     - logger.log: | ||||
|         format: "Received %d 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}; | ||||
|  | ||||
| sensor: | ||||
|   - platform: template | ||||
|     id: sensor_id1 | ||||
|   - platform: udp | ||||
|     provider: some-device-name | ||||
|     id: our_id | ||||
|     remote_id: some_sensor_id | ||||
|  | ||||
| binary_sensor: | ||||
|   - platform: udp | ||||
|     provider: unencrypted-device | ||||
|     id: other_binary_sensor_id | ||||
|   - platform: template | ||||
|     id: binary_sensor_id1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user