1#ifndef CONSTANT_SENSOR_H_
2#define CONSTANT_SENSOR_H_
42static const char SCHEMA_CONSTANT_SENSOR[]
PROGMEM = R
"###({
45 "value": { "title": "Constant Value", "type": "number", "description": "Constant value" }
74 if (
config.containsKey(
"value")) {
77 if (
config.containsKey(
"interval")) {
virtual void load_configuration()
Base class for constant value sensors.
virtual void get_configuration(JsonObject &doc) override
ConstantSensor(T value, int send_interval=30, String config_path="")
virtual String get_config_schema() override
virtual bool set_configuration(const JsonObject &config) override
Sensor template class for any sensor producing actual values.
const uint8_t PAGE_css_bootstrap[] PROGMEM
ConstantSensor< int > IntConstantSensor
ConstantSensor< String > StringConstantSensor
ConstantSensor< float > FloatConstantSensor
ConstantSensor< bool > BoolConstantSensor