mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add sensorname console command
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#define EMSESP_SETTINGS_SERVICE_PATH "/rest/emsespSettings"
|
||||
#define EMSESP_BOARD_PROFILE_SERVICE_PATH "/rest/boardProfile"
|
||||
|
||||
#define NUM_SENSOR_NAMES 10
|
||||
|
||||
namespace emsesp {
|
||||
|
||||
enum { BOOL_FORMAT_ONOFF = 1, BOOL_FORMAT_ONOFF_CAP, BOOL_FORMAT_TRUEFALSE, BOOL_FORMAT_10 }; // matches Web UI settings
|
||||
@@ -63,6 +65,12 @@ class WebSettings {
|
||||
uint8_t bool_format;
|
||||
uint8_t enum_format;
|
||||
|
||||
struct {
|
||||
String id;
|
||||
String name;
|
||||
int16_t offset;
|
||||
} sensor[NUM_SENSOR_NAMES];
|
||||
|
||||
static void read(WebSettings & settings, JsonObject & root);
|
||||
static StateUpdateResult update(JsonObject & root, WebSettings & settings);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user