esphome: name: arbeitszimmer-oben-ble-tracker esp32: board: m5stack-atom framework: type: arduino logger: ota: password: !secret ota_password wifi: ssid: WLAN password: !secret wifi_password mqtt: broker: homeassistant.fritz.box username: !secret mqtt_ble_username password: !secret mqtt_ble_password discovery: false esp32_ble_tracker: scan_parameters: interval: 1.2s window: 500ms active: false on_ble_advertise: - then: - lambda: |- auto build_json = [&](JsonObject obj) { obj["rssi"] = x.get_rssi(); obj["address"] = x.address_str(); obj["address_uint64"] = x.address_uint64(); if(x.get_tx_powers().size() > 0) obj["tx_power"] = x.get_tx_powers()[0]; }; global_mqtt_client->publish_json("my_btmonitor/raw_measurements/az_oben", build_json);