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:
Andrew Sayre authored and Paulus Schoutsen committed 2019-02-18 13:29:03 -08:00
1 parent 834d8940a8
commit 7ce18146d4
20 files changed
+198 -157

No files matched your search

@@ -65,25 +65,6 @@ async def test_async_setup_platform():
await light.async_setup_platform(None, None, None)
def test_is_light(device_factory, light_devices):
"""Test lights are correctly identified."""
non_lights = [
device_factory('Unknown', ['Unknown']),
device_factory("Fan 1",
[Capability.switch, Capability.switch_level,
Capability.fan_speed]),
device_factory("Switch 1", [Capability.switch]),
device_factory("Can't be turned off",
[Capability.switch_level, Capability.color_control,
Capability.color_temperature])
]
for device in light_devices:
assert light.is_light(device), device.name
for device in non_lights:
assert not light.is_light(device), device.name
async def test_entity_state(hass, light_devices):
"""Tests the state attributes properly match the light types."""
await _setup_platform(hass, *light_devices)