1
mirror of https://github.com/home-assistant/core synced 2024-09-21 22:18:00 +02:00

Add tractive client_id, update aiotractive (#70807)

* Add client_id to Tractive

* Update aiotractive
This commit is contained in:
Gleb Sinyavskiy 2022-04-26 18:21:27 +02:00 committed by GitHub
parent 5d1e6c5905
commit cf5f0a415c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 4 deletions

View File

@ -30,6 +30,7 @@ from .const import (
ATTR_MINUTES_ACTIVE,
ATTR_TRACKER_STATE,
CLIENT,
CLIENT_ID,
DOMAIN,
RECONNECT_INTERVAL,
SERVER_UNAVAILABLE,
@ -68,7 +69,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data.setdefault(DOMAIN, {}).setdefault(entry.entry_id, {})
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:
creds = await client.authenticate()

View File

@ -13,6 +13,10 @@ ATTR_LIVE_TRACKING = "live_tracking"
ATTR_MINUTES_ACTIVE = "minutes_active"
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"
TRACKABLES = "trackables"

View File

@ -3,7 +3,7 @@
"name": "Tractive",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/tractive",
"requirements": ["aiotractive==0.5.2"],
"requirements": ["aiotractive==0.5.4"],
"codeowners": ["@Danielhiversen", "@zhulik", "@bieniu"],
"iot_class": "cloud_push",
"loggers": ["aiotractive"]

View File

@ -250,7 +250,7 @@ aioswitcher==2.0.6
aiosyncthing==0.5.1
# homeassistant.components.tractive
aiotractive==0.5.2
aiotractive==0.5.4
# homeassistant.components.unifi
aiounifi==31

View File

@ -216,7 +216,7 @@ aioswitcher==2.0.6
aiosyncthing==0.5.1
# homeassistant.components.tractive
aiotractive==0.5.2
aiotractive==0.5.4
# homeassistant.components.unifi
aiounifi==31