Skip to content

Commit

Permalink
const: add Final qualifier and types
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed May 17, 2023
1 parent fb825eb commit 15a2f60
Showing 1 changed file with 158 additions and 156 deletions.
314 changes: 158 additions & 156 deletions aioairzone/const.py
Original file line number Diff line number Diff line change
@@ -1,93 +1,95 @@
"""Airzone library constants."""

API_ACS_POINT = "acs_temp"
API_AIR_DEMAND = "air_demand"
API_ANTI_FREEZE = "antifreeze"
API_COLD_ANGLE = "coldangle"
API_COLD_DEMAND = "cold_demand"
API_COLD_STAGE = "coldStage"
API_COLD_STAGES = "coldStages"
API_COOL_MAX_TEMP = "coolmaxtemp"
API_COOL_MIN_TEMP = "coolmintemp"
API_COOL_SET_POINT = "coolsetpoint"
API_DATA = "data"
API_DEMO = "demo"
API_DOUBLE_SET_POINT = "double_sp"
API_ECO_ADAPT = "eco_adapt"
API_ERROR = "error"
API_ERRORS = "errors"
API_FLOOR_DEMAND = "floor_demand"
API_HEAT_ANGLE = "heatangle"
API_HEAT_DEMAND = "heat_demand"
API_HEAT_MAX_TEMP = "heatmaxtemp"
API_HEAT_MIN_TEMP = "heatmintemp"
API_HEAT_SET_POINT = "heatsetpoint"
API_HEAT_STAGE = "heatStage"
API_HEAT_STAGES = "heatStages"
API_HUMIDITY = "humidity"
API_HVAC = "hvac"
API_INTEGRATION = "integration"
API_INTERFACE = "interface"
API_MAC = "mac"
API_MANUFACTURER = "manufacturer"
API_MASTER_ZONE_ID = "master_zoneID"
API_MAX_TEMP = "maxTemp"
API_MC_CONNECTED = "mc_connected"
API_MIN_TEMP = "minTemp"
API_MODE = "mode"
API_MODES = "modes"
API_NAME = "name"
API_ON = "on"
API_POWER = "power"
API_ROOM_TEMP = "roomTemp"
API_SET_POINT = "setpoint"
API_SLEEP = "sleep"
API_SPEED = "speed"
API_SPEEDS = "speeds"
API_SYSTEM_FIRMWARE = "system_firmware"
API_SYSTEM_ID = "systemID"
API_SYSTEM_TYPE = "system_type"
API_SYSTEMS = "systems"
API_TEMP_STEP = "temp_step"
API_THERMOS_FIRMWARE = "thermos_firmware"
API_THERMOS_RADIO = "thermos_radio"
API_THERMOS_TYPE = "thermos_type"
API_UNITS = "units"
API_V1 = "api/v1"
API_VERSION = "version"
API_WEBSERVER = "webserver"
API_WIFI = "wifi"
API_WIFI_CHANNEL = "wifi_channel"
API_WIFI_QUALITY = "wifi_quality"
API_WIFI_RSSI = "wifi_rssi"
API_WS_AIDOO = "ws_aidoo"
API_WS_AZ = "ws_az"
API_WS_FIRMWARE = "ws_firmware"
API_WS_TYPE = "ws_type"
API_ZONE_ID = "zoneID"
from typing import Final

API_ERROR_LOW_BATTERY = "Low battery"
API_ERROR_METHOD_NOT_SUPPORTED = "Method not provided or not supported"
API_ERROR_REQUEST_MALFORMED = "request malformed"
API_ERROR_SYSTEM_ID_NOT_AVAILABLE = "systemid not avaiable"
API_ERROR_SYSTEM_ID_OUT_RANGE = "systemid out of range"
API_ERROR_ZONE_ID_NOT_AVAILABLE = "zoneid not avaiable"
API_ERROR_ZONE_ID_NOT_PROVIDED = "zoneid not provided"
API_ERROR_ZONE_ID_OUT_RANGE = "zoneid out of range"
API_ACS_POINT: Final[str] = "acs_temp"
API_AIR_DEMAND: Final[str] = "air_demand"
API_ANTI_FREEZE: Final[str] = "antifreeze"
API_COLD_ANGLE: Final[str] = "coldangle"
API_COLD_DEMAND: Final[str] = "cold_demand"
API_COLD_STAGE: Final[str] = "coldStage"
API_COLD_STAGES: Final[str] = "coldStages"
API_COOL_MAX_TEMP: Final[str] = "coolmaxtemp"
API_COOL_MIN_TEMP: Final[str] = "coolmintemp"
API_COOL_SET_POINT: Final[str] = "coolsetpoint"
API_DATA: Final[str] = "data"
API_DEMO: Final[str] = "demo"
API_DOUBLE_SET_POINT: Final[str] = "double_sp"
API_ECO_ADAPT: Final[str] = "eco_adapt"
API_ERROR: Final[str] = "error"
API_ERRORS: Final[str] = "errors"
API_FLOOR_DEMAND: Final[str] = "floor_demand"
API_HEAT_ANGLE: Final[str] = "heatangle"
API_HEAT_DEMAND: Final[str] = "heat_demand"
API_HEAT_MAX_TEMP: Final[str] = "heatmaxtemp"
API_HEAT_MIN_TEMP: Final[str] = "heatmintemp"
API_HEAT_SET_POINT: Final[str] = "heatsetpoint"
API_HEAT_STAGE: Final[str] = "heatStage"
API_HEAT_STAGES: Final[str] = "heatStages"
API_HUMIDITY: Final[str] = "humidity"
API_HVAC: Final[str] = "hvac"
API_INTEGRATION: Final[str] = "integration"
API_INTERFACE: Final[str] = "interface"
API_MAC: Final[str] = "mac"
API_MANUFACTURER: Final[str] = "manufacturer"
API_MASTER_ZONE_ID: Final[str] = "master_zoneID"
API_MAX_TEMP: Final[str] = "maxTemp"
API_MC_CONNECTED: Final[str] = "mc_connected"
API_MIN_TEMP: Final[str] = "minTemp"
API_MODE: Final[str] = "mode"
API_MODES: Final[str] = "modes"
API_NAME: Final[str] = "name"
API_ON: Final[str] = "on"
API_POWER: Final[str] = "power"
API_ROOM_TEMP: Final[str] = "roomTemp"
API_SET_POINT: Final[str] = "setpoint"
API_SLEEP: Final[str] = "sleep"
API_SPEED: Final[str] = "speed"
API_SPEEDS: Final[str] = "speeds"
API_SYSTEM_FIRMWARE: Final[str] = "system_firmware"
API_SYSTEM_ID: Final[str] = "systemID"
API_SYSTEM_TYPE: Final[str] = "system_type"
API_SYSTEMS: Final[str] = "systems"
API_TEMP_STEP: Final[str] = "temp_step"
API_THERMOS_FIRMWARE: Final[str] = "thermos_firmware"
API_THERMOS_RADIO: Final[str] = "thermos_radio"
API_THERMOS_TYPE: Final[str] = "thermos_type"
API_UNITS: Final[str] = "units"
API_V1: Final[str] = "api/v1"
API_VERSION: Final[str] = "version"
API_WEBSERVER: Final[str] = "webserver"
API_WIFI: Final[str] = "wifi"
API_WIFI_CHANNEL: Final[str] = "wifi_channel"
API_WIFI_QUALITY: Final[str] = "wifi_quality"
API_WIFI_RSSI: Final[str] = "wifi_rssi"
API_WS_AIDOO: Final[str] = "ws_aidoo"
API_WS_AZ: Final[str] = "ws_az"
API_WS_FIRMWARE: Final[str] = "ws_firmware"
API_WS_TYPE: Final[str] = "ws_type"
API_ZONE_ID: Final[str] = "zoneID"

API_DOUBLE_SET_POINT_PARAMS = [
API_ERROR_LOW_BATTERY: Final[str] = "Low battery"
API_ERROR_METHOD_NOT_SUPPORTED: Final[str] = "Method not provided or not supported"
API_ERROR_REQUEST_MALFORMED: Final[str] = "request malformed"
API_ERROR_SYSTEM_ID_NOT_AVAILABLE: Final[str] = "systemid not avaiable"
API_ERROR_SYSTEM_ID_OUT_RANGE: Final[str] = "systemid out of range"
API_ERROR_ZONE_ID_NOT_AVAILABLE: Final[str] = "zoneid not avaiable"
API_ERROR_ZONE_ID_NOT_PROVIDED: Final[str] = "zoneid not provided"
API_ERROR_ZONE_ID_OUT_RANGE: Final[str] = "zoneid out of range"

API_DOUBLE_SET_POINT_PARAMS: Final[list[str]] = [
API_COOL_MAX_TEMP,
API_COOL_MIN_TEMP,
API_COOL_SET_POINT,
API_HEAT_MAX_TEMP,
API_HEAT_MIN_TEMP,
API_HEAT_SET_POINT,
]
API_SYSTEM_PARAMS = [
API_SYSTEM_PARAMS: Final[list[str]] = [
API_MODE,
API_SPEED,
]
API_ZONE_PARAMS = [
API_ZONE_PARAMS: Final[list[str]] = [
API_COOL_SET_POINT,
API_COLD_ANGLE,
API_COLD_STAGE,
Expand All @@ -100,88 +102,88 @@
API_SLEEP,
]

AZD_ABS_TEMP_MAX = "absolute-temp-max"
AZD_ABS_TEMP_MIN = "absolute-temp-min"
AZD_ACTION = "action"
AZD_AIR_DEMAND = "air-demand"
AZD_ANTI_FREEZE = "anti-freeze"
AZD_BATTERY_LOW = "battery-low"
AZD_CLAMP_METER = "clamp-meter"
AZD_COLD_ANGLE = "cold-angle"
AZD_COLD_DEMAND = "cold-demand"
AZD_COLD_STAGE = "cold-stage"
AZD_COLD_STAGES = "cold-stages"
AZD_COOL_TEMP_MAX = "cool-temp-max"
AZD_COOL_TEMP_MIN = "cool-temp-min"
AZD_COOL_TEMP_SET = "cool-temp-set"
AZD_DEMAND = "demand"
AZD_DOUBLE_SET_POINT = "double-set-point"
AZD_ECO_ADAPT = "eco-adapt"
AZD_ENERGY = "energy"
AZD_ERRORS = "errors"
AZD_FIRMWARE = "firmware"
AZD_FULL_NAME = "full-name"
AZD_FLOOR_DEMAND = "floor-demand"
AZD_HEAT_ANGLE = "heat-angle"
AZD_HEAT_DEMAND = "heat-demand"
AZD_HEAT_TEMP_MAX = "heat-temp-max"
AZD_HEAT_TEMP_MIN = "heat-temp-min"
AZD_HEAT_TEMP_SET = "heat-temp-set"
AZD_HEAT_STAGE = "heat-stage"
AZD_HEAT_STAGES = "heat-stages"
AZD_HUMIDITY = "humidity"
AZD_ID = "id"
AZD_INTERFACE = "interface"
AZD_MAC = "mac"
AZD_MANUFACTURER = "manufacturer"
AZD_MASTER = "master"
AZD_MASTER_ZONE = "master-zone"
AZD_MODE = "mode"
AZD_MODEL = "model"
AZD_MODES = "modes"
AZD_NAME = "name"
AZD_NEW_ZONES = "new-zones"
AZD_ON = "on"
AZD_PROBLEMS = "problems"
AZD_SLEEP = "sleep"
AZD_SPEED = "speed"
AZD_SPEEDS = "speeds"
AZD_SYSTEM = "system"
AZD_SYSTEMS = "systems"
AZD_SYSTEMS_NUM = "num-systems"
AZD_TEMP = "temp"
AZD_TEMP_MAX = "temp-max"
AZD_TEMP_MIN = "temp-min"
AZD_TEMP_SET = "temp-set"
AZD_TEMP_STEP = "temp-step"
AZD_TEMP_UNIT = "temp-unit"
AZD_THERMOSTAT_FW = "thermostat-fw"
AZD_THERMOSTAT_MODEL = "thermostat-model"
AZD_THERMOSTAT_RADIO = "thermostat-radio"
AZD_VERSION = "version"
AZD_WEBSERVER = "webserver"
AZD_WIFI_CHANNEL = "wifi-channel"
AZD_WIFI_QUALITY = "wifi-quality"
AZD_WIFI_RSSI = "wifi-rssi"
AZD_ZONES = "zones"
AZD_ZONES_NUM = "num-zones"
AZD_ABS_TEMP_MAX: Final[str] = "absolute-temp-max"
AZD_ABS_TEMP_MIN: Final[str] = "absolute-temp-min"
AZD_ACTION: Final[str] = "action"
AZD_AIR_DEMAND: Final[str] = "air-demand"
AZD_ANTI_FREEZE: Final[str] = "anti-freeze"
AZD_BATTERY_LOW: Final[str] = "battery-low"
AZD_CLAMP_METER: Final[str] = "clamp-meter"
AZD_COLD_ANGLE: Final[str] = "cold-angle"
AZD_COLD_DEMAND: Final[str] = "cold-demand"
AZD_COLD_STAGE: Final[str] = "cold-stage"
AZD_COLD_STAGES: Final[str] = "cold-stages"
AZD_COOL_TEMP_MAX: Final[str] = "cool-temp-max"
AZD_COOL_TEMP_MIN: Final[str] = "cool-temp-min"
AZD_COOL_TEMP_SET: Final[str] = "cool-temp-set"
AZD_DEMAND: Final[str] = "demand"
AZD_DOUBLE_SET_POINT: Final[str] = "double-set-point"
AZD_ECO_ADAPT: Final[str] = "eco-adapt"
AZD_ENERGY: Final[str] = "energy"
AZD_ERRORS: Final[str] = "errors"
AZD_FIRMWARE: Final[str] = "firmware"
AZD_FULL_NAME: Final[str] = "full-name"
AZD_FLOOR_DEMAND: Final[str] = "floor-demand"
AZD_HEAT_ANGLE: Final[str] = "heat-angle"
AZD_HEAT_DEMAND: Final[str] = "heat-demand"
AZD_HEAT_TEMP_MAX: Final[str] = "heat-temp-max"
AZD_HEAT_TEMP_MIN: Final[str] = "heat-temp-min"
AZD_HEAT_TEMP_SET: Final[str] = "heat-temp-set"
AZD_HEAT_STAGE: Final[str] = "heat-stage"
AZD_HEAT_STAGES: Final[str] = "heat-stages"
AZD_HUMIDITY: Final[str] = "humidity"
AZD_ID: Final[str] = "id"
AZD_INTERFACE: Final[str] = "interface"
AZD_MAC: Final[str] = "mac"
AZD_MANUFACTURER: Final[str] = "manufacturer"
AZD_MASTER: Final[str] = "master"
AZD_MASTER_ZONE: Final[str] = "master-zone"
AZD_MODE: Final[str] = "mode"
AZD_MODEL: Final[str] = "model"
AZD_MODES: Final[str] = "modes"
AZD_NAME: Final[str] = "name"
AZD_NEW_ZONES: Final[str] = "new-zones"
AZD_ON: Final[str] = "on"
AZD_PROBLEMS: Final[str] = "problems"
AZD_SLEEP: Final[str] = "sleep"
AZD_SPEED: Final[str] = "speed"
AZD_SPEEDS: Final[str] = "speeds"
AZD_SYSTEM: Final[str] = "system"
AZD_SYSTEMS: Final[str] = "systems"
AZD_SYSTEMS_NUM: Final[str] = "num-systems"
AZD_TEMP: Final[str] = "temp"
AZD_TEMP_MAX: Final[str] = "temp-max"
AZD_TEMP_MIN: Final[str] = "temp-min"
AZD_TEMP_SET: Final[str] = "temp-set"
AZD_TEMP_STEP: Final[str] = "temp-step"
AZD_TEMP_UNIT: Final[str] = "temp-unit"
AZD_THERMOSTAT_FW: Final[str] = "thermostat-fw"
AZD_THERMOSTAT_MODEL: Final[str] = "thermostat-model"
AZD_THERMOSTAT_RADIO: Final[str] = "thermostat-radio"
AZD_VERSION: Final[str] = "version"
AZD_WEBSERVER: Final[str] = "webserver"
AZD_WIFI_CHANNEL: Final[str] = "wifi-channel"
AZD_WIFI_QUALITY: Final[str] = "wifi-quality"
AZD_WIFI_RSSI: Final[str] = "wifi-rssi"
AZD_ZONES: Final[str] = "zones"
AZD_ZONES_NUM: Final[str] = "num-zones"

DEFAULT_PORT = 3000
DEFAULT_SYSTEM_ID = 0
DEFAULT_TEMP_STEP_CELSIUS: float = 0.5
DEFAULT_TEMP_STEP_FAHRENHEIT: float = 1.0
DEFAULT_PORT: Final[int] = 3000
DEFAULT_SYSTEM_ID: Final[int] = 0
DEFAULT_TEMP_STEP_CELSIUS: Final[float] = 0.5
DEFAULT_TEMP_STEP_FAHRENHEIT: Final[float] = 1.0

ERROR_SYSTEM = "system"
ERROR_ZONE = "zone"
ERROR_SYSTEM: Final[str] = "system"
ERROR_ZONE: Final[str] = "zone"

HTTP_CALL_TIMEOUT = 10
HTTP_CALL_TIMEOUT: Final[int] = 10

RAW_DEMO = "demo"
RAW_HVAC = "hvac"
RAW_INTEGRATION = "integration"
RAW_SYSTEMS = "systems"
RAW_VERSION = "version"
RAW_WEBSERVER = "webserver"
RAW_DEMO: Final[str] = "demo"
RAW_HVAC: Final[str] = "hvac"
RAW_INTEGRATION: Final[str] = "integration"
RAW_SYSTEMS: Final[str] = "systems"
RAW_VERSION: Final[str] = "version"
RAW_WEBSERVER: Final[str] = "webserver"

THERMOSTAT_RADIO = "Radio"
THERMOSTAT_WIRED = "Wired"
THERMOSTAT_RADIO: Final[str] = "Radio"
THERMOSTAT_WIRED: Final[str] = "Wired"

0 comments on commit 15a2f60

Please sign in to comment.