esphome/components/esp32_nimble_mqtt_room/esp32_nimble_mqtt_room.h
2023-12-03 22:19:57 +03:00

24 lines
875 B
C++

#pragma once
#include "esphome/core/component.h"
#include "esphome/components/mqtt/custom_mqtt_device.h"
#include "esphome/components/nimble_distance_custom/nimble_distance_custom.h"
namespace esphome
{
namespace esp32_nimble_mqtt_room
{
class ESP32NimbleMQTTRoom :
public mqtt::CustomMQTTDevice,
public nimble_distance_custom::NimbleDistanceCustomComponent
{
protected:
std::string room_;
std::string base_topic_ = "esphome_presense";
public:
void on_result(nimble_distance_custom::NimbleDistanceCustomResult&) override;
void set_room(std::string room) { room_ = room; }
void set_base_topic(std::string base_topic) { base_topic_ = base_topic; }
};
} // namespace esp32_nimble_tracker
} // namespace esphome