Add SmartThings component and switch platform (#20148)
* Added SmartThings component and switch platform * Corrected comment typos. * Embedded switch platform. * Replaced custom view usage with webhook component. * Replaced urls with tokens in strings. * Fixed line length. * Use generated webhook id instead of static one. * Reuse core constant instead of defining again. * Optimizations in anticipation of future platforms. * Use async_generate_path instead of hard-coded path. * Fixed line length. * Updates per review feedback. * Updates per latest review feedback.
This commit is contained in:
1 parent
5a0c707a37
commit
69ec7980ad
18 files changed
+1793
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Constants used by the SmartThings component and platforms."""
|
||||
import re
|
||||
|
||||
APP_OAUTH_SCOPES = [
|
||||
'r:devices:*'
|
||||
]
|
||||
APP_NAME_PREFIX = 'homeassistant.'
|
||||
CONF_APP_ID = 'app_id'
|
||||
CONF_INSTALLED_APP_ID = 'installed_app_id'
|
||||
CONF_INSTANCE_ID = 'instance_id'
|
||||
CONF_LOCATION_ID = 'location_id'
|
||||
DATA_MANAGER = 'manager'
|
||||
DATA_BROKERS = 'brokers'
|
||||
DOMAIN = 'smartthings'
|
||||
SIGNAL_SMARTTHINGS_UPDATE = 'smartthings_update'
|
||||
SIGNAL_SMARTAPP_PREFIX = 'smartthings_smartap_'
|
||||
SETTINGS_INSTANCE_ID = "hassInstanceId"
|
||||
STORAGE_KEY = DOMAIN
|
||||
STORAGE_VERSION = 1
|
||||
SUPPORTED_PLATFORMS = [
|
||||
'switch'
|
||||
]
|
||||
SUPPORTED_CAPABILITIES = [
|
||||
'colorControl',
|
||||
'colorTemperature',
|
||||
'switch',
|
||||
'switchLevel'
|
||||
]
|
||||
VAL_UID = "^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]" \
|
||||
"{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$"
|
||||
VAL_UID_MATCHER = re.compile(VAL_UID)
|
||||
Reference in new issue
Block a user