Debian Codegraph @

renson_endura_delta/general_enum.py

raw symbols SCIP
1 """File that contain all generic enums."""
2 from enum import Enum
3
4
5 class ExtendedEnum(Enum):
6 """Special enum for creating list of it."""
7
8 @classmethod
9 def list(cls):
10 """Get list of all values in the enum."""
11 return list(map(lambda c: c.value, cls))
12
13
14 class Quality(ExtendedEnum):
15 """Enum with all quality values."""
16
17 GOOD = "good"
18 POOR = "poor"
19 BAD = "bad"
20
21
22 class Level(ExtendedEnum):
23 """Enum with all level values."""
24
25 OFF = "Off"
26 LEVEL1 = "Level1"
27 LEVEL2 = "Level2"
28 LEVEL3 = "Level3"
29 LEVEL4 = "Level4"
30 BREEZE = "Breeze"
31 HOLIDAY = "Holiday"
32
33
34 class DataType(ExtendedEnum):
35 """Enum with all data types the library can return."""
36
37 NUMERIC = "numeric"
38 STRING = "string"
39 LEVEL = "level"
40 QUALITY = "quality"
41 BOOLEAN = "boolean"
42
43
44 class ServiceNames(ExtendedEnum):
45 """All the service fields of the Renson ventilation unit."""
46
47 SET_MANUAL_LEVEL_FIELD = "Manual level"
48 TIME_AND_DATE_FIELD = "Date and time"
49 TIMER_FIELD = "Ventilation timer"
50 BREEZE_TEMPERATURE_FIELD = "Breeze activation temperature"
51 BREEZE_ENABLE_FIELD = "Breeze enable"
52 BREEZE_LEVEL_FIELD = "Breeze level"
53 DAYTIME_FIELD = "Start daytime"
54 NIGHTTIME_FIELD = "Start night-time"
55 DAY_POLLUTION_FIELD = "Day pollution-triggered ventilation level"
56 NIGHT_POLLUTION_FIELD = "Night pollution-triggered ventilation level"
57 HUMIDITY_CONTROL_FIELD = "Trigger internal pollution alert on RH"
58 AIR_QUALITY_CONTROL_FIELD = "Trigger internal pollution alert on IAQ"
59 CO2_CONTROL_FIELD = "Trigger internal pollution alert on CO2"
60 CO2_THRESHOLD_FIELD = "CO2 threshold"
61 CO2_HYSTERESIS_FIELD = "CO2 hysteresis"
62 FILTER_DAYS_FIELD = "Filter preset time"
63 FILTER_REMAIN_FIELD = "Filter remaining time"