11 const String& config_path,
float output_scale)
14 read_delay{read_delay},
15 output_scale{output_scale} {
32 String
const expected[] = {
"read_delay"};
33 for (
auto str : expected) {
34 if (!config[str].is<JsonVariant>()) {
43 return R
"###({"type":"object","properties":{"read_delay":{"title":"Read delay","type":"number","description":"Number of milliseconds between each analogRead(A0)"}} })###";
virtual bool load() override
Load and populate the object from a persistent storage.
Sensor template class for any sensor producing actual values.
void emit(const T &new_value)
const String ConfigSchema(const SmartSwitchController &obj)
std::shared_ptr< reactesp::EventLoop > event_loop()
ESP32AnalogReader AnalogReader