Skip to content

Commit

Permalink
Address deprecation warning (#24)
Browse files Browse the repository at this point in the history
* address deprecation warning

* satisfy hassfest validation
  • Loading branch information
wtadler authored Mar 7, 2024
1 parent 6dbb1b8 commit 7e60708
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
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

0 comments on commit 7e60708

Please sign in to comment.