J. Nick Koston 0932dc2ad8
openings
2023-06-09 17:36:56 -05:00

22 lines
482 B
C++

#include "ratgdo_sensor.h"
#include "../ratgdo_state.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ratgdo {
static const char* const TAG = "ratgdo.sensor";
void RATGDOSensor::dump_config()
{
LOG_SENSOR("", "RATGDO Sensor", this);
ESP_LOGCONFIG(TAG, " Type: Openings");
}
void RATGDOSensor::on_openings_change(uint32_t openings)
{
this->publish_state(openings);
}
} // namespace ratgdo
} // namespace esphome