[valve] Store valve state strings in flash on ESP8266

This commit is contained in:
J. Nick Koston
2025-11-29 22:44:01 -06:00
parent a54a0e54b2
commit 87ab10b8dc
4 changed files with 20 additions and 14 deletions
+2 -1
View File
@@ -1564,7 +1564,8 @@ std::string WebServer::valve_json(valve::Valve *obj, JsonDetail start_config) {
set_json_icon_state_value(root, obj, "valve", obj->is_fully_closed() ? "CLOSED" : "OPEN", obj->position,
start_config);
root["current_operation"] = valve::valve_operation_to_str(obj->current_operation);
char buf[PSTR_LOCAL_SIZE];
root["current_operation"] = PSTR_LOCAL(valve::valve_operation_to_str(obj->current_operation));
if (obj->get_traits().get_supports_position())
root["position"] = obj->position;