2020-06-16 04:21:14 +02:00
|
|
|
"""
|
|
|
|
Constants for NiceHash
|
|
|
|
"""
|
|
|
|
# Base component constants
|
|
|
|
NAME = "NiceHash"
|
|
|
|
DOMAIN = "nicehash"
|
|
|
|
DOMAIN_DATA = f"{DOMAIN}_data"
|
|
|
|
VERSION = "0.1.0"
|
|
|
|
|
|
|
|
ISSUE_URL = "https://github.com/brianberg/ha-nicehash/issues"
|
|
|
|
|
|
|
|
# Icons
|
|
|
|
ICON_CURRENCY_BTC = "mdi:currency-btc"
|
2020-06-17 02:58:47 +02:00
|
|
|
ICON_CURRENCY_EUR = "mdi:currency-eur"
|
|
|
|
ICON_CURRENCY_USD = "mdi:currency-usd"
|
2020-07-05 20:02:46 +02:00
|
|
|
ICON_MEMORY = "mdi:memory"
|
|
|
|
ICON_PICKAXE = "mdi:pickaxe"
|
2020-06-17 05:18:24 +02:00
|
|
|
ICON_PULSE = "mdi:pulse"
|
2020-07-05 20:02:46 +02:00
|
|
|
ICON_THERMOMETER = "mdi:thermometer"
|
|
|
|
ICON_SPEEDOMETER = "mdi:speedometer"
|
2020-06-16 04:21:14 +02:00
|
|
|
|
|
|
|
# Platforms
|
|
|
|
SENSOR = "sensor"
|
|
|
|
PLATFORMS = [SENSOR]
|
|
|
|
|
|
|
|
|
|
|
|
# Configuration and options
|
|
|
|
CONF_API_KEY = "api_key"
|
|
|
|
CONF_API_SECRET = "api_secret"
|
|
|
|
CONF_ORGANIZATION_ID = "organization_id"
|
|
|
|
CONF_CURRENCY = "currency"
|
2020-07-09 01:50:44 +02:00
|
|
|
CONF_RIGS_ENABLED = "rigs"
|
|
|
|
CONF_DEVICES_ENABLED = "devices"
|
2020-07-11 20:40:42 +02:00
|
|
|
CONF_PAYOUTS_ENABLED = "payouts"
|
2020-06-16 04:21:14 +02:00
|
|
|
|
|
|
|
# Defaults
|
|
|
|
DEFAULT_NAME = NAME
|
2020-07-09 02:05:11 +02:00
|
|
|
FORMAT_DATETIME = "%d-%m-%Y %H:%M"
|
2020-06-16 04:21:14 +02:00
|
|
|
|
|
|
|
# Startup
|
|
|
|
STARTUP_MESSAGE = f"""
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
{NAME}
|
|
|
|
Version: {VERSION}
|
|
|
|
This is a custom integration!
|
|
|
|
If you have any issues with this you need to open an issue here:
|
|
|
|
{ISSUE_URL}
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
"""
|
|
|
|
|
|
|
|
# NiceHash
|
|
|
|
NICEHASH_API_URL = "https://api2.nicehash.com"
|
2020-07-09 02:05:11 +02:00
|
|
|
NICEHASH_ATTRIBUTION = "Data provided by NiceHash"
|
2020-07-05 20:02:46 +02:00
|
|
|
# Currency
|
2020-06-16 04:21:14 +02:00
|
|
|
CURRENCY_BTC = "BTC"
|
|
|
|
CURRENCY_USD = "USD"
|
|
|
|
CURRENCY_EUR = "EUR"
|
2020-07-05 20:02:46 +02:00
|
|
|
# Balance type
|
2020-06-17 02:58:47 +02:00
|
|
|
BALANCE_TYPE_AVAILABLE = "available"
|
|
|
|
BALANCE_TYPE_PENDING = "pending"
|
|
|
|
BALANCE_TYPE_TOTAL = "total"
|
2020-07-05 20:02:46 +02:00
|
|
|
# Device status
|
2020-06-17 05:18:24 +02:00
|
|
|
DEVICE_STATUS_UNKNOWN = "UNKNOWN"
|
|
|
|
DEVICE_STATUS_DISABLED = "DISABLED"
|
|
|
|
DEVICE_STATUS_INACTIVE = "INACTIVE"
|
|
|
|
DEVICE_STATUS_MINING = "MINING"
|
|
|
|
DEVICE_STATUS_BENCHMARKING = "BENCHMARKING"
|
|
|
|
DEVICE_STATUS_ERROR = "ERROR"
|
|
|
|
DEVICE_STATUS_PENDING = "PENDING"
|
|
|
|
DEVICE_STATUS_OFFLINE = "OFFLINE"
|
2020-07-05 20:02:46 +02:00
|
|
|
# Device stat
|
|
|
|
DEVICE_SPEED_RATE = "device-speed-rate"
|
|
|
|
DEVICE_SPEED_ALGORITHM = "device-speed-algorithm"
|
|
|
|
DEVICE_LOAD = "device-load"
|
|
|
|
DEVICE_RPM = "device-rpm"
|
2020-07-11 20:40:42 +02:00
|
|
|
# Payout types
|
|
|
|
PAYOUT_USER = "USER"
|