mirror of
https://github.com/esphome/esphome.git
synced 2026-03-03 03:08:21 -07:00
[valve] Store valve state strings in flash on ESP8266 (#12202)
This commit is contained in:
@@ -1565,7 +1565,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;
|
||||
|
||||
Reference in New Issue
Block a user