A port without any device connected will be reported as a LINK_DOWN link status on that port.
The API consumer can rely on that piece of information to detect an unused port.
But when the link status is LINK_UP:
a port reporting a 0.0 power consumption means that the port HAS PoE capability, BUT no power is consumed by any device,
a port reporting no PoE power value in the json payload returned by the Omada API means that the port has NO PoE capability.
The lack of PoE capability on one port can only be determined by a missing poe_power value in the Omada API output.
Thus, returning a None would be a lot more meaningful (without making the tplink_omada_client API too difficult to consume).
A port without any device connected will be reported as a
LINK_DOWN
link status on that port. The API consumer can rely on that piece of information to detect an unused port.But when the link status is
LINK_UP
:The lack of PoE capability on one port can only be determined by a missing
poe_power
value in the Omada API output. Thus, returning aNone
would be a lot more meaningful (without making thetplink_omada_client
API too difficult to consume).