-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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 integration fallback configuration for tado water heater fallback #111014
Use integration fallback configuration for tado water heater fallback #111014
Conversation
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.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @chiefdragon, @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
It's much better now. It would have been nice to have someone else look at it, but, in general, LGTM.
Co-authored-by: Andriy Kushnir <me@orhideous.name>
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.
Also, don't forget to remove the brackets. Should simply the code a bit.
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
still needed |
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.
Implementation looks good to me, just some minor comments which need to be addressed 👍
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.
We want tests of functionality to be in a module which matches the name of the module containing the functionality.
Either move these tests to test_init.py
, or move the overlay helper function to a module named overlay_mode.py
.
My own preference would be to move the overlay helper function to a module helper.py
or util.py
and tests in test_helper.py
or test_util.py
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.
good idea
tests/components/tado/util.py
Outdated
@@ -165,3 +165,8 @@ async def async_init_integration( | |||
if not skip_setup: | |||
await hass.config_entries.async_setup(entry.entry_id) | |||
await hass.async_block_till_done() | |||
|
|||
|
|||
def dummy_tado_connector(hass: HomeAssistant, fallback) -> HomeAssistant: |
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.
The return type annotation is incorrect.
Also, I'd suggest to move this function to the test module to make the code easier to read.
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.
Looks good to me now, thanks @ethemcemozkan!
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.
LGTM, thanks @ethemcemozkan 👍
Proposed change
Unlike the climate entity where fallback was chosen based on the integration configuration, the existing fallback logic for the Tado water heater always used the NEXT_TIME option.
This PR changes fallback logic so that the value from the integration configuration is used.
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: