10 const char* sk_sync_paths[])
12 if (sk_sync_paths != NULL) {
15 while (strlen(sk_sync_paths[i]) > 0) {
31 JsonArray jPaths = root[
"sync_paths"].to<JsonArray>();
33 jPaths.add(path.sk_sync_path_);
39 JsonArray arr = config[
"sync_paths"];
42 for (String sk_path : arr) {
54 : sk_sync_path_{sk_sync_path} {
55 ESP_LOGD(__FILENAME__,
"DoubleClick will also sync %s", sk_sync_path.c_str());
56 this->
put_request_ = std::make_shared<BoolSKPutRequest>(sk_sync_path,
"",
false);
virtual bool load() override
Load and populate the object from a persistent storage.
Used to store configuration internally.
std::shared_ptr< BoolSKPutRequest > put_request_
virtual bool to_json(JsonObject &doc) override
std::set< SyncPath > sync_paths_
virtual bool from_json(const JsonObject &config) override
SmartSwitchController(bool auto_initialize=true, String config_path="", const char *sk_sync_paths[]=NULL)
void emit(const bool &new_value)
std::shared_ptr< reactesp::EventLoop > event_loop()