2019-05-15 21:43:45 +00:00
|
|
|
"""Device tracker constants."""
|
|
|
|
from datetime import timedelta
|
|
|
|
import logging
|
2021-05-22 08:15:15 +00:00
|
|
|
from typing import Final
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
LOGGER: Final = logging.getLogger(__package__)
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
DOMAIN: Final = "device_tracker"
|
2021-11-08 13:02:18 +00:00
|
|
|
ENTITY_ID_FORMAT: Final = DOMAIN + ".{}"
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
PLATFORM_TYPE_LEGACY: Final = "legacy"
|
|
|
|
PLATFORM_TYPE_ENTITY: Final = "entity_platform"
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
SOURCE_TYPE_GPS: Final = "gps"
|
|
|
|
SOURCE_TYPE_ROUTER: Final = "router"
|
|
|
|
SOURCE_TYPE_BLUETOOTH: Final = "bluetooth"
|
|
|
|
SOURCE_TYPE_BLUETOOTH_LE: Final = "bluetooth_le"
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
CONF_SCAN_INTERVAL: Final = "interval_seconds"
|
|
|
|
SCAN_INTERVAL: Final = timedelta(seconds=12)
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
CONF_TRACK_NEW: Final = "track_new_devices"
|
|
|
|
DEFAULT_TRACK_NEW: Final = True
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
CONF_CONSIDER_HOME: Final = "consider_home"
|
|
|
|
DEFAULT_CONSIDER_HOME: Final = timedelta(seconds=180)
|
2019-05-15 21:43:45 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
CONF_NEW_DEVICE_DEFAULTS: Final = "new_device_defaults"
|
2019-07-31 19:25:30 +00:00
|
|
|
|
2021-05-22 08:15:15 +00:00
|
|
|
ATTR_ATTRIBUTES: Final = "attributes"
|
|
|
|
ATTR_BATTERY: Final = "battery"
|
|
|
|
ATTR_DEV_ID: Final = "dev_id"
|
|
|
|
ATTR_GPS: Final = "gps"
|
|
|
|
ATTR_HOST_NAME: Final = "host_name"
|
|
|
|
ATTR_LOCATION_NAME: Final = "location_name"
|
|
|
|
ATTR_MAC: Final = "mac"
|
|
|
|
ATTR_SOURCE_TYPE: Final = "source_type"
|
|
|
|
ATTR_CONSIDER_HOME: Final = "consider_home"
|
|
|
|
ATTR_IP: Final = "ip"
|