MarkGodwin / tplink-omada-api

MIT License
12 stars 9 forks source link

Improve meaning of PoE power value when switch port has no PoE capability #19

Closed odouville closed 1 year ago

odouville commented 1 year ago

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 a None would be a lot more meaningful (without making the tplink_omada_client API too difficult to consume).