mirror of
https://github.com/esphome/esphome.git
synced 2025-04-14 14:50:32 +01:00
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
# These substitutions allow the end user to override certain values
|
|
substitutions:
|
|
name: "lum-iot-test"
|
|
friendly_name: "Project Template"
|
|
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
type: esp-idf
|
|
|
|
esphome:
|
|
name: "${name}"
|
|
# Friendly names are used where appropriate in Home Assistant
|
|
friendly_name: "${friendly_name}"
|
|
# Automatically add the mac address to the name
|
|
# so you can use a single firmware for all devices
|
|
name_add_mac_suffix: false
|
|
|
|
# This will allow for (future) project identification,
|
|
# configuration and updates.
|
|
project:
|
|
name: LumenSoft.espnow-test
|
|
version: "1.0"
|
|
|
|
# To be able to get logs from the device via serial and api.
|
|
logger:
|
|
level: verbose
|
|
|
|
espnow:
|
|
auto_add_peer: true
|
|
peers:
|
|
- FF:FF:FF:FF:FF:FF
|
|
- 0xFFFFFFFFFFFF
|
|
- ZZZZZZZZ
|
|
on_receive:
|
|
- logger.log:
|
|
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
|