Bump tplink-omada-api to 1.5.3 (#156645)

This commit is contained in:
MarkGodwin
2025-11-15 15:39:56 +01:00
committed by GitHub
parent 779590ce1c
commit 4d7de2f814
5 changed files with 21 additions and 10 deletions
@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/tplink_omada",
"integration_type": "hub",
"iot_class": "local_polling",
"requirements": ["tplink-omada-client==1.4.4"]
"requirements": ["tplink-omada-client==1.5.3"]
}
@@ -7,7 +7,12 @@ from dataclasses import dataclass
from functools import partial
from typing import Any, Generic, TypeVar
from tplink_omada_client import OmadaSiteClient, SwitchPortOverrides
from tplink_omada_client import (
GatewayPortSettings,
OmadaSiteClient,
PortProfileOverrides,
SwitchPortSettings,
)
from tplink_omada_client.definitions import GatewayPortMode, PoEMode, PortType
from tplink_omada_client.devices import (
OmadaDevice,
@@ -17,7 +22,6 @@ from tplink_omada_client.devices import (
OmadaSwitch,
OmadaSwitchPortDetails,
)
from tplink_omada_client.omadasiteclient import GatewayPortSettings
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
from homeassistant.const import EntityCategory
@@ -184,7 +188,12 @@ SWITCH_PORT_DETAILS_SWITCHES: list[OmadaSwitchPortSwitchEntityDescription] = [
),
set_func=(
lambda client, device, port, enable: client.update_switch_port(
device, port, overrides=SwitchPortOverrides(enable_poe=enable)
device,
port,
settings=SwitchPortSettings(
profile_override_enabled=True,
profile_overrides=PortProfileOverrides(enable_poe=enable),
),
)
),
update_func=lambda p: p.poe_mode != PoEMode.DISABLED,
+1 -1
View File
@@ -3005,7 +3005,7 @@ total-connect-client==2025.5
tp-connected==0.0.4
# homeassistant.components.tplink_omada
tplink-omada-client==1.4.4
tplink-omada-client==1.5.3
# homeassistant.components.transmission
transmission-rpc==7.0.3
+1 -1
View File
@@ -2478,7 +2478,7 @@ toonapi==0.3.0
total-connect-client==2025.5
# homeassistant.components.tplink_omada
tplink-omada-client==1.4.4
tplink-omada-client==1.5.3
# homeassistant.components.transmission
transmission-rpc==7.0.3
+6 -4
View File
@@ -5,7 +5,7 @@ from typing import Any
from unittest.mock import AsyncMock, MagicMock
from syrupy.assertion import SnapshotAssertion
from tplink_omada_client import SwitchPortOverrides
from tplink_omada_client import SwitchPortSettings
from tplink_omada_client.definitions import PoEMode
from tplink_omada_client.devices import (
OmadaGateway,
@@ -249,14 +249,16 @@ async def _test_poe_switch(
device: OmadaSwitch,
switch_port_details: OmadaSwitchPortDetails,
poe_enabled: bool,
overrides: SwitchPortOverrides = None,
settings: SwitchPortSettings,
) -> None:
assert device
assert device.mac == network_switch_mac
assert switch_port_details
assert switch_port_details.port == port_num
assert overrides
assert overrides.enable_poe == poe_enabled
assert settings
assert settings.profile_override_enabled
assert settings.profile_overrides
assert settings.profile_overrides.enable_poe == poe_enabled
entity = hass.states.get(entity_id)
assert entity == snapshot