1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

Merge branch 'light_bitmask' into integration

This commit is contained in:
J. Nick Koston
2025-10-18 11:10:10 -10:00
4 changed files with 6 additions and 10 deletions

View File

@@ -1564,9 +1564,9 @@ class RepeatedTypeInfo(TypeInfo):
if self._use_bitmask:
# For bitmask fields, dump the hex value of the bitmask
return (
f'out.append(" {self.field_name}: 0x");\n'
f"out.append(uint32_to_string(this->{self.field_name}));\n"
f'out.append("\\n");'
f"char buffer[64];\n"
f'snprintf(buffer, sizeof(buffer), " {self.field_name}: 0x%08" PRIX32 "\\n", this->{self.field_name});\n'
f"out.append(buffer);"
)
if self._use_pointer:
# For pointer fields, dereference and use the existing helper