Closed mvdwetering closed 3 months ago
The recent changes enhance the testing framework for sensor entities in a Home Assistant environment. A new fixture, entity_registry_enabled_by_default
, ensures that all entities are enabled during tests, improving reliability. Additionally, the integration setup has been simplified by removing the option to disable the default enabling of entities. Test cases have also been updated for clarity, reflecting improved naming conventions and standardizing the testing environment.
Files | Change Summary |
---|---|
tests/conftest.py |
Added entity_registry_enabled_by_default fixture to ensure entities are enabled during tests; removed disable_enable_default_all parameter from setup_integration function for simplification. |
tests/test_sensor.py |
Added @pytest.mark.usefixtures("entity_registry_enabled_by_default") to multiple tests; updated sensor entity names in tests for clarity and consistency. |
In a patch of code, I hop with glee,
Changes made, oh what a spree!
Fixtures in place, the registry shines,
Testing's now smooth, with clearer lines.
Sensors dance, their names refined,
A joyful leap in the code we find! 🐇✨
Summary by CodeRabbit
New Features
Bug Fixes