hass-core/homeassistant/components/smappee/const.py
bsmappee 11f121b008
Implement local discovery of Smappee series-2 devices and improvements (#38728)
* prepare local api support for Smappee2-series

* Series-2 devices are now supported

* remove switch scan_interval
2020-08-26 00:37:53 +02:00

30 lines
881 B
Python

"""Constants for the Smappee integration."""
from datetime import timedelta
DOMAIN = "smappee"
DATA_CLIENT = "smappee_data"
CONF_HOSTNAME = "hostname"
CONF_SERIALNUMBER = "serialnumber"
CONF_TITLE = "title"
ENV_CLOUD = "cloud"
ENV_LOCAL = "local"
SMAPPEE_PLATFORMS = ["binary_sensor", "sensor", "switch"]
SUPPORTED_LOCAL_DEVICES = ("Smappee1", "Smappee2")
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=20)
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",
}