mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Bump aiocomelit to 0.0.8 (#100714)
* Bump aiocomelit to 0.0.8 * fix import * fix tests
This commit is contained in:
parent
debee28856
commit
55c6d41d41
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiocomelit import ComeliteSerialBridgeAPi, exceptions as aiocomelit_exceptions
|
from aiocomelit import ComeliteSerialBridgeApi, exceptions as aiocomelit_exceptions
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import core, exceptions
|
from homeassistant import core, exceptions
|
||||||
@ -37,7 +37,7 @@ async def validate_input(
|
|||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
"""Validate the user input allows us to connect."""
|
"""Validate the user input allows us to connect."""
|
||||||
|
|
||||||
api = ComeliteSerialBridgeAPi(data[CONF_HOST], data[CONF_PIN])
|
api = ComeliteSerialBridgeApi(data[CONF_HOST], data[CONF_PIN])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await api.login()
|
await api.login()
|
||||||
|
@ -3,7 +3,7 @@ import asyncio
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiocomelit import ComeliteSerialBridgeAPi
|
from aiocomelit import ComeliteSerialBridgeApi
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -22,7 +22,7 @@ class ComelitSerialBridge(DataUpdateCoordinator):
|
|||||||
self._host = host
|
self._host = host
|
||||||
self._pin = pin
|
self._pin = pin
|
||||||
|
|
||||||
self.api = ComeliteSerialBridgeAPi(host, pin)
|
self.api = ComeliteSerialBridgeApi(host, pin)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
hass=hass,
|
hass=hass,
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/comelit",
|
"documentation": "https://www.home-assistant.io/integrations/comelit",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["aiocomelit"],
|
"loggers": ["aiocomelit"],
|
||||||
"requirements": ["aiocomelit==0.0.5"]
|
"requirements": ["aiocomelit==0.0.8"]
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"flow_title": "{host}",
|
"flow_title": "{host}",
|
||||||
"step": {
|
"step": {
|
||||||
"reauth_confirm": {
|
"reauth_confirm": {
|
||||||
"description": "Please enter the correct PIN for VEDO system: {host}",
|
"description": "Please enter the correct PIN for {host}",
|
||||||
"data": {
|
"data": {
|
||||||
"pin": "[%key:common::config_flow::data::pin%]"
|
"pin": "[%key:common::config_flow::data::pin%]"
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ aiobafi6==0.9.0
|
|||||||
aiobotocore==2.6.0
|
aiobotocore==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.comelit
|
# homeassistant.components.comelit
|
||||||
aiocomelit==0.0.5
|
aiocomelit==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.dhcp
|
# homeassistant.components.dhcp
|
||||||
aiodiscover==1.5.1
|
aiodiscover==1.5.1
|
||||||
|
@ -191,7 +191,7 @@ aiobafi6==0.9.0
|
|||||||
aiobotocore==2.6.0
|
aiobotocore==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.comelit
|
# homeassistant.components.comelit
|
||||||
aiocomelit==0.0.5
|
aiocomelit==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.dhcp
|
# homeassistant.components.dhcp
|
||||||
aiodiscover==1.5.1
|
aiodiscover==1.5.1
|
||||||
|
@ -18,9 +18,9 @@ from tests.common import MockConfigEntry
|
|||||||
async def test_user(hass: HomeAssistant) -> None:
|
async def test_user(hass: HomeAssistant) -> None:
|
||||||
"""Test starting a flow by user."""
|
"""Test starting a flow by user."""
|
||||||
with patch(
|
with patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.login",
|
"aiocomelit.api.ComeliteSerialBridgeApi.login",
|
||||||
), patch(
|
), patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.logout",
|
"aiocomelit.api.ComeliteSerialBridgeApi.logout",
|
||||||
), patch(
|
), patch(
|
||||||
"homeassistant.components.comelit.async_setup_entry"
|
"homeassistant.components.comelit.async_setup_entry"
|
||||||
) as mock_setup_entry, patch(
|
) as mock_setup_entry, patch(
|
||||||
@ -64,7 +64,7 @@ async def test_exception_connection(hass: HomeAssistant, side_effect, error) ->
|
|||||||
assert result["step_id"] == "user"
|
assert result["step_id"] == "user"
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.login",
|
"aiocomelit.api.ComeliteSerialBridgeApi.login",
|
||||||
side_effect=side_effect,
|
side_effect=side_effect,
|
||||||
):
|
):
|
||||||
result = await hass.config_entries.flow.async_configure(
|
result = await hass.config_entries.flow.async_configure(
|
||||||
@ -83,9 +83,9 @@ async def test_reauth_successful(hass: HomeAssistant) -> None:
|
|||||||
mock_config.add_to_hass(hass)
|
mock_config.add_to_hass(hass)
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.login",
|
"aiocomelit.api.ComeliteSerialBridgeApi.login",
|
||||||
), patch(
|
), patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.logout",
|
"aiocomelit.api.ComeliteSerialBridgeApi.logout",
|
||||||
), patch("homeassistant.components.comelit.async_setup_entry"), patch(
|
), patch("homeassistant.components.comelit.async_setup_entry"), patch(
|
||||||
"requests.get"
|
"requests.get"
|
||||||
) as mock_request_get:
|
) as mock_request_get:
|
||||||
@ -127,9 +127,9 @@ async def test_reauth_not_successful(hass: HomeAssistant, side_effect, error) ->
|
|||||||
mock_config.add_to_hass(hass)
|
mock_config.add_to_hass(hass)
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.login", side_effect=side_effect
|
"aiocomelit.api.ComeliteSerialBridgeApi.login", side_effect=side_effect
|
||||||
), patch(
|
), patch(
|
||||||
"aiocomelit.api.ComeliteSerialBridgeAPi.logout",
|
"aiocomelit.api.ComeliteSerialBridgeApi.logout",
|
||||||
), patch(
|
), patch(
|
||||||
"homeassistant.components.comelit.async_setup_entry"
|
"homeassistant.components.comelit.async_setup_entry"
|
||||||
):
|
):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user