-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use setup_test_component_platform
helper for switch entity component tests instead of hass.components
#114305
Use setup_test_component_platform
helper for switch entity component tests instead of hass.components
#114305
Conversation
…t tests instead of `hass.components`
Hey there @Shulyaka, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
@@ -42,8 +42,8 @@ async def async_turn_off(hass, entity_id=ENTITY_MATCH_ALL): | |||
await hass.services.async_call(DOMAIN, SERVICE_TURN_OFF, data, blocking=True) | |||
|
|||
|
|||
def get_mock_switch_entities() -> list[MockToggleEntity]: | |||
"""Return a list of mock switch entities.""" | |||
def get_mock_toggle_entities() -> list[MockToggleEntity]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we should change this to use actual SwitchEntity instead, since that's what the switch platform uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely, I'll have a look when I've finished removing hass.components
.
0a15df9
to
aa67231
Compare
Proposed change
Make use of the
setup_test_component_platform
helperswitch
entity component tests,generic_thermostat
andgerneric_hygrostat
tests instead of a custom component intesting_config
. Main reason for this is to get rid of the deprecatedhass.components
use.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: