2018-08-17 19:28:29 +00:00
|
|
|
"""Constants for the IGD component."""
|
2020-04-10 22:24:03 +00:00
|
|
|
from datetime import timedelta
|
2018-08-17 19:28:29 +00:00
|
|
|
import logging
|
|
|
|
|
2020-04-10 22:24:03 +00:00
|
|
|
from homeassistant.const import TIME_SECONDS
|
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
CONF_ENABLE_PORT_MAPPING = "port_mapping"
|
|
|
|
CONF_ENABLE_SENSORS = "sensors"
|
|
|
|
CONF_HASS = "hass"
|
|
|
|
CONF_LOCAL_IP = "local_ip"
|
|
|
|
CONF_PORTS = "ports"
|
|
|
|
DOMAIN = "upnp"
|
2019-05-07 22:52:49 +00:00
|
|
|
LOGGER = logging.getLogger(__package__)
|
2020-04-10 22:24:03 +00:00
|
|
|
BYTES_RECEIVED = "bytes_received"
|
|
|
|
BYTES_SENT = "bytes_sent"
|
|
|
|
PACKETS_RECEIVED = "packets_received"
|
|
|
|
PACKETS_SENT = "packets_sent"
|
|
|
|
TIMESTAMP = "timestamp"
|
|
|
|
DATA_PACKETS = "packets"
|
|
|
|
DATA_RATE_PACKETS_PER_SECOND = f"{DATA_PACKETS}/{TIME_SECONDS}"
|
|
|
|
KIBIBYTE = 1024
|
|
|
|
UPDATE_INTERVAL = timedelta(seconds=30)
|