2020-06-17 11:28:28 +00:00
|
|
|
"""Constants for the Smappee integration."""
|
|
|
|
|
|
|
|
from datetime import timedelta
|
|
|
|
|
2021-12-04 12:43:48 +00:00
|
|
|
from homeassistant.const import Platform
|
|
|
|
|
2020-06-17 11:28:28 +00:00
|
|
|
DOMAIN = "smappee"
|
|
|
|
DATA_CLIENT = "smappee_data"
|
|
|
|
|
2020-08-10 11:34:18 +00:00
|
|
|
CONF_HOSTNAME = "hostname"
|
|
|
|
CONF_SERIALNUMBER = "serialnumber"
|
|
|
|
CONF_TITLE = "title"
|
|
|
|
|
|
|
|
ENV_CLOUD = "cloud"
|
|
|
|
ENV_LOCAL = "local"
|
2020-06-17 11:28:28 +00:00
|
|
|
|
2021-12-04 12:43:48 +00:00
|
|
|
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR, Platform.SWITCH]
|
2020-06-17 11:28:28 +00:00
|
|
|
|
2021-04-22 08:12:13 +00:00
|
|
|
SUPPORTED_LOCAL_DEVICES = ("Smappee1", "Smappee2", "Smappee50")
|
2020-08-25 22:37:53 +00:00
|
|
|
|
2020-08-10 11:34:18 +00:00
|
|
|
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=20)
|
2020-06-17 11:28:28 +00:00
|
|
|
|
2020-06-26 17:46:14 +00:00
|
|
|
AUTHORIZE_URL = {
|
|
|
|
"PRODUCTION": "https://app1pub.smappee.net/dev/v1/oauth2/authorize",
|
|
|
|
"ACCEPTANCE": "https://farm2pub.smappee.net/dev/v1/oauth2/authorize",
|
|
|
|
"DEVELOPMENT": "https://farm3pub.smappee.net/dev/v1/oauth2/authorize",
|
|
|
|
}
|
|
|
|
TOKEN_URL = {
|
|
|
|
"PRODUCTION": "https://app1pub.smappee.net/dev/v3/oauth2/token",
|
|
|
|
"ACCEPTANCE": "https://farm2pub.smappee.net/dev/v3/oauth2/token",
|
|
|
|
"DEVELOPMENT": "https://farm3pub.smappee.net/dev/v3/oauth2/token",
|
|
|
|
}
|