File: const.py

package info (click to toggle)
python-awair 0.2.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,016 kB
  • sloc: python: 1,041; makefile: 12
file content (25 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Mostly query constants."""
BASE_URL = "https://developer-apis.awair.is/v1"
USER_URL = f"{BASE_URL}/users/self"
DEVICE_URL = f"{USER_URL}/devices"
DATE_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"

SENSOR_TO_ALIAS = {
    "temp": "temperature",
    "humid": "humidity",
    "co2": "carbon_dioxide",
    "voc": "volatile_organic_compounds",
    "pm25": "particulate_matter_2_5",
    "lux": "illuminance",
    "spl_a": "sound_pressure_level",
}

AWAIR_MODELS = {
    "awair": "Awair",
    "awair-element": "Awair Element",
    "awair-glow": "Awair Glow",
    "awair-glow-c": "Awair Glow C",
    "awair-mint": "Awair Mint",
    "awair-omni": "Awair Omni",
    "awair-r2": "Awair 2nd Edition",
}