Compare commits

...

1 Commits

Author SHA1 Message Date
Franck Nijhof 91219375e1 [web_server] Include assumed_state in cover detail=all JSON
cover_json_() did not serialize the assumed_state flag in the DETAIL_ALL
JSON, unlike switch_json_() which already emits it. Consumers of the web
server JSON/SSE API could not tell whether a cover's state is assumed,
causing a web vs native-API inconsistency (the native API exposes the
flag, so Home Assistant behaves correctly, but the web UI does not).

Emit assumed_state from the cover's traits, matching the switch.
2026-06-26 08:41:49 +00:00
@@ -1079,6 +1079,7 @@ json::SerializationBuffer<> WebServer::cover_json_(cover::Cover *obj, JsonDetail
if (obj->get_traits().get_supports_tilt())
root[ESPHOME_F("tilt")] = obj->tilt;
if (start_config == DETAIL_ALL) {
root[ESPHOME_F("assumed_state")] = obj->get_traits().get_is_assumed_state();
this->add_sorting_info_(root, obj);
}