1#ifndef SENSESP_SRC_SENSESP_TRANSFORMS_ENABLE_H_
2#define SENSESP_SRC_SENSESP_TRANSFORMS_ENABLE_H_
8static const char ENABLE_TRANSFORM_SCHEMA[]
PROGMEM = R
"({
11 "enabled": { "type": "boolean", "title": "Enable", "description": "Enable or disable the transform output" }
27 Enable(
bool enabled =
true, String config_path =
"")
29 this->enabled_ = enabled;
32 virtual void set(
const T& input)
override {
38 doc[
"enabled"] = enabled_;
41 if (config[
"enabled"].is<bool>()) {
42 enabled_ = config[
"enabled"];
49 return FPSTR(ENABLE_TRANSFORM_SCHEMA);
virtual void load_configuration()
On/off switch for signals: input is emitted as-is if the enable flag is set in the web UI.
Enable(bool enabled=true, String config_path="")
virtual bool set_configuration(const JsonObject &config) override
virtual void get_configuration(JsonObject &doc) override
virtual void set(const T &input) override
virtual String get_config_schema() override
void emit(const T &new_value)
const uint8_t PAGE_css_bootstrap[] PROGMEM