feat: initial commit
This commit is contained in:
commit
e436fafd9e
13 changed files with 812 additions and 0 deletions
23
custom_components/two_gis_weather/const.py
Normal file
23
custom_components/two_gis_weather/const.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from homeassistant.const import Platform
|
||||
|
||||
|
||||
DOMAIN = "two_gis_weather"
|
||||
PLATFORMS: list[Platform] = [Platform.WEATHER, Platform.SENSOR]
|
||||
|
||||
API_BASE = "https://mobile-weather.api.2gis.ru/api/1.0"
|
||||
DEFAULT_USER_AGENT = "2gis/4.0 v4-iphone/7.13.1 (iPhone17,1; iOS 26.0.1; V2:37d4101b-dca7-42a2-ae41-fdc69d122794) application"
|
||||
REQUEST_TIMEOUT = 10
|
||||
|
||||
DEFAULT_UPDATE_INTERVAL = timedelta(minutes=10)
|
||||
|
||||
CONF_API_KEY = "api_key"
|
||||
CONF_NAME = "name"
|
||||
CONF_LATITUDE = "latitude"
|
||||
CONF_LONGITUDE = "longitude"
|
||||
CONF_LANGUAGE = "language"
|
||||
CONF_UPDATE_INTERVAL = "update_interval"
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue