| 122 | sendPutRequest("/config", nlohmann::json {{"alert", alertStr}}, CURRENT_FILE_INFO); |
| 123 | } |
| 124 | bool Sensor::hasReachable() const |
| 125 | { |
| 126 | return state.getValue().at("config").count("reachable") != 0; |
| 127 | } |
| 128 | bool Sensor::isReachable() const |
| 129 | { |
| 130 | // If not present, always assume it is reachable (for daylight sensor) |