1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +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

@@ -39,26 +39,6 @@ async def test_async_setup_platform():
await fan.async_setup_platform(None, None, None)
def test_is_fan(device_factory):
"""Test fans are correctly identified."""
non_fans = [
device_factory('Unknown', ['Unknown']),
device_factory("Switch 1", [Capability.switch]),
device_factory("Non-Switchable Fan", [Capability.fan_speed]),
device_factory("Color Light",
[Capability.switch, Capability.switch_level,
Capability.color_control,
Capability.color_temperature])
]
fan_device = device_factory(
"Fan 1", [Capability.switch, Capability.switch_level,
Capability.fan_speed])
assert fan.is_fan(fan_device), fan_device.name
for device in non_fans:
assert not fan.is_fan(device), device.name
async def test_entity_state(hass, device_factory):
"""Tests the state attributes properly match the fan types."""
device = device_factory(