Skip to content

Commit

Permalink
Fix yet another config double conversion (#142)
Browse files Browse the repository at this point in the history
* Fix yet another config double conversion

* Fix unit test relying on radio library schema conversion

* Fix it for both parametrized tests
  • Loading branch information
puddly authored Aug 6, 2024
1 parent ad8f40b commit d7a1008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ async def test_gateway_initialize_bellows_thread(
) as mock_new:
zha_gw = Gateway(zha_data)
await zha_gw.async_initialize()
assert mock_new.mock_calls[-1].kwargs["config"][CONF_USE_THREAD] is thread_state
assert (
mock_new.mock_calls[-1].kwargs["config"].get(CONF_USE_THREAD, True)
is thread_state
)
await zha_gw.shutdown()


Expand Down
2 changes: 1 addition & 1 deletion zha/application/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def get_application_controller_data(self) -> tuple[ControllerApplication, dict]:
):
app_config[CONF_USE_THREAD] = False

return radio_type.controller, radio_type.controller.SCHEMA(app_config)
return radio_type.controller, app_config

@classmethod
async def async_from_config(cls, config: ZHAData) -> Self:
Expand Down

0 comments on commit d7a1008

Please sign in to comment.