renamed format_value to helper.py

This commit is contained in:
Tomaae 2022-02-02 22:18:05 +01:00
parent a3e6761c78
commit 1503cd79d1
3 changed files with 14 additions and 25 deletions

View file

@ -15,7 +15,7 @@ from homeassistant.core import callback
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.util.dt import get_age, utcnow
from .helper import format_attribute
from .helper import format_attribute, format_value
from .const import (
DOMAIN,
DATA_CLIENT,
@ -38,18 +38,6 @@ DEVICE_ATTRIBUTES_HOST = [
]
# ---------------------------
# format_value
# ---------------------------
def format_value(res):
res = res.replace("dhcp", "DHCP")
res = res.replace("dns", "DNS")
res = res.replace("capsman", "CAPsMAN")
res = res.replace("wireless", "Wireless")
res = res.replace("restored", "Restored")
return res
# ---------------------------
# async_setup_entry
# ---------------------------