Marius Muja bd36a7e6a3
Make storing persistent state the resposibility of ratgdo_number (#30)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-07-07 12:56:12 -10:00

23 lines
430 B
C++

#pragma once
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "ratgdo.h"
namespace esphome {
namespace ratgdo {
class SyncFailed : public Trigger<> {
public:
explicit SyncFailed(RATGDOComponent* parent)
{
parent->subscribe_sync_failed([this](bool state) {
if (state)
this->trigger();
});
}
};
}
}