mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Bump pylamarzocco to 1.3.2 (#132344)
This commit is contained in:
parent
9fd23a6d30
commit
33ad27d569
@ -3,9 +3,9 @@
|
||||
import logging
|
||||
|
||||
from packaging import version
|
||||
from pylamarzocco.client_bluetooth import LaMarzoccoBluetoothClient
|
||||
from pylamarzocco.client_cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.client_local import LaMarzoccoLocalClient
|
||||
from pylamarzocco.clients.bluetooth import LaMarzoccoBluetoothClient
|
||||
from pylamarzocco.clients.cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.clients.local import LaMarzoccoLocalClient
|
||||
from pylamarzocco.const import BT_MODEL_PREFIXES, FirmwareType
|
||||
from pylamarzocco.exceptions import AuthFail, RequestNotSuccessful
|
||||
|
||||
@ -22,7 +22,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import issue_registry as ir
|
||||
from homeassistant.helpers.httpx_client import create_async_httpx_client
|
||||
from homeassistant.helpers.aiohttp_client import async_create_clientsession
|
||||
|
||||
from .const import CONF_USE_BLUETOOTH, DOMAIN
|
||||
from .coordinator import LaMarzoccoConfigEntry, LaMarzoccoUpdateCoordinator
|
||||
@ -46,7 +46,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: LaMarzoccoConfigEntry) -
|
||||
|
||||
assert entry.unique_id
|
||||
serial = entry.unique_id
|
||||
client = create_async_httpx_client(hass)
|
||||
|
||||
client = async_create_clientsession(hass)
|
||||
cloud_client = LaMarzoccoCloudClient(
|
||||
username=entry.data[CONF_USERNAME],
|
||||
password=entry.data[CONF_PASSWORD],
|
||||
|
@ -6,9 +6,9 @@ from collections.abc import Mapping
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from httpx import AsyncClient
|
||||
from pylamarzocco.client_cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.client_local import LaMarzoccoLocalClient
|
||||
from aiohttp import ClientSession
|
||||
from pylamarzocco.clients.cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.clients.local import LaMarzoccoLocalClient
|
||||
from pylamarzocco.exceptions import AuthFail, RequestNotSuccessful
|
||||
from pylamarzocco.models import LaMarzoccoDeviceInfo
|
||||
import voluptuous as vol
|
||||
@ -37,7 +37,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.httpx_client import create_async_httpx_client
|
||||
from homeassistant.helpers.aiohttp_client import async_create_clientsession
|
||||
from homeassistant.helpers.selector import (
|
||||
SelectOptionDict,
|
||||
SelectSelector,
|
||||
@ -58,7 +58,7 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
VERSION = 2
|
||||
|
||||
_client: AsyncClient
|
||||
_client: ClientSession
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Initialize the config flow."""
|
||||
@ -82,8 +82,8 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
**user_input,
|
||||
**self._discovered,
|
||||
}
|
||||
self._client = create_async_httpx_client(self.hass)
|
||||
|
||||
self._client = async_create_clientsession(self.hass)
|
||||
cloud_client = LaMarzoccoCloudClient(
|
||||
username=data[CONF_USERNAME],
|
||||
password=data[CONF_PASSWORD],
|
||||
|
@ -8,12 +8,11 @@ import logging
|
||||
from time import time
|
||||
from typing import Any
|
||||
|
||||
from pylamarzocco.client_bluetooth import LaMarzoccoBluetoothClient
|
||||
from pylamarzocco.client_cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.client_local import LaMarzoccoLocalClient
|
||||
from pylamarzocco.clients.bluetooth import LaMarzoccoBluetoothClient
|
||||
from pylamarzocco.clients.cloud import LaMarzoccoCloudClient
|
||||
from pylamarzocco.clients.local import LaMarzoccoLocalClient
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
from pylamarzocco.exceptions import AuthFail, RequestNotSuccessful
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from websockets.protocol import State
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_MODEL, CONF_NAME, EVENT_HOMEASSISTANT_STOP
|
||||
@ -86,9 +85,8 @@ class LaMarzoccoUpdateCoordinator(DataUpdateCoordinator[None]):
|
||||
if (
|
||||
self._local_client is not None
|
||||
and self._local_client.websocket is not None
|
||||
and self._local_client.websocket.state is State.OPEN
|
||||
and not self._local_client.websocket.closed
|
||||
):
|
||||
self._local_client.terminating = True
|
||||
await self._local_client.websocket.close()
|
||||
|
||||
self.config_entry.async_on_unload(
|
||||
|
@ -4,7 +4,7 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pylamarzocco.const import FirmwareType
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
|
||||
from homeassistant.const import CONF_ADDRESS, CONF_MAC
|
||||
from homeassistant.helpers.device_registry import (
|
||||
|
@ -36,5 +36,5 @@
|
||||
"integration_type": "device",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["pylamarzocco"],
|
||||
"requirements": ["pylamarzocco==1.2.12"]
|
||||
"requirements": ["pylamarzocco==1.3.2"]
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ from pylamarzocco.const import (
|
||||
PhysicalKey,
|
||||
PrebrewMode,
|
||||
)
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
from pylamarzocco.exceptions import RequestNotSuccessful
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.models import LaMarzoccoMachineConfig
|
||||
|
||||
from homeassistant.components.number import (
|
||||
|
@ -5,8 +5,8 @@ from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from pylamarzocco.const import MachineModel, PrebrewMode, SmartStandbyMode, SteamLevel
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
from pylamarzocco.exceptions import RequestNotSuccessful
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.models import LaMarzoccoMachineConfig
|
||||
|
||||
from homeassistant.components.select import SelectEntity, SelectEntityDescription
|
||||
|
@ -4,7 +4,7 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pylamarzocco.const import BoilerType, MachineModel, PhysicalKey
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
|
@ -5,8 +5,8 @@ from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from pylamarzocco.const import BoilerType
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
from pylamarzocco.exceptions import RequestNotSuccessful
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.models import LaMarzoccoMachineConfig
|
||||
|
||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
||||
|
@ -2027,7 +2027,7 @@ pykwb==0.0.8
|
||||
pylacrosse==0.4
|
||||
|
||||
# homeassistant.components.lamarzocco
|
||||
pylamarzocco==1.2.12
|
||||
pylamarzocco==1.3.2
|
||||
|
||||
# homeassistant.components.lastfm
|
||||
pylast==5.1.0
|
||||
|
@ -1635,7 +1635,7 @@ pykrakenapi==0.1.8
|
||||
pykulersky==0.5.2
|
||||
|
||||
# homeassistant.components.lamarzocco
|
||||
pylamarzocco==1.2.12
|
||||
pylamarzocco==1.3.2
|
||||
|
||||
# homeassistant.components.lastfm
|
||||
pylast==5.1.0
|
||||
|
@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
from bleak.backends.device import BLEDevice
|
||||
from pylamarzocco.const import FirmwareType, MachineModel, SteamLevel
|
||||
from pylamarzocco.lm_machine import LaMarzoccoMachine
|
||||
from pylamarzocco.devices.machine import LaMarzoccoMachine
|
||||
from pylamarzocco.models import LaMarzoccoDeviceInfo
|
||||
import pytest
|
||||
|
||||
|
@ -6,7 +6,6 @@ from pylamarzocco.const import FirmwareType
|
||||
from pylamarzocco.exceptions import AuthFail, RequestNotSuccessful
|
||||
import pytest
|
||||
from syrupy import SnapshotAssertion
|
||||
from websockets.protocol import State
|
||||
|
||||
from homeassistant.components.lamarzocco.config_flow import CONF_MACHINE
|
||||
from homeassistant.components.lamarzocco.const import DOMAIN
|
||||
@ -200,7 +199,7 @@ async def test_websocket_closed_on_unload(
|
||||
) as local_client:
|
||||
client = local_client.return_value
|
||||
client.websocket = AsyncMock()
|
||||
client.websocket.state = State.OPEN
|
||||
client.websocket.closed = False
|
||||
await async_init_integration(hass, mock_config_entry)
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
|
Loading…
x
Reference in New Issue
Block a user