Skip to content
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

Address deprecated SOURCE_TYPE_GPS constant #24

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions custom_components/leafspy/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ATTR_LONGITUDE,
ATTR_BATTERY_LEVEL,
)
from homeassistant.components.device_tracker.const import SOURCE_TYPE_GPS
from homeassistant.components.device_tracker.const import SourceType
from homeassistant.components.device_tracker.config_entry import (
TrackerEntity
)
Expand Down Expand Up @@ -118,7 +118,7 @@ def should_poll(self):
@property
def source_type(self):
"""Return the source type of the car."""
return SOURCE_TYPE_GPS
return SourceType.GPS

@property
def device_info(self):
Expand Down
10 changes: 5 additions & 5 deletions custom_components/leafspy/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"domain": "leafspy",
"name": "Leaf Spy",
"codeowners": ["@jesserockz"],
"config_flow": true,
"dependencies": ["http"],
"documentation": "https://github.com/jesserockz/ha-leafspy/blob/master/README.md",
"iot_class": "local_push",
"issue_tracker": "https://github.com/jesserockz/ha-leafspy/issues",
"requirements": [],
"dependencies": ["http"],
"codeowners": ["@jesserockz"],
"config_flow": true,
"version": "0.2.0",
"iot_class": "local_push"
"version": "0.2.0"
}
4 changes: 2 additions & 2 deletions custom_components/leafspy/strings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"config": {
"abort": {
"one_instance_allowed": "Only a single instance is necessary."
"one_instance_allowed": "You may have only one instance of Leaf Spy installed, and you appear to have installed one already."
},
"create_entry": {
"default": "\n\nOpen the Leaf Spy app, go to `'Menu'` -> `'Settings'` and scroll down to `'Server'`. \nChange the following settings:\n - `'Enable'`: Yes\n - `'Send Interval'` can be whatever you prefer.\n - `'ID'`: `'<Car Name>'`\n - `'PW'`: {secret}\n - `'Http'` or `'Https'` depending on the access to your Home Assistant install.\n - `'URL'`: {url} - Note: **Do not** add http or https to the URL."
"default": "\n\nOpen the Leaf Spy app, go to `'Menu'` -> `'Settings'` and scroll down to `'Server'`. \nChange the following settings:\n - `'Enable'`: Yes\n - `'Send Interval'` can be whatever you prefer.\n - `'ID'`: `'(Car Name)'`\n - `'PW'`: {secret}\n - `'Http'` or `'Https'` depending on the access to your Home Assistant install.\n - `'URL'`: {url} - Note: **Do not** add http or https to the URL."
},
"step": {
"user": {
Expand Down
4 changes: 2 additions & 2 deletions custom_components/leafspy/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"config": {
"abort": {
"one_instance_allowed": "Only a single instance is necessary."
"one_instance_allowed": "You may have only one instance of Leaf Spy installed, and you appear to have installed one already."
},
"create_entry": {
"default": "\n\nOpen the Leaf Spy app, go to `'Menu'` -> `'Settings'` and scroll down to `'Server'`. \nChange the following settings:\n - `'Enable'`: Yes\n - `'Send Interval'` can be whatever you prefer.\n - `'ID'`: `'<Car Name>'`\n - `'PW'`: {secret}\n - `'Http'` or `'Https'` depending on the access to your Home Assistant install.\n - `'URL'`: {url} - Note: **Do not** add http or https to the URL."
"default": "\n\nOpen the Leaf Spy app, go to `'Menu'` -> `'Settings'` and scroll down to `'Server'`. \nChange the following settings:\n - `'Enable'`: Yes\n - `'Send Interval'` can be whatever you prefer.\n - `'ID'`: `'(Car Name)'`\n - `'PW'`: {secret}\n - `'Http'` or `'Https'` depending on the access to your Home Assistant install.\n - `'URL'`: {url} - Note: **Do not** add http or https to the URL."
},
"step": {
"user": {
Expand Down
Loading