diff --git a/esphome/components/esphome/ota/ota_esphome.cpp b/esphome/components/esphome/ota/ota_esphome.cpp index a3d8897969..f640c0113b 100644 --- a/esphome/components/esphome/ota/ota_esphome.cpp +++ b/esphome/components/esphome/ota/ota_esphome.cpp @@ -189,7 +189,9 @@ static constexpr uint8_t CLIENT_NOISE_FEATURES = static constexpr uint8_t SERVER_FEATURE_SUPPORTS_COMPRESSION = 0x01; static constexpr uint8_t SERVER_FEATURE_SUPPORTS_PARTITION_ACCESS = 0x02; static constexpr uint8_t SERVER_FEATURE_SUPPORTS_NOISE = 0x04; -// The device inflates a raw deflate stream (window <= OTA_INFLATE_WINDOW_SIZE) +// The device inflates a raw deflate stream (window <= OTA_INFLATE_WINDOW_SIZE). +// The offer is binding: a client that asked for it must then send the inflated +// size frame and a deflate stream, the device does not check again. static constexpr uint8_t SERVER_FEATURE_SUPPORTS_DEFLATE = 0x08; inline bool ESPHomeOTAComponent::extended_proto_() const { diff --git a/esphome/espota2.py b/esphome/espota2.py index 36a9b76659..d9b09ef534 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -70,6 +70,8 @@ CLIENT_FEATURE_SUPPORTS_DEFLATE = 0x10 SERVER_FEATURE_SUPPORTS_COMPRESSION = 0x01 SERVER_FEATURE_SUPPORTS_PARTITION_ACCESS = 0x02 SERVER_FEATURE_SUPPORTS_NOISE = 0x04 +# Binding once offered: the device then expects the image size frame and a +# deflate stream, so there is no opting out per upload SERVER_FEATURE_SUPPORTS_DEFLATE = 0x08 # Window of the raw deflate stream sent to a device that inflates on the fly.