Bump pyvesync to 3.1.0 (#153693)

This commit is contained in:
cdnninja
2025-10-05 00:56:25 -06:00
committed by Franck Nijhof
parent 51c500e22c
commit 647723d3f0
5 changed files with 31 additions and 8 deletions

View File

@@ -13,5 +13,5 @@
"documentation": "https://www.home-assistant.io/integrations/vesync",
"iot_class": "cloud_polling",
"loggers": ["pyvesync"],
"requirements": ["pyvesync==3.0.0"]
"requirements": ["pyvesync==3.1.0"]
}

2
requirements_all.txt generated
View File

@@ -2611,7 +2611,7 @@ pyvera==0.3.16
pyversasense==0.0.6
# homeassistant.components.vesync
pyvesync==3.0.0
pyvesync==3.1.0
# homeassistant.components.vizio
pyvizio==0.1.61

View File

@@ -2169,7 +2169,7 @@ pyuptimerobot==22.2.0
pyvera==0.3.16
# homeassistant.components.vesync
pyvesync==3.0.0
pyvesync==3.1.0
# homeassistant.components.vizio
pyvizio==0.1.61

View File

@@ -10,6 +10,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, PropertyMock, patch
import pytest
from pyvesync import VeSync
from pyvesync.auth import VeSyncAuth
from pyvesync.base_devices.bulb_base import VeSyncBulb
from pyvesync.base_devices.fan_base import VeSyncFanBase
from pyvesync.base_devices.humidifier_base import HumidifierState
@@ -51,15 +52,12 @@ def patch_vesync():
"""Patch VeSync methods and several properties/attributes for all tests."""
props = {
"enabled": True,
"token": "TEST_TOKEN",
"account_id": "TEST_ACCOUNT_ID",
}
with (
patch.multiple(
"pyvesync.vesync.VeSync",
check_firmware=AsyncMock(return_value=True),
login=AsyncMock(return_value=None),
),
ExitStack() as stack,
):
@@ -71,6 +69,33 @@ def patch_vesync():
yield
@pytest.fixture(autouse=True)
def patch_vesync_auth():
"""Patch VeSync Auth methods and several properties/attributes for all tests."""
props = {
"_token": "TESTTOKEN",
"_account_id": "TESTACCOUNTID",
"_country_code": "US",
"_current_region": "US",
"_username": "TESTUSERNAME",
"_password": "TESTPASSWORD",
}
with (
patch.multiple(
"pyvesync.auth.VeSyncAuth",
login=AsyncMock(return_value=True),
),
ExitStack() as stack,
):
for name, value in props.items():
mock = stack.enter_context(
patch.object(VeSyncAuth, name, new_callable=PropertyMock)
)
mock.return_value = value
yield
@pytest.fixture(name="config_entry")
def config_entry_fixture(hass: HomeAssistant, config) -> ConfigEntry:
"""Create a mock VeSync config entry."""

View File

@@ -53,7 +53,6 @@
'device_status': 'on',
'device_type': 'Classic200S',
'display': 'Method',
'displayJSON': 'Method',
'enabled': 'Method',
'features': list([
'night_light',
@@ -173,7 +172,6 @@
'device_status': 'on',
'device_type': 'fan',
'display': 'Method',
'displayJSON': 'Method',
'enabled': 'Method',
'fan_levels': 'Method',
'features': 'Method',