Skip to content

Commit

Permalink
Move QNAP constants (#93918)
Browse files Browse the repository at this point in the history
* Create const.py

* Update sensor.py

* Add docstring

* Update sensor.py

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
  • Loading branch information
disforw and epenet authored Jun 1, 2023
1 parent 1a3d6bb commit 1f0e235
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions homeassistant/components/qnap/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""The Qnap constants."""

DEFAULT_PORT = 8080
DEFAULT_TIMEOUT = 5

DOMAIN = "qnap"
5 changes: 2 additions & 3 deletions homeassistant/components/qnap/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)

Expand Down

0 comments on commit 1f0e235

Please sign in to comment.