-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Add Ituran integration #129067
base: dev
Are you sure you want to change the base?
Add Ituran integration #129067
Conversation
f56ad43
to
078b20b
Compare
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
078b20b
to
b40b644
Compare
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.
@joostlek thank you for the prompt review!
I've made the requested changes and responded to your questions. Please let me know if you'd like me to change anything else.
b40b644
to
1398987
Compare
Hey @joostlek, have you had a chance to look at my updates? Is there anything else you'd like me to change? Thanks! |
1398987
to
ba3b977
Compare
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.
Hey @zweckj, thanks for your review. I changed some things according to your review but there were a few follow-up questions. Please let me know if you'd like me to change anything else
ba3b977
to
347d2aa
Compare
@zweckj I finished addressing your latest review comments. Please let me know if there's anything else. Thanks in advance! BTW - There's a test here that fails but I don't think it's related to any of my changes. |
347d2aa
to
874ff3b
Compare
@zweckj I fixed the tests as best as I could. Now might be a good time to state the I have no idea what I'm doing :) Please let me know if there's anything else I can do to get this approved |
df92c17
to
12bee73
Compare
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.
I think your tests need some more work. I'd suggest to take a look at some other integrations, e.g. lamarzocco, or palazetti for a shorter one
12bee73
to
1653ce4
Compare
I rewrote the tests, highly inspired by the Thanks again for all the guidance, learning a lot (and more than I bargained for 😄) |
1653ce4
to
7268fa2
Compare
7268fa2
to
6332085
Compare
common-modules: done | ||
docs-high-level-description: done | ||
docs-installation-instructions: done | ||
docs-removal-instructions: todo |
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.
you'll need to add that to your docs PR because you'll need to reach Bronze with this PR
"config": { | ||
"step": { | ||
"user": { | ||
"data": { |
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.
those and otp are missing data_descriptions
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.
I feel like the user step strings are descriptive enough as is. For the OTP I can add a description to wait for a text message or something
await __do_successful_otp_step(hass, result3, mock_ituran) | ||
|
||
|
||
async def test_cannot_connect( |
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.
you should be at a minimum able to group the tests that have side effects on otp usung parametrized tests (@pytest.mark.parametrize(
), but probably even all failure tests with
func = getattr(mock_ituran, "authenticate")
func.side_effect = IturanApiError
oh and i'd also at least a snapshot test for your platform, this can be done quickly with the helper |
Proposed change
This PR implements a new integration for the Ituran vehicle tracking service. It currently adds a
device_tracker
platform and, once merged, I will add a couple of sensors as well.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
.To help with the load of incoming pull requests: