2024-10-08 11:34:50 +02:00
|
|
|
external_components:
|
|
|
|
- source: github://pr#7564
|
|
|
|
components: []
|
|
|
|
refresh: 1 sec
|
|
|
|
|
2024-07-26 16:23:36 +02:00
|
|
|
espnow:
|
|
|
|
auto_add_peer: true
|
|
|
|
peers:
|
|
|
|
- FF:FF:FF:FF:FF:FF
|
2024-11-17 21:11:35 +01:00
|
|
|
- 0xFFFFFFFFFFFF
|
|
|
|
- ZZZZZZZZ
|
2024-08-24 20:08:40 +02:00
|
|
|
on_receive:
|
2024-07-26 16:23:36 +02:00
|
|
|
- logger.log:
|
2024-11-17 21:11:35 +01:00
|
|
|
format: "Received: '%s' from '%s' command: %d RSSI: %d"
|
|
|
|
args:
|
|
|
|
[
|
|
|
|
packet.get_payload(),
|
|
|
|
packet.get_peer_code().c_str(),
|
|
|
|
packet.get_command(),
|
|
|
|
packet.rssi,
|
|
|
|
]
|
|
|
|
|
|
|
|
on_broadcast:
|
|
|
|
- command: 123
|
|
|
|
then:
|
|
|
|
- logger.log:
|
|
|
|
format: "Broadcast Received from: '%s' RSSI: %d: %s"
|
|
|
|
args:
|
|
|
|
[
|
|
|
|
packet.get_peer_code().c_str(),
|
|
|
|
packet.rssi,
|
|
|
|
packet.get_payload(),
|
|
|
|
]
|
|
|
|
|
|
|
|
interval:
|
|
|
|
- interval: 10sec
|
|
|
|
then:
|
|
|
|
- espnow.broatcast:
|
|
|
|
payload: "hallo everyone"
|
|
|
|
command: 123
|
|
|
|
- espnow.send:
|
|
|
|
payload: "hallo everyone"
|
|
|
|
command: 123
|
2024-07-26 16:23:36 +02:00
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin: GPIO39
|
|
|
|
name: Button
|
|
|
|
on_click:
|
2024-11-17 21:11:35 +01:00
|
|
|
- espnow.peer.new:
|
|
|
|
peer: kGf7Ii0t
|
|
|
|
- espnow.peer.del: kGf7Ii0t
|