Fix withings wrong sleep state entry (#29651)

* Fixing issue where wrong sleep state entry was being used. closes #28370,#29397

* Fixing formatting.

* Sorting imports to get black checks to pass.

* Using lambda for getting latest sleep serie.
This commit is contained in:
Robert Van Gorkom authored and Pascal Vizeli committed 2019-12-10 21:54:50 +01:00
1 parent 899f6cf1a3
commit 66d2f5f61d
5 files changed
+43 -23

No files matched your search

+2 -3
View File
@@ -1,15 +1,14 @@
"""Tests for the Withings component."""
from asynctest import MagicMock
import pytest
from withings_api import WithingsApi
from withings_api.common import UnauthorizedException, TimeoutException
from withings_api.common import TimeoutException, UnauthorizedException
from homeassistant.exceptions import PlatformNotReady
from homeassistant.components.withings.common import (
NotAuthenticatedError,
WithingsDataManager,
)
from homeassistant.exceptions import PlatformNotReady
@pytest.fixture(name="withings_api")