mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Move QNAP constants (#93918)
* 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>
This commit is contained in:
parent
1a3d6bbb9a
commit
1f0e235b99
6
homeassistant/components/qnap/const.py
Normal file
6
homeassistant/components/qnap/const.py
Normal file
@ -0,0 +1,6 @@
|
||||
"""The Qnap constants."""
|
||||
|
||||
DEFAULT_PORT = 8080
|
||||
DEFAULT_TIMEOUT = 5
|
||||
|
||||
DOMAIN = "qnap"
|
@ -35,6 +35,8 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
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 @@ ATTR_VOLUME_SIZE = "Volume Size"
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user