Add config flow to Switchbot (#50653)

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
RenierM26 2021-09-18 21:25:05 +02:00 committed by GitHub
parent f31b9eae61
commit 3ce8109e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 978 additions and 48 deletions

View file

@ -0,0 +1,24 @@
"""Constants for the switchbot integration."""
DOMAIN = "switchbot"
MANUFACTURER = "switchbot"
# Config Attributes
ATTR_BOT = "bot"
DEFAULT_NAME = "Switchbot"
# Config Defaults
DEFAULT_RETRY_COUNT = 3
DEFAULT_RETRY_TIMEOUT = 5
DEFAULT_TIME_BETWEEN_UPDATE_COMMAND = 60
DEFAULT_SCAN_TIMEOUT = 5
# Config Options
CONF_TIME_BETWEEN_UPDATE_COMMAND = "update_time"
CONF_RETRY_COUNT = "retry_count"
CONF_RETRY_TIMEOUT = "retry_timeout"
CONF_SCAN_TIMEOUT = "scan_timeout"
# Data
DATA_COORDINATOR = "coordinator"
BTLE_LOCK = "btle_lock"
COMMON_OPTIONS = "common_options"