add SM10 solar values and commands

This commit is contained in:
MichaelDvP
2021-05-10 14:13:37 +02:00
parent fd9ac28254
commit 28068bdb98
8 changed files with 239 additions and 42 deletions

View File

@@ -58,6 +58,7 @@ void WebSettings::read(WebSettings & settings, JsonObject & root) {
root["notoken_api"] = settings.notoken_api;
root["analog_enabled"] = settings.analog_enabled;
root["pbutton_gpio"] = settings.pbutton_gpio;
root["solar_maxflow"] = settings.solar_maxflow;
root["board_profile"] = settings.board_profile;
}
@@ -169,7 +170,8 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
settings.master_thermostat = root["master_thermostat"] | EMSESP_DEFAULT_MASTER_THERMOSTAT;
// doesn't need any follow-up actions
settings.notoken_api = root["notoken_api"] | EMSESP_DEFAULT_NOTOKEN_API;
settings.notoken_api = root["notoken_api"] | EMSESP_DEFAULT_NOTOKEN_API;
settings.solar_maxflow = root["solar_maxflow"] | EMSESP_DEFAULT_SOLAR_MAXFLOW;
return StateUpdateResult::CHANGED;
}