mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Add tractive client_id, update aiotractive (#70807)
* Add client_id to Tractive * Update aiotractive
This commit is contained in:
parent
5d1e6c5905
commit
cf5f0a415c
@ -30,6 +30,7 @@ from .const import (
|
|||||||
ATTR_MINUTES_ACTIVE,
|
ATTR_MINUTES_ACTIVE,
|
||||||
ATTR_TRACKER_STATE,
|
ATTR_TRACKER_STATE,
|
||||||
CLIENT,
|
CLIENT,
|
||||||
|
CLIENT_ID,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
RECONNECT_INTERVAL,
|
RECONNECT_INTERVAL,
|
||||||
SERVER_UNAVAILABLE,
|
SERVER_UNAVAILABLE,
|
||||||
@ -68,7 +69,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
hass.data.setdefault(DOMAIN, {}).setdefault(entry.entry_id, {})
|
hass.data.setdefault(DOMAIN, {}).setdefault(entry.entry_id, {})
|
||||||
|
|
||||||
client = aiotractive.Tractive(
|
client = aiotractive.Tractive(
|
||||||
data[CONF_EMAIL], data[CONF_PASSWORD], session=async_get_clientsession(hass)
|
data[CONF_EMAIL],
|
||||||
|
data[CONF_PASSWORD],
|
||||||
|
session=async_get_clientsession(hass),
|
||||||
|
client_id=CLIENT_ID,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
creds = await client.authenticate()
|
creds = await client.authenticate()
|
||||||
|
@ -13,6 +13,10 @@ ATTR_LIVE_TRACKING = "live_tracking"
|
|||||||
ATTR_MINUTES_ACTIVE = "minutes_active"
|
ATTR_MINUTES_ACTIVE = "minutes_active"
|
||||||
ATTR_TRACKER_STATE = "tracker_state"
|
ATTR_TRACKER_STATE = "tracker_state"
|
||||||
|
|
||||||
|
# This client ID was issued by Tractive specifically for Home Assistant.
|
||||||
|
# Please do not use it anywhere else.
|
||||||
|
CLIENT_ID = "625e5349c3c3b41c28a669f1"
|
||||||
|
|
||||||
CLIENT = "client"
|
CLIENT = "client"
|
||||||
TRACKABLES = "trackables"
|
TRACKABLES = "trackables"
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "Tractive",
|
"name": "Tractive",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tractive",
|
"documentation": "https://www.home-assistant.io/integrations/tractive",
|
||||||
"requirements": ["aiotractive==0.5.2"],
|
"requirements": ["aiotractive==0.5.4"],
|
||||||
"codeowners": ["@Danielhiversen", "@zhulik", "@bieniu"],
|
"codeowners": ["@Danielhiversen", "@zhulik", "@bieniu"],
|
||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"loggers": ["aiotractive"]
|
"loggers": ["aiotractive"]
|
||||||
|
@ -250,7 +250,7 @@ aioswitcher==2.0.6
|
|||||||
aiosyncthing==0.5.1
|
aiosyncthing==0.5.1
|
||||||
|
|
||||||
# homeassistant.components.tractive
|
# homeassistant.components.tractive
|
||||||
aiotractive==0.5.2
|
aiotractive==0.5.4
|
||||||
|
|
||||||
# homeassistant.components.unifi
|
# homeassistant.components.unifi
|
||||||
aiounifi==31
|
aiounifi==31
|
||||||
|
@ -216,7 +216,7 @@ aioswitcher==2.0.6
|
|||||||
aiosyncthing==0.5.1
|
aiosyncthing==0.5.1
|
||||||
|
|
||||||
# homeassistant.components.tractive
|
# homeassistant.components.tractive
|
||||||
aiotractive==0.5.2
|
aiotractive==0.5.4
|
||||||
|
|
||||||
# homeassistant.components.unifi
|
# homeassistant.components.unifi
|
||||||
aiounifi==31
|
aiounifi==31
|
||||||
|
Loading…
x
Reference in New Issue
Block a user