SmartThings Component Enhancements/Fixes (#21085)
* Improve component setup error logging/notification * Prevent capabilities from being represented my multiple platforms * Improved logging of received updates * Updates based on review feedback
This commit is contained in:
1 parent
7d0f847f83
commit
93f84a5cd1
20 files changed
+196
-151
No files matched your search
@@ -35,23 +35,6 @@ async def test_async_setup_platform():
|
||||
await switch.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
def test_is_switch(device_factory):
|
||||
"""Test switches are correctly identified."""
|
||||
switch_device = device_factory('Switch', [Capability.switch])
|
||||
non_switch_devices = [
|
||||
device_factory('Light', [Capability.switch, Capability.switch_level]),
|
||||
device_factory('Fan', [Capability.switch, Capability.fan_speed]),
|
||||
device_factory('Color Light', [Capability.switch,
|
||||
Capability.color_control]),
|
||||
device_factory('Temp Light', [Capability.switch,
|
||||
Capability.color_temperature]),
|
||||
device_factory('Unknown', ['Unknown']),
|
||||
]
|
||||
assert switch.is_switch(switch_device)
|
||||
for non_switch_device in non_switch_devices:
|
||||
assert not switch.is_switch(non_switch_device)
|
||||
|
||||
|
||||
async def test_entity_and_device_attributes(hass, device_factory):
|
||||
"""Test the attributes of the entity are correct."""
|
||||
# Arrange
|
||||
|
||||
Reference in new issue
Block a user