mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Bump aiounifi to v64 (#102700)
This commit is contained in:
parent
eb52943d27
commit
40817dabbf
@ -263,7 +263,7 @@ class UniFiController:
|
||||
if entry.domain == Platform.DEVICE_TRACKER:
|
||||
macs.append(entry.unique_id.split("-", 1)[0])
|
||||
|
||||
for mac in self.option_block_clients + macs:
|
||||
for mac in self.option_supported_clients + self.option_block_clients + macs:
|
||||
if mac not in self.api.clients and mac in self.api.clients_all:
|
||||
self.api.clients.process_raw([dict(self.api.clients_all[mac].raw)])
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["aiounifi"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["aiounifi==63"],
|
||||
"requirements": ["aiounifi==64"],
|
||||
"ssdp": [
|
||||
{
|
||||
"manufacturer": "Ubiquiti Networks",
|
||||
|
@ -369,7 +369,7 @@ aiosyncthing==0.5.1
|
||||
aiotractive==0.5.6
|
||||
|
||||
# homeassistant.components.unifi
|
||||
aiounifi==63
|
||||
aiounifi==64
|
||||
|
||||
# homeassistant.components.vlc_telnet
|
||||
aiovlc==0.1.0
|
||||
|
@ -344,7 +344,7 @@ aiosyncthing==0.5.1
|
||||
aiotractive==0.5.6
|
||||
|
||||
# homeassistant.components.unifi
|
||||
aiounifi==63
|
||||
aiounifi==64
|
||||
|
||||
# homeassistant.components.vlc_telnet
|
||||
aiovlc==0.1.0
|
||||
|
@ -167,6 +167,11 @@ def mock_default_unifi_requests(
|
||||
json={"data": wlans_response or [], "meta": {"rc": "ok"}},
|
||||
headers={"content-type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
aioclient_mock.get(
|
||||
f"https://{host}:1234/v2/api/site/{site_id}/trafficrules",
|
||||
json=[{}],
|
||||
headers={"content-type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
|
||||
|
||||
async def setup_unifi_integration(
|
||||
|
@ -771,7 +771,7 @@ async def test_no_clients(
|
||||
},
|
||||
)
|
||||
|
||||
assert aioclient_mock.call_count == 11
|
||||
assert aioclient_mock.call_count == 12
|
||||
assert len(hass.states.async_entity_ids(SWITCH_DOMAIN)) == 0
|
||||
|
||||
|
||||
@ -860,8 +860,8 @@ async def test_switches(
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, "turn_off", {"entity_id": "switch.block_client_1"}, blocking=True
|
||||
)
|
||||
assert aioclient_mock.call_count == 12
|
||||
assert aioclient_mock.mock_calls[11][2] == {
|
||||
assert aioclient_mock.call_count == 13
|
||||
assert aioclient_mock.mock_calls[12][2] == {
|
||||
"mac": "00:00:00:00:01:01",
|
||||
"cmd": "block-sta",
|
||||
}
|
||||
@ -869,8 +869,8 @@ async def test_switches(
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, "turn_on", {"entity_id": "switch.block_client_1"}, blocking=True
|
||||
)
|
||||
assert aioclient_mock.call_count == 13
|
||||
assert aioclient_mock.mock_calls[12][2] == {
|
||||
assert aioclient_mock.call_count == 14
|
||||
assert aioclient_mock.mock_calls[13][2] == {
|
||||
"mac": "00:00:00:00:01:01",
|
||||
"cmd": "unblock-sta",
|
||||
}
|
||||
@ -887,8 +887,8 @@ async def test_switches(
|
||||
{"entity_id": "switch.block_media_streaming"},
|
||||
blocking=True,
|
||||
)
|
||||
assert aioclient_mock.call_count == 14
|
||||
assert aioclient_mock.mock_calls[13][2] == {"enabled": False}
|
||||
assert aioclient_mock.call_count == 15
|
||||
assert aioclient_mock.mock_calls[14][2] == {"enabled": False}
|
||||
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN,
|
||||
@ -896,8 +896,8 @@ async def test_switches(
|
||||
{"entity_id": "switch.block_media_streaming"},
|
||||
blocking=True,
|
||||
)
|
||||
assert aioclient_mock.call_count == 15
|
||||
assert aioclient_mock.mock_calls[14][2] == {"enabled": True}
|
||||
assert aioclient_mock.call_count == 16
|
||||
assert aioclient_mock.mock_calls[15][2] == {"enabled": True}
|
||||
|
||||
|
||||
async def test_remove_switches(
|
||||
@ -983,8 +983,8 @@ async def test_block_switches(
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, "turn_off", {"entity_id": "switch.block_client_1"}, blocking=True
|
||||
)
|
||||
assert aioclient_mock.call_count == 12
|
||||
assert aioclient_mock.mock_calls[11][2] == {
|
||||
assert aioclient_mock.call_count == 13
|
||||
assert aioclient_mock.mock_calls[12][2] == {
|
||||
"mac": "00:00:00:00:01:01",
|
||||
"cmd": "block-sta",
|
||||
}
|
||||
@ -992,8 +992,8 @@ async def test_block_switches(
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, "turn_on", {"entity_id": "switch.block_client_1"}, blocking=True
|
||||
)
|
||||
assert aioclient_mock.call_count == 13
|
||||
assert aioclient_mock.mock_calls[12][2] == {
|
||||
assert aioclient_mock.call_count == 14
|
||||
assert aioclient_mock.mock_calls[13][2] == {
|
||||
"mac": "00:00:00:00:01:01",
|
||||
"cmd": "unblock-sta",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user