Commit Graph

15 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
Clyde Stubbs 6486147da1 [mipi_spi] Template code, partial buffer support (#9314)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2025-07-16 11:05:27 +10:00
Dennis Marinus 10cea51739 allow touchscreen buttons outside of display dimensions (#8296)
Co-authored-by: Dennis Marinus <dmarinus@apple.com>
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2025-03-08 10:41:54 +11:00
Jesse Hills b454f63b36 [core] Remove old style platform configuration (#8118) 2025-01-21 00:32:47 -06:00
Jesse Hills 89fd367297 YAML linting (#3779) 2022-09-06 15:48:01 +12:00
Otto Winter ac0d921413 ESP-IDF support and generic target platforms (#2303)
* Socket refactor and SSL

* esp-idf temp

* Fixes

* Echo component and noise

* Add noise API transport support

* Updates

* ESP-IDF

* Complete

* Fixes

* Fixes

* Versions update

* New i2c APIs

* Complete i2c refactor

* SPI migration

* Revert ESP Preferences migration, too complex for now

* OTA support

* Remove echo again

* Remove ssl again

* GPIOFlags updates

* Rename esphal and ICACHE_RAM_ATTR

* Make ESP32 arduino compilable again

* Fix GPIO flags

* Complete pin registry refactor and fixes

* Fixes to make test1 compile

* Remove sdkconfig file

* Ignore sdkconfig file

* Fixes in reviewing

* Make test2 compile

* Make test4 compile

* Make test5 compile

* Run clang-format

* Fix lint errors

* Use esp-idf APIs instead of btStart

* Another round of fixes

* Start implementing ESP8266

* Make test3 compile

* Guard esp8266 code

* Lint

* Reformat

* Fixes

* Fixes v2

* more fixes

* ESP-IDF tidy target

* Convert ARDUINO_ARCH_ESPxx

* Update WiFiSignalSensor

* Update time ifdefs

* OTA needs millis from hal

* RestartSwitch needs delay from hal

* ESP-IDF Uart

* Fix OTA blank password

* Allow setting sdkconfig

* Fix idf partitions and allow setting sdkconfig from yaml

* Re-add read/write compat APIs and fix esp8266 uart

* Fix esp8266 store log strings in flash

* Fix ESP32 arduino preferences not initialized

* Update ifdefs

* Change how sdkconfig change is detected

* Add checks to ci-custom and fix them

* Run clang-format

* Add esp-idf clang-tidy target and fix errors

* Fixes from clang-tidy idf round 2

* Fixes from compiling tests with esp-idf

* Run clang-format

* Switch test5.yaml to esp-idf

* Implement ESP8266 Preferences

* Lint

* Re-do PIO package version selection a bit

* Fix arduinoespressif32 package version

* Fix unit tests

* Lint

* Lint fixes

* Fix readv/writev not defined

* Fix graphing component

* Re-add all old options from core/config.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-20 11:47:51 +02:00
Guillermo Ruffino 69879920eb add-black (#1593)
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
2021-03-07 16:03:16 -03:00
Peter Kuehne 3ec9bcaed6 Feature/component test fixture (#1142) 2020-07-15 14:04:00 +02:00
Peter Kuehne 5776e70d7c Bug/fix internal flag in binary sensor (#1136) 2020-07-14 17:59:03 +02:00