Skip to content

Fix build on ESPHome 2026.10 (non-copyable NDEF records) - #306

Open
nsleigh wants to merge 1 commit into
adonno:masterfrom
nsleigh:fix-esphome-2026-10-get-records
Open

nsleigh wants to merge 1 commit into
adonno:masterfrom
nsleigh:fix-esphome-2026-10-get-records

Conversation

@nsleigh

@nsleigh nsleigh commented Oct 21, 2026

Copy link
Copy Markdown

Since ESPHome 2026.10.0 the tag reader fails to compile:

tagreader.yaml:263:45: error: use of deleted function 'esphome::StaticVector<std::unique_ptr<esphome::nfc::NdefRecord>, 4>::StaticVector(const esphome::StaticVector<std::unique_ptr<esphome::nfc::NdefRecord>, 4>&)'
  263 |           auto records = message->get_records();

NdefMessage::get_records() now returns a StaticVector of std::unique_ptr<NdefRecord>, which is non-copyable, so auto records = ... no longer compiles. This binds it by reference instead (auto &records). The loop body is unchanged.

Tested: builds and runs on a D1 mini (ESP8266) with ESPHome 2026.10.0.

🤖 Generated with Claude Code

ESPHome 2026.10 returns NDEF records as a StaticVector of unique_ptr,
which cannot be copied. Bind get_records() by reference instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@bachp bachp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I can confirm this fixes the issue with 2026.10

@davidlav

davidlav commented Nov 3, 2026

Copy link
Copy Markdown

Thanks for the fantastic library! It would be great if this could be merged so we could continue to use it.

This branch has not been deployed

No deployments
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.

3 participants