diff --git a/homeassistant/components/qnap/const.py b/homeassistant/components/qnap/const.py new file mode 100644 index 00000000000000..b5a0aef3dbc65b --- /dev/null +++ b/homeassistant/components/qnap/const.py @@ -0,0 +1,6 @@ +"""The Qnap constants.""" + +DEFAULT_PORT = 8080 +DEFAULT_TIMEOUT = 5 + +DOMAIN = "qnap" diff --git a/homeassistant/components/qnap/sensor.py b/homeassistant/components/qnap/sensor.py index 66fc56317182ab..ca81b2763fad32 100644 --- a/homeassistant/components/qnap/sensor.py +++ b/homeassistant/components/qnap/sensor.py @@ -35,6 +35,8 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType from homeassistant.util import Throttle +from .const import DEFAULT_PORT, DEFAULT_TIMEOUT + _LOGGER = logging.getLogger(__name__) ATTR_DRIVE = "Drive" @@ -56,9 +58,6 @@ CONF_DRIVES = "drives" CONF_NICS = "nics" CONF_VOLUMES = "volumes" -DEFAULT_NAME = "QNAP" -DEFAULT_PORT = 8080 -DEFAULT_TIMEOUT = 5 MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1)