Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Nov 7, 2025

Summary

Adds blog post documenting breaking changes in Climate entity class (esphome/esphome#11466 and esphome/esphome#11621).

Breaking changes:

  • Enum trait storage changed from std::set<EnumType> to FiniteSetMask (~440 bytes heap saved per climate)
  • Custom modes changed from std::vector<std::string> to std::vector<const char*> (~48 bytes per ClimateCall)
  • Custom mode members now private, must use accessor methods and protected setters
  • add_supported_custom_*() removed, use set_supported_custom_*() instead

Blog post includes complete migration guide, API compatibility notes, lifetime safety patterns, and grep commands.

Also includes .authors.yml update (bdraco) since #66 and #67 haven't merged yet.

@netlify
Copy link

netlify bot commented Nov 7, 2025

Deploy Preview for esphome-dev-docs ready!

Name Link
🔨 Latest commit 25576d0
🔍 Latest deploy log https://app.netlify.com/projects/esphome-dev-docs/deploys/690e1c34cbe99f0008a1296d
😎 Deploy Preview https://deploy-preview-68--esphome-dev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bdraco bdraco marked this pull request as ready for review November 7, 2025 16:49
Copilot AI review requested due to automatic review settings November 7, 2025 16:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive blog post documenting breaking changes to ESPHome's Climate entity class in version 2025.11.0, focusing on memory optimization through the use of FiniteSetMask and flash storage for custom modes.

Key Changes:

  • Documents the transition from std::set to FiniteSetMask for climate trait enums, saving ~440 bytes heap per entity
  • Explains the migration from heap-allocated std::string to flash-stored const char* for custom modes
  • Provides detailed migration guide with code examples for external component developers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/blog/posts/2025-11-07-climate-entity-optimizations.md Comprehensive blog post documenting breaking API changes and migration steps for Climate entity optimizations
docs/blog/.authors.yml Adds bdraco (J. Nick Koston) as a blog author

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants