From 91219375e1af9552d35261ff1d3ac5538fccc444 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 26 Jun 2026 08:41:49 +0000 Subject: [PATCH] [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. --- esphome/components/web_server/web_server.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/web_server/web_server.cpp b/esphome/components/web_server/web_server.cpp index cdb8544fbb4..b76a384d566 100644 --- a/esphome/components/web_server/web_server.cpp +++ b/esphome/components/web_server/web_server.cpp @@ -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); }