1
0
mirror of https://github.com/ratgdo/esphome-ratgdo.git synced 2025-03-03 12:29:54 +00:00

24 lines
431 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();
});
}
};
}
}