1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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
2019-02-15 10:40:54 -06:00
committed by Martin Hjelmare
parent 7d0f847f83
commit 93f84a5cd1
20 changed files with 196 additions and 151 deletions

View File

@@ -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