-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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 Traccar server integration #109002
Add Traccar server integration #109002
Conversation
hass.data.setdefault(DOMAIN, {}) | ||
hass.data[DOMAIN][entry.entry_id] = coordinator |
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.
hass.data.setdefault(DOMAIN, {}) | |
hass.data[DOMAIN][entry.entry_id] = coordinator | |
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator |
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.
This is as provided in the scaffolding https://github.com/home-assistant/core/blob/dev/script/scaffold/templates/config_flow/integration/__init__.py#L18-L22
"skip_accuracy_filter_for": "Position skip filter for attributes", | ||
"custom_attributes": "Custom attributes", | ||
"events": "Events" |
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.
Would it maybe be nice to add data_description
fields to explain a bit more what something is?
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.
result = await hass.config_entries.options.async_init(config_entry.entry_id) | ||
|
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.
result = await hass.config_entries.options.async_init(config_entry.entry_id) | |
result = await hass.config_entries.options.async_init(config_entry.entry_id) | |
assert result["type"] == FlowResultType.FORM | |
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.
This is implied, the rest of this test would fail if it is not a form.
assert await hass.config_entries.async_setup(config_entry.entry_id) | ||
|
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 don't think you have to necessarily setup the entry to check for already_configured.
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.
Probably not, but it does not hurt.
Co-authored-by: Joost Lekkerkerker <[email protected]>
# This goes against two of the HA core guidelines: | ||
# 1. Event names should be prefixed with the domain name of the integration | ||
# 2. This should be event entities | ||
# However, to not break it for those who currently use the "old" integration, this is kept as is. |
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.
Please break long comments around max 88 characters per line.
Proposed change
The current
traccar
integration handles both connections from the client, and connections to the server.This PR adds a new integration to handle the server part.
This is the first PR in a series that will eventually move all the handling of server communication out of the current integration but with the rules for making PRs, that has to be split.
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: