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:
1 parent
899f6cf1a3
commit
66d2f5f61d
5 files changed
+43
-23
No files matched your search
@@ -1,4 +1,5 @@
|
||||
"""Common code for Withings."""
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
import datetime
|
||||
from functools import partial
|
||||
import logging
|
||||
@@ -6,15 +7,14 @@ import re
|
||||
import time
|
||||
from typing import Any, Dict
|
||||
|
||||
from asyncio import run_coroutine_threadsafe
|
||||
import requests
|
||||
from withings_api import (
|
||||
AbstractWithingsApi,
|
||||
SleepGetResponse,
|
||||
MeasureGetMeasResponse,
|
||||
SleepGetResponse,
|
||||
SleepGetSummaryResponse,
|
||||
)
|
||||
from withings_api.common import UnauthorizedException, AuthFailedException
|
||||
from withings_api.common import AuthFailedException, UnauthorizedException
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
Reference in new issue
Block a user