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 Martin Hjelmare committed 2019-02-15 17:40:54 +01:00
1 parent 7d0f847f83
commit 93f84a5cd1
20 files changed
+196 -151

No files matched your search

@@ -100,19 +100,6 @@ async def test_async_setup_platform():
await climate.async_setup_platform(None, None, None)
def test_is_climate(device_factory, legacy_thermostat,
basic_thermostat, thermostat):
"""Test climate devices are correctly identified."""
other_devices = [
device_factory('Unknown', ['Unknown']),
device_factory("Switch 1", [Capability.switch])
]
for device in [legacy_thermostat, basic_thermostat, thermostat]:
assert climate.is_climate(device), device.name
for device in other_devices:
assert not climate.is_climate(device), device.name
async def test_legacy_thermostat_entity_state(hass, legacy_thermostat):
"""Tests the state attributes properly match the thermostat type."""
await setup_platform(hass, CLIMATE_DOMAIN, legacy_thermostat)