mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Bump yalexs to 9.1.0 (#152457)
This commit is contained in:
@@ -29,5 +29,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/august",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["pubnub", "yalexs"],
|
||||
"requirements": ["yalexs==9.0.1", "yalexs-ble==3.1.2"]
|
||||
"requirements": ["yalexs==9.1.0", "yalexs-ble==3.1.2"]
|
||||
}
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/yale",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["socketio", "engineio", "yalexs"],
|
||||
"requirements": ["yalexs==9.0.1", "yalexs-ble==3.1.2"]
|
||||
"requirements": ["yalexs==9.1.0", "yalexs-ble==3.1.2"]
|
||||
}
|
||||
|
||||
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@@ -3183,7 +3183,7 @@ yalexs-ble==3.1.2
|
||||
|
||||
# homeassistant.components.august
|
||||
# homeassistant.components.yale
|
||||
yalexs==9.0.1
|
||||
yalexs==9.1.0
|
||||
|
||||
# homeassistant.components.yeelight
|
||||
yeelight==0.7.16
|
||||
|
||||
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@@ -2639,7 +2639,7 @@ yalexs-ble==3.1.2
|
||||
|
||||
# homeassistant.components.august
|
||||
# homeassistant.components.yale
|
||||
yalexs==9.0.1
|
||||
yalexs==9.1.0
|
||||
|
||||
# homeassistant.components.yeelight
|
||||
yeelight==0.7.16
|
||||
|
||||
@@ -48,6 +48,13 @@ from tests.common import MockConfigEntry, load_fixture
|
||||
|
||||
USER_ID = "a76c25e5-49aa-4c14-cd0c-48a6931e2081"
|
||||
|
||||
# Default capabilities for locks
|
||||
_DEFAULT_CAPABILITIES = {
|
||||
"unlatch": False,
|
||||
"doorSense": True,
|
||||
"batteryType": "AA",
|
||||
}
|
||||
|
||||
|
||||
def _mock_get_config(
|
||||
brand: Brand = Brand.YALE_AUGUST, jwt: str | None = None
|
||||
@@ -342,6 +349,15 @@ async def make_mock_api(
|
||||
api_instance.async_unlatch_async = AsyncMock()
|
||||
api_instance.async_unlatch = AsyncMock()
|
||||
|
||||
# Mock capabilities endpoint
|
||||
async def mock_get_lock_capabilities(token, serial_number):
|
||||
"""Mock the capabilities endpoint response."""
|
||||
return {"lock": _DEFAULT_CAPABILITIES}
|
||||
|
||||
api_instance.async_get_lock_capabilities = AsyncMock(
|
||||
side_effect=mock_get_lock_capabilities
|
||||
)
|
||||
|
||||
return api_instance
|
||||
|
||||
|
||||
|
||||
@@ -48,6 +48,27 @@ from tests.common import MockConfigEntry, load_fixture
|
||||
|
||||
USER_ID = "a76c25e5-49aa-4c14-cd0c-48a6931e2081"
|
||||
|
||||
# Define lock capabilities for specific locks
|
||||
_LOCK_CAPABILITIES = {
|
||||
"online_with_unlatch": {
|
||||
"unlatch": True,
|
||||
"doorSense": True,
|
||||
"batteryType": "AA",
|
||||
},
|
||||
"68895DD075A1444FAD4C00B273EEEF28": { # Also online_with_unlatch
|
||||
"unlatch": True,
|
||||
"doorSense": True,
|
||||
"batteryType": "AA",
|
||||
},
|
||||
}
|
||||
|
||||
# Default capabilities for locks not in the dict
|
||||
_DEFAULT_CAPABILITIES = {
|
||||
"unlatch": False,
|
||||
"doorSense": True,
|
||||
"batteryType": "AA",
|
||||
}
|
||||
|
||||
|
||||
def _mock_get_config(
|
||||
brand: Brand = Brand.YALE_GLOBAL, jwt: str | None = None
|
||||
@@ -340,6 +361,16 @@ async def make_mock_api(
|
||||
api_instance.async_unlatch = AsyncMock()
|
||||
api_instance.async_add_websocket_subscription = AsyncMock()
|
||||
|
||||
# Mock capabilities endpoint
|
||||
async def mock_get_lock_capabilities(token, serial_number):
|
||||
"""Mock the capabilities endpoint response."""
|
||||
capabilities = _LOCK_CAPABILITIES.get(serial_number, _DEFAULT_CAPABILITIES)
|
||||
return {"lock": capabilities}
|
||||
|
||||
api_instance.async_get_lock_capabilities = AsyncMock(
|
||||
side_effect=mock_get_lock_capabilities
|
||||
)
|
||||
|
||||
return api_instance
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user