Commit Graph

9 Commits

Author SHA1 Message Date
J. Nick Koston 41c413d5f7 Move extract_packed_value to shared component test helper
Add tests/component_tests/helpers.py with typed extract_packed_value()
and INTERNAL_BIT constant, replacing 5 duplicate copies.
2026-03-06 10:56:51 -10:00
J. Nick Koston c704d97804 Strengthen internal flag assertions in component tests
All internal-flag tests now extract the packed value and verify
bit 24 is set/clear for the correct entities, instead of just
checking configure_entity_() call presence.
2026-03-06 10:54:19 -10:00
J. Nick Koston 7117ded6b6 [core] Pack entity flags into configure_entity_() and protect setters
Move set_internal(), set_disabled_by_default(), set_entity_category(),
and set_device() to protected on EntityBase. These were codegen-only
setters never intended for runtime use.

internal, disabled_by_default, and entity_category are now packed into
the existing configure_entity_() uint32 parameter alongside string
indices, eliminating up to 3 separate function calls per entity.

set_device() is renamed to set_device_() per protected naming convention
and remains a separate call (pointer can't be packed).

Entity category integer mapping is derived from cv.ENTITY_CATEGORIES
to stay in sync with the C++ enum automatically.
2026-03-06 09:35:30 -10:00
J. Nick Koston 6b53ccc85a make it safer 2026-03-06 07:39:49 -10:00
J. Nick Koston c0873973c1 fix component tests to match configure_entity codegen
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:53:27 -10:00
J. Nick Koston 3cc6810be5 [core] Remove object_id RAM storage - no longer in hot path after #12627 (#12631) 2026-01-02 15:46:01 -10:00
J. Nick Koston cf8c205644 [core] Reduce flash size by combining set_name() and set_object_id() calls (#11941) 2025-11-25 12:15:45 -06:00
Jesse Hills b4c2433bac Run black over tests folder (#4824) 2023-05-15 16:09:56 +12:00
William Charlton f0b183a552 Wake-on-LAN button (#3030)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: William Charlton <will.charlton1@icloud.com>
2022-01-23 00:13:46 +13:00