mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add Lock capability to SmartThings platform (#20977)
* Bumped pysmartthings version to 0.6.1 * Added Lock to supported platforms * Added SmartThings Lock component * Updated lock to eagerly set state * Updated requirements_all.txt & requirements_test_all.txt with pysmartthings==0.6.1 * Added SmartThings Lock tests * Removed inapplicable comment * Removed unused import (STATE_UNLOCKED) * Populated device_state_attributes with values provided by SmartThings * Condensed if_lock assertion function * Updated gathered attributes * Fixed typo * Updated tests to use new setup_platform * Updated assignment of device state attributes * Updated tests to utilise the LOCK_DOMAIN constant where suitable * Fixed false positive for Switch test: (test_unload_config_entry) * Implemented constant to contain expected SmartThings state for is_locked check * Improved allocation of State Attributes * Improved allocation of state attributes * Fixed lint error (was running lint checks against the wrong file, whoops) * Added test for unloading lock config * Use isinstance instead of type() * Updated device state to explicitly check for is not None instead of a truthy value
This commit is contained in:
@@ -23,6 +23,7 @@ SUPPORTED_PLATFORMS = [
|
||||
'climate',
|
||||
'fan',
|
||||
'light',
|
||||
'lock',
|
||||
'sensor',
|
||||
'switch'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user