mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Rename Withings coordinator file (#100899)
Rename common.py to coordinator.py
This commit is contained in:
parent
249e20f8e5
commit
b0a7e68984
@ -36,8 +36,8 @@ from homeassistant.helpers.typing import ConfigType
|
|||||||
|
|
||||||
from . import const
|
from . import const
|
||||||
from .api import ConfigEntryWithingsApi
|
from .api import ConfigEntryWithingsApi
|
||||||
from .common import WithingsDataUpdateCoordinator
|
|
||||||
from .const import CONF_USE_WEBHOOK, CONFIG, LOGGER
|
from .const import CONF_USE_WEBHOOK, CONFIG, LOGGER
|
||||||
|
from .coordinator import WithingsDataUpdateCoordinator
|
||||||
|
|
||||||
DOMAIN = const.DOMAIN
|
DOMAIN = const.DOMAIN
|
||||||
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
PLATFORMS = [Platform.BINARY_SENSOR, Platform.SENSOR]
|
||||||
|
@ -14,8 +14,8 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .common import WithingsDataUpdateCoordinator
|
|
||||||
from .const import DOMAIN, Measurement
|
from .const import DOMAIN, Measurement
|
||||||
|
from .coordinator import WithingsDataUpdateCoordinator
|
||||||
from .entity import WithingsEntity, WithingsEntityDescription
|
from .entity import WithingsEntity, WithingsEntityDescription
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ from homeassistant.helpers.device_registry import DeviceInfo
|
|||||||
from homeassistant.helpers.entity import EntityDescription
|
from homeassistant.helpers.entity import EntityDescription
|
||||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
|
||||||
from .common import WithingsDataUpdateCoordinator
|
|
||||||
from .const import DOMAIN, Measurement
|
from .const import DOMAIN, Measurement
|
||||||
|
from .coordinator import WithingsDataUpdateCoordinator
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -23,7 +23,6 @@ from homeassistant.const import (
|
|||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .common import WithingsDataUpdateCoordinator
|
|
||||||
from .const import (
|
from .const import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SCORE_POINTS,
|
SCORE_POINTS,
|
||||||
@ -33,6 +32,7 @@ from .const import (
|
|||||||
UOM_MMHG,
|
UOM_MMHG,
|
||||||
Measurement,
|
Measurement,
|
||||||
)
|
)
|
||||||
|
from .coordinator import WithingsDataUpdateCoordinator
|
||||||
from .entity import WithingsEntity, WithingsEntityDescription
|
from .entity import WithingsEntity, WithingsEntityDescription
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,10 +142,10 @@ def disable_webhook_delay():
|
|||||||
|
|
||||||
mock = AsyncMock()
|
mock = AsyncMock()
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.withings.common.SUBSCRIBE_DELAY",
|
"homeassistant.components.withings.coordinator.SUBSCRIBE_DELAY",
|
||||||
timedelta(seconds=0),
|
timedelta(seconds=0),
|
||||||
), patch(
|
), patch(
|
||||||
"homeassistant.components.withings.common.UNSUBSCRIBE_DELAY",
|
"homeassistant.components.withings.coordinator.UNSUBSCRIBE_DELAY",
|
||||||
timedelta(seconds=0),
|
timedelta(seconds=0),
|
||||||
):
|
):
|
||||||
yield mock
|
yield mock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user