mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-21 08:35:50 +02:00
18 lines
490 B
Python
18 lines
490 B
Python
|
"""Helper functions for Mikrotik Router."""
|
||
|
|
||
|
|
||
|
# ---------------------------
|
||
|
# format_attribute
|
||
|
# ---------------------------
|
||
|
def format_attribute(attr):
|
||
|
res = attr.replace("-", " ")
|
||
|
res = res.capitalize()
|
||
|
res = res.replace(" ip ", " IP ")
|
||
|
res = res.replace(" mac ", " MAC ")
|
||
|
res = res.replace(" mtu", " MTU")
|
||
|
res = res.replace("Sfp", "SFP")
|
||
|
res = res.replace("Poe", "POE")
|
||
|
res = res.replace(" tx", " TX")
|
||
|
res = res.replace(" rx", " RX")
|
||
|
return res
|