electrolux-group-developer-sdk 0.1.3__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/PKG-INFO +1 -1
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/config.py +24 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/cr_config.py +14 -1
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/dam_ac_config.py +13 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/hb_config.py +26 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/so_config.py +13 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/ac_appliance.py +18 -2
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/ap_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/appliance_data.py +11 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/cr_appliance.py +26 -3
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/dam_ac_appliance.py +10 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/dh_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/dw_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/hb_appliance.py +17 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/hd_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/ov_appliance.py +16 -2
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/rvc_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/so_appliance.py +26 -3
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/td_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/wd_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/wm_appliance.py +3 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/constants.py +1 -1
- electrolux_group_developer_sdk-0.3.0/electrolux_group_developer_sdk/py.typed +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/pyproject.toml +1 -1
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/LICENSE +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/README.md +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/ac_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/ap_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/dh_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/dw_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/hd_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/ov_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/rvc_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/td_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/wd_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/appliance_config/wm_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/auth/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/auth/auth_data.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/auth/invalid_credentials_exception.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/auth/invalid_token_exception.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/auth/token_manager.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/cli_test.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliance_client.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliance_data_factory.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/appliances/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/client_exception.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/client_util.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/__init__.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/appliance.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/appliance_details.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/appliance_state.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/interactive_map.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/livestream_config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/dto/memory_map.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/failed_connection_exception.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/client/rate_limiter.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/config.py +0 -0
- {electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/electrolux_group_developer_sdk/feature_constants.py +0 -0
|
@@ -2,6 +2,8 @@ from typing import Any
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
5
|
+
from ..constants import TYPE, TYPE_STRING, VALUES
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
class ApplianceConfig(BaseModel):
|
|
7
9
|
"""Base appliance config class."""
|
|
@@ -29,3 +31,25 @@ class ApplianceConfig(BaseModel):
|
|
|
29
31
|
def get_property(self, key: str) -> str:
|
|
30
32
|
"""Return the appliance type specific key."""
|
|
31
33
|
return self.mapping.get(key)
|
|
34
|
+
|
|
35
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
36
|
+
"""Get the possible string values the property of a feature can be.
|
|
37
|
+
|
|
38
|
+
This method is only usable for string type features."""
|
|
39
|
+
capability = self.capabilities.get(self.get_property(feature))
|
|
40
|
+
|
|
41
|
+
return self._get_capability_state_string_options(capability)
|
|
42
|
+
|
|
43
|
+
def _get_capability_state_string_options(self, capability: dict[str, Any] | None) -> list[str]:
|
|
44
|
+
"""Get the possible string values the property of a feature can be.
|
|
45
|
+
|
|
46
|
+
This method is only usable for string type features."""
|
|
47
|
+
if capability == None:
|
|
48
|
+
return []
|
|
49
|
+
|
|
50
|
+
if capability.get(TYPE) == TYPE_STRING:
|
|
51
|
+
values = capability.get(VALUES, {})
|
|
52
|
+
return [setting for setting in values]
|
|
53
|
+
|
|
54
|
+
return []
|
|
55
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
from typing import Any
|
|
3
3
|
|
|
4
4
|
from .config import ApplianceConfig
|
|
5
|
-
from ..constants import VALUES, MIN, MAX, STEP, FAHRENHEIT, CR
|
|
5
|
+
from ..constants import TYPE, TYPE_STRING, VALUES, MIN, MAX, STEP, FAHRENHEIT, CR
|
|
6
6
|
from ..feature_constants import *
|
|
7
7
|
|
|
8
8
|
# cavities
|
|
@@ -62,6 +62,19 @@ class CrConfig(ApplianceConfig):
|
|
|
62
62
|
return False
|
|
63
63
|
return False
|
|
64
64
|
|
|
65
|
+
def get_cavity_feature_state_string_options(self, cavity: str, feature: str) -> list[str]:
|
|
66
|
+
"""Get the possible string values the property of a cavity feature can be.
|
|
67
|
+
|
|
68
|
+
This method is only usable for string type features."""
|
|
69
|
+
|
|
70
|
+
cavity_capabilities = self.capabilities.get(cavity)
|
|
71
|
+
if cavity_capabilities is None:
|
|
72
|
+
return []
|
|
73
|
+
|
|
74
|
+
capability = cavity_capabilities.get(self.get_property(feature))
|
|
75
|
+
|
|
76
|
+
return self._get_capability_state_string_options(capability)
|
|
77
|
+
|
|
65
78
|
def get_supported_cavities(self) -> list[str]:
|
|
66
79
|
"""Get supported cavities name from the capabilities."""
|
|
67
80
|
return [key for key in CAVITIES if key in self.capabilities]
|
|
@@ -44,6 +44,19 @@ class DamAcConfig(ApplianceConfig):
|
|
|
44
44
|
ac_capabilities = self._get_air_conditioner_capabilities()
|
|
45
45
|
return key is not None and ac_capabilities is not None and key in ac_capabilities
|
|
46
46
|
|
|
47
|
+
def get_air_conditioner_feature_state_string_options(self, feature: str) -> list[str]:
|
|
48
|
+
"""Get the possible string values the property of an air conditioner feature can be.
|
|
49
|
+
|
|
50
|
+
This method is only usable for string type features."""
|
|
51
|
+
|
|
52
|
+
air_conditioner_capabilities = self._get_air_conditioner_capabilities()
|
|
53
|
+
if air_conditioner_capabilities is None:
|
|
54
|
+
return []
|
|
55
|
+
|
|
56
|
+
capability = air_conditioner_capabilities.get(self.get_property(feature))
|
|
57
|
+
|
|
58
|
+
return self._get_capability_state_string_options(capability)
|
|
59
|
+
|
|
47
60
|
def get_supported_modes(self) -> list[str]:
|
|
48
61
|
"""Get appliance modes."""
|
|
49
62
|
key = self.get_property(MODE)
|
|
@@ -55,6 +55,32 @@ class HbConfig(ApplianceConfig):
|
|
|
55
55
|
hob_zone_capabilities = self.capabilities.get(zone)
|
|
56
56
|
return key is not None and hob_zone_capabilities is not None and key in hob_zone_capabilities
|
|
57
57
|
|
|
58
|
+
def get_hood_feature_state_string_options(self, feature: str) -> list[str]:
|
|
59
|
+
"""Get the possible string values the property of a hood feature can be.
|
|
60
|
+
|
|
61
|
+
This method is only usable for string type features."""
|
|
62
|
+
|
|
63
|
+
hood_capabilities = self.capabilities.get(self.get_property(HOB_HOOD))
|
|
64
|
+
if hood_capabilities is None:
|
|
65
|
+
return []
|
|
66
|
+
|
|
67
|
+
capability = hood_capabilities.get(self.get_property(feature))
|
|
68
|
+
|
|
69
|
+
return self._get_capability_state_string_options(capability)
|
|
70
|
+
|
|
71
|
+
def get_hob_zone_feature_state_string_options(self, zone: str, feature: str) -> list[str]:
|
|
72
|
+
"""Get the possible string values the property of a hob zone feature can be.
|
|
73
|
+
|
|
74
|
+
This method is only usable for string type features."""
|
|
75
|
+
|
|
76
|
+
hob_zone_capabilities = self.capabilities.get(zone)
|
|
77
|
+
if hob_zone_capabilities is None:
|
|
78
|
+
return []
|
|
79
|
+
|
|
80
|
+
capability = hob_zone_capabilities.get(self.get_property(feature))
|
|
81
|
+
|
|
82
|
+
return self._get_capability_state_string_options(capability)
|
|
83
|
+
|
|
58
84
|
def get_supported_hood_fan_speed(self) -> list[str]:
|
|
59
85
|
"""Get supported hood fan speed."""
|
|
60
86
|
values = self.capabilities.get(self.get_property(HOB_HOOD), {}).get(self.get_property(HOOD_FAN_SPEED), {}).get(
|
|
@@ -78,6 +78,19 @@ class SoConfig(ApplianceConfig):
|
|
|
78
78
|
return True
|
|
79
79
|
return False
|
|
80
80
|
return False
|
|
81
|
+
|
|
82
|
+
def get_cavity_feature_state_string_options(self, cavity: str, feature: str) -> list[str]:
|
|
83
|
+
"""Get the possible string values the property of a cavity feature can be.
|
|
84
|
+
|
|
85
|
+
This method is only usable for string type features."""
|
|
86
|
+
|
|
87
|
+
cavity_capabilities = self.capabilities.get(cavity)
|
|
88
|
+
if cavity_capabilities is None:
|
|
89
|
+
return []
|
|
90
|
+
|
|
91
|
+
capability = cavity_capabilities.get(self.get_property(feature))
|
|
92
|
+
|
|
93
|
+
return self._get_capability_state_string_options(capability)
|
|
81
94
|
|
|
82
95
|
def get_supported_cavities(self) -> list[str]:
|
|
83
96
|
"""Get supported cavities name from the capabilities."""
|
|
@@ -5,7 +5,7 @@ from pydantic import PrivateAttr
|
|
|
5
5
|
from .appliance_data import ApplianceData
|
|
6
6
|
from ...appliance_config.ac_config import AcConfig, AcConfigManager, FAN_SPEED_SETTING, MODE, TARGET_TEMPERATURE_C, \
|
|
7
7
|
TARGET_TEMPERATURE_F, EXECUTE_COMMAND
|
|
8
|
-
from ...constants import REPORTED
|
|
8
|
+
from ...constants import CELSIUS, FAHRENHEIT, REPORTED
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class ACAppliance(ApplianceData):
|
|
@@ -24,6 +24,9 @@ class ACAppliance(ApplianceData):
|
|
|
24
24
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
25
25
|
return self._config.is_capability_supported(feature)
|
|
26
26
|
|
|
27
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
28
|
+
return self._config.get_feature_state_string_options(feature)
|
|
29
|
+
|
|
27
30
|
def get_supported_modes(self) -> list[str]:
|
|
28
31
|
"""Return a list of supported modes."""
|
|
29
32
|
return self._config.get_supported_modes()
|
|
@@ -50,7 +53,20 @@ class ACAppliance(ApplianceData):
|
|
|
50
53
|
|
|
51
54
|
def get_current_temperature_unit(self) -> str:
|
|
52
55
|
"""Return the current temperature unit."""
|
|
53
|
-
|
|
56
|
+
|
|
57
|
+
temperature_unit = self._config.get_current_temperature_unit(self.state.properties.get(REPORTED))
|
|
58
|
+
|
|
59
|
+
if temperature_unit is not None:
|
|
60
|
+
return temperature_unit
|
|
61
|
+
|
|
62
|
+
celsiusSupported = self._config.is_capability_supported(TARGET_TEMPERATURE_C)
|
|
63
|
+
fahrenheitSupported = self._config.is_capability_supported(TARGET_TEMPERATURE_F)
|
|
64
|
+
|
|
65
|
+
if (not celsiusSupported) and fahrenheitSupported:
|
|
66
|
+
return FAHRENHEIT
|
|
67
|
+
|
|
68
|
+
return CELSIUS
|
|
69
|
+
|
|
54
70
|
|
|
55
71
|
def get_current_target_temperature_c(self) -> float:
|
|
56
72
|
"""Return the current target temperature in Celsius."""
|
|
@@ -24,6 +24,9 @@ class APAppliance(ApplianceData):
|
|
|
24
24
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
25
25
|
return self._config.is_capability_supported(feature)
|
|
26
26
|
|
|
27
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
28
|
+
return self._config.get_feature_state_string_options(feature)
|
|
29
|
+
|
|
27
30
|
def get_air_quality_map(self) -> dict[str, str]:
|
|
28
31
|
"""Return the air quality map."""
|
|
29
32
|
return self._config.get_air_quality_map()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from abc import abstractmethod
|
|
1
2
|
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from pydantic import BaseModel
|
|
@@ -16,3 +17,13 @@ class ApplianceData(BaseModel):
|
|
|
16
17
|
|
|
17
18
|
def update_state(self, state: ApplianceState) -> None:
|
|
18
19
|
self.state = state
|
|
20
|
+
|
|
21
|
+
@abstractmethod
|
|
22
|
+
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
23
|
+
"""Check if a feature is supported for the appliance."""
|
|
24
|
+
|
|
25
|
+
@abstractmethod
|
|
26
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
27
|
+
"""Get the possible string values the property of a feature can be.
|
|
28
|
+
|
|
29
|
+
This method is only usable for string type features."""
|
|
@@ -2,10 +2,10 @@ from typing import Any
|
|
|
2
2
|
|
|
3
3
|
from pydantic import PrivateAttr
|
|
4
4
|
|
|
5
|
-
from ...appliance_config.cr_config import CrConfig, CrConfigManager, TARGET_TEMPERATURE_F, TARGET_TEMPERATURE_C, \
|
|
5
|
+
from ...appliance_config.cr_config import FREEZER, FRIDGE, CrConfig, CrConfigManager, TARGET_TEMPERATURE_F, TARGET_TEMPERATURE_C, \
|
|
6
6
|
VACATION_HOLIDAY_MODE
|
|
7
7
|
from ...client.appliances.appliance_data import ApplianceData
|
|
8
|
-
from ...constants import REPORTED, MIN, MAX, STEP
|
|
8
|
+
from ...constants import CELSIUS, FAHRENHEIT, REPORTED, MIN, MAX, STEP
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class CRAppliance(ApplianceData):
|
|
@@ -27,6 +27,16 @@ class CRAppliance(ApplianceData):
|
|
|
27
27
|
def is_cavity_feature_supported(self, cavity: str, feature: str) -> bool:
|
|
28
28
|
return self._config.is_cavity_capability_supported(cavity, feature)
|
|
29
29
|
|
|
30
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
31
|
+
return self._config.get_feature_state_string_options(feature)
|
|
32
|
+
|
|
33
|
+
def get_cavity_feature_state_string_options(self, cavity: str, feature: str) -> list[str]:
|
|
34
|
+
"""Get the possible string values the property of a cavity feature can be.
|
|
35
|
+
|
|
36
|
+
This method is only usable for string type features."""
|
|
37
|
+
|
|
38
|
+
return self._config.get_cavity_feature_state_string_options(cavity, feature)
|
|
39
|
+
|
|
30
40
|
def get_supported_cavities(self) -> list[str]:
|
|
31
41
|
"""Get supported cavities name from the capabilities."""
|
|
32
42
|
return self._config.get_supported_cavities()
|
|
@@ -49,7 +59,20 @@ class CRAppliance(ApplianceData):
|
|
|
49
59
|
|
|
50
60
|
def get_current_temperature_unit(self) -> str:
|
|
51
61
|
"""Get the current temperature unit from the reported state."""
|
|
52
|
-
|
|
62
|
+
temperature_unit = self._config.get_current_temperature_unit(self.state.properties.get(REPORTED))
|
|
63
|
+
|
|
64
|
+
if temperature_unit is not None:
|
|
65
|
+
return temperature_unit
|
|
66
|
+
|
|
67
|
+
celsiusSupported = (self._config.is_cavity_capability_supported(FRIDGE, TARGET_TEMPERATURE_C)
|
|
68
|
+
or self._config.is_cavity_capability_supported(FREEZER, TARGET_TEMPERATURE_C))
|
|
69
|
+
fahrenheitSupported = (self._config.is_cavity_capability_supported(FRIDGE, TARGET_TEMPERATURE_F)
|
|
70
|
+
or self._config.is_cavity_capability_supported(FREEZER, TARGET_TEMPERATURE_F))
|
|
71
|
+
|
|
72
|
+
if (not celsiusSupported) and fahrenheitSupported:
|
|
73
|
+
return FAHRENHEIT
|
|
74
|
+
|
|
75
|
+
return CELSIUS
|
|
53
76
|
|
|
54
77
|
def get_current_alerts(self) -> str:
|
|
55
78
|
"""Get the current alerts from the reported state."""
|
|
@@ -28,6 +28,16 @@ class DAMACAppliance(ApplianceData):
|
|
|
28
28
|
def is_air_conditioner_feature_supported(self, feature: str) -> bool:
|
|
29
29
|
return self._config.is_air_conditioner_capability_supported(feature)
|
|
30
30
|
|
|
31
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
32
|
+
return self._config.get_feature_state_string_options(feature)
|
|
33
|
+
|
|
34
|
+
def get_air_conditioner_feature_state_string_options(self, feature: str) -> list[str]:
|
|
35
|
+
"""Get the possible string values the property of an air conditioner feature can be.
|
|
36
|
+
|
|
37
|
+
This method is only usable for string type features."""
|
|
38
|
+
|
|
39
|
+
return self._config.get_air_conditioner_feature_state_string_options(feature)
|
|
40
|
+
|
|
31
41
|
def get_supported_modes(self) -> list[str]:
|
|
32
42
|
"""Return a list of supported modes."""
|
|
33
43
|
return self._config.get_supported_modes()
|
|
@@ -24,6 +24,9 @@ class DHAppliance(ApplianceData):
|
|
|
24
24
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
25
25
|
return self._config.is_capability_supported(feature)
|
|
26
26
|
|
|
27
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
28
|
+
return self._config.get_feature_state_string_options(feature)
|
|
29
|
+
|
|
27
30
|
def is_appliance_on(self) -> bool:
|
|
28
31
|
"""Return True if the appliance is ON, False otherwise."""
|
|
29
32
|
return self._config.is_appliance_on(self.state.properties.get(REPORTED))
|
|
@@ -25,6 +25,9 @@ class DWAppliance(ApplianceData):
|
|
|
25
25
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
26
26
|
return self._config.is_capability_supported(feature)
|
|
27
27
|
|
|
28
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
29
|
+
return self._config.get_feature_state_string_options(feature)
|
|
30
|
+
|
|
28
31
|
def get_supported_programs(self) -> list[str]:
|
|
29
32
|
"""Get appliance programs."""
|
|
30
33
|
return self._config.get_supported_programs()
|
|
@@ -30,6 +30,23 @@ class HBAppliance(ApplianceData):
|
|
|
30
30
|
def is_hob_zone_feature_supported(self, hob_zone: str, feature: str) -> bool:
|
|
31
31
|
return self._config.is_hob_zone_capability_supported(hob_zone, feature)
|
|
32
32
|
|
|
33
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
34
|
+
return self._config.get_feature_state_string_options(feature)
|
|
35
|
+
|
|
36
|
+
def get_hood_feature_state_string_options(self, feature: str) -> list[str]:
|
|
37
|
+
"""Get the possible string values the property of a hood feature can be.
|
|
38
|
+
|
|
39
|
+
This method is only usable for string type features."""
|
|
40
|
+
|
|
41
|
+
return self._config.get_hood_feature_state_string_options(feature)
|
|
42
|
+
|
|
43
|
+
def get_hob_zone_feature_state_string_options(self, hob_zone:str, feature: str) -> list[str]:
|
|
44
|
+
"""Get the possible string values the property of a hob zone feature can be.
|
|
45
|
+
|
|
46
|
+
This method is only usable for string type features."""
|
|
47
|
+
|
|
48
|
+
return self._config.get_hob_zone_feature_state_string_options(hob_zone, feature)
|
|
49
|
+
|
|
33
50
|
def get_supported_hood_fan_speed(self) -> list[str]:
|
|
34
51
|
"""Return the list of supported hood fan speed."""
|
|
35
52
|
return self._config.get_supported_hood_fan_speed()
|
|
@@ -23,6 +23,9 @@ class HDAppliance(ApplianceData):
|
|
|
23
23
|
|
|
24
24
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
25
25
|
return self._config.is_capability_supported(feature)
|
|
26
|
+
|
|
27
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
28
|
+
return self._config.get_feature_state_string_options(feature)
|
|
26
29
|
|
|
27
30
|
def get_supported_hood_fan_level(self) -> list[str]:
|
|
28
31
|
"""Get appliance hood fan level."""
|
|
@@ -6,7 +6,7 @@ from pydantic import PrivateAttr
|
|
|
6
6
|
from .appliance_data import ApplianceData
|
|
7
7
|
from ...appliance_config.ov_config import OvConfig, OvConfigManager, PROGRAM, TARGET_TEMPERATURE_C, \
|
|
8
8
|
TARGET_TEMPERATURE_F, EXECUTE_COMMAND, TARGET_DURATION, CAVITY_LIGHT
|
|
9
|
-
from ...constants import REPORTED, MIN, MAX, STEP
|
|
9
|
+
from ...constants import CELSIUS, FAHRENHEIT, REPORTED, MIN, MAX, STEP
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class OVAppliance(ApplianceData):
|
|
@@ -25,6 +25,9 @@ class OVAppliance(ApplianceData):
|
|
|
25
25
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
26
26
|
return self._config.is_capability_supported(feature)
|
|
27
27
|
|
|
28
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
29
|
+
return self._config.get_feature_state_string_options(feature)
|
|
30
|
+
|
|
28
31
|
def get_supported_programs(self) -> list[str]:
|
|
29
32
|
"""Return a list of supported modes."""
|
|
30
33
|
return self._config.get_supported_programs()
|
|
@@ -65,7 +68,18 @@ class OVAppliance(ApplianceData):
|
|
|
65
68
|
|
|
66
69
|
def get_current_temperature_unit(self) -> str:
|
|
67
70
|
"""Return the current temperature unit."""
|
|
68
|
-
|
|
71
|
+
temperature_unit = self._config.get_current_temperature_unit(self.state.properties.get(REPORTED))
|
|
72
|
+
|
|
73
|
+
if temperature_unit is not None:
|
|
74
|
+
return temperature_unit
|
|
75
|
+
|
|
76
|
+
celsiusSupported = self._config.is_capability_supported(TARGET_TEMPERATURE_C)
|
|
77
|
+
fahrenheitSupported = self._config.is_capability_supported(TARGET_TEMPERATURE_F)
|
|
78
|
+
|
|
79
|
+
if (not celsiusSupported) and fahrenheitSupported:
|
|
80
|
+
return FAHRENHEIT
|
|
81
|
+
|
|
82
|
+
return CELSIUS
|
|
69
83
|
|
|
70
84
|
def get_current_target_temperature_c(self) -> float:
|
|
71
85
|
"""Return the current target temperature in Celsius."""
|
|
@@ -26,6 +26,9 @@ class RVCAppliance(ApplianceData):
|
|
|
26
26
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
27
27
|
return self._config.is_capability_supported(feature)
|
|
28
28
|
|
|
29
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
30
|
+
return self._config.get_feature_state_string_options(feature)
|
|
31
|
+
|
|
29
32
|
def get_supported_modes(self) -> list[str]:
|
|
30
33
|
"""Return the list of supported readable modes."""
|
|
31
34
|
return self._config.get_supported_modes()
|
|
@@ -4,9 +4,9 @@ from typing import Any, Optional
|
|
|
4
4
|
from pydantic import PrivateAttr
|
|
5
5
|
|
|
6
6
|
from .appliance_data import ApplianceData
|
|
7
|
-
from ...appliance_config.so_config import SoConfigManager, SoConfig, PROGRAM, TARGET_TEMPERATURE_C, \
|
|
7
|
+
from ...appliance_config.so_config import BOTTOM_OVEN, UPPER_OVEN, SoConfigManager, SoConfig, PROGRAM, TARGET_TEMPERATURE_C, \
|
|
8
8
|
TARGET_TEMPERATURE_F, EXECUTE_COMMAND, TARGET_DURATION, CAVITY_LIGHT
|
|
9
|
-
from ...constants import REPORTED, MIN, MAX, STEP
|
|
9
|
+
from ...constants import CELSIUS, FAHRENHEIT, REPORTED, MIN, MAX, STEP
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SOAppliance(ApplianceData):
|
|
@@ -28,6 +28,16 @@ class SOAppliance(ApplianceData):
|
|
|
28
28
|
def is_cavity_feature_supported(self, cavity: str, feature) -> bool:
|
|
29
29
|
return self._config.is_cavity_capability_supported(cavity, feature)
|
|
30
30
|
|
|
31
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
32
|
+
return self._config.get_feature_state_string_options(feature)
|
|
33
|
+
|
|
34
|
+
def get_cavity_feature_state_string_options(self, cavity: str, feature: str) -> list[str]:
|
|
35
|
+
"""Get the possible string values the property of a cavity feature can be.
|
|
36
|
+
|
|
37
|
+
This method is only usable for string type features."""
|
|
38
|
+
|
|
39
|
+
return self._config.get_cavity_feature_state_string_options(cavity, feature)
|
|
40
|
+
|
|
31
41
|
def get_supported_cavities(self) -> list[str]:
|
|
32
42
|
"""Get supported cavities name from the capabilities."""
|
|
33
43
|
return self._config.get_supported_cavities()
|
|
@@ -141,7 +151,20 @@ class SOAppliance(ApplianceData):
|
|
|
141
151
|
|
|
142
152
|
def get_current_temperature_unit(self) -> str:
|
|
143
153
|
"""Return the current temperature unit."""
|
|
144
|
-
|
|
154
|
+
temperature_unit = self._config.get_current_temperature_unit(self.state.properties.get(REPORTED))
|
|
155
|
+
|
|
156
|
+
if temperature_unit is not None:
|
|
157
|
+
return temperature_unit
|
|
158
|
+
|
|
159
|
+
celsiusSupported = (self._config.is_cavity_capability_supported(UPPER_OVEN, TARGET_TEMPERATURE_C)
|
|
160
|
+
or self._config.is_cavity_capability_supported(BOTTOM_OVEN, TARGET_TEMPERATURE_C))
|
|
161
|
+
fahrenheitSupported = (self._config.is_cavity_capability_supported(UPPER_OVEN, TARGET_TEMPERATURE_F)
|
|
162
|
+
or self._config.is_cavity_capability_supported(BOTTOM_OVEN, TARGET_TEMPERATURE_F))
|
|
163
|
+
|
|
164
|
+
if (not celsiusSupported) and fahrenheitSupported:
|
|
165
|
+
return FAHRENHEIT
|
|
166
|
+
|
|
167
|
+
return CELSIUS
|
|
145
168
|
|
|
146
169
|
def get_program_command(self, cavity: str, program: str) -> dict[str, Any]:
|
|
147
170
|
"""Return the command payload to set the cavity program."""
|
|
@@ -25,6 +25,9 @@ class TDAppliance(ApplianceData):
|
|
|
25
25
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
26
26
|
return self._config.is_capability_supported(feature)
|
|
27
27
|
|
|
28
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
29
|
+
return self._config.get_feature_state_string_options(feature)
|
|
30
|
+
|
|
28
31
|
def get_supported_programs(self) -> list[str]:
|
|
29
32
|
"""Get appliance programs."""
|
|
30
33
|
return self._config.get_supported_programs()
|
|
@@ -26,6 +26,9 @@ class WDAppliance(ApplianceData):
|
|
|
26
26
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
27
27
|
return self._config.is_capability_supported(feature)
|
|
28
28
|
|
|
29
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
30
|
+
return self._config.get_feature_state_string_options(feature)
|
|
31
|
+
|
|
29
32
|
def get_supported_programs(self) -> list[str]:
|
|
30
33
|
"""Get appliance programs."""
|
|
31
34
|
return self._config.get_supported_programs()
|
|
@@ -26,6 +26,9 @@ class WMAppliance(ApplianceData):
|
|
|
26
26
|
def is_feature_supported(self, feature: str | list[str]) -> bool:
|
|
27
27
|
return self._config.is_capability_supported(feature)
|
|
28
28
|
|
|
29
|
+
def get_feature_state_string_options(self, feature: str) -> list[str]:
|
|
30
|
+
return self._config.get_feature_state_string_options(feature)
|
|
31
|
+
|
|
29
32
|
def get_supported_programs(self) -> list[str]:
|
|
30
33
|
"""Get appliance programs."""
|
|
31
34
|
return self._config.get_supported_programs()
|
|
File without changes
|
{electrolux_group_developer_sdk-0.1.3 → electrolux_group_developer_sdk-0.3.0}/pyproject.toml
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "electrolux-group-developer-sdk"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "A Python async client library for interacting with the Electrolux Developer Portal API."
|
|
5
5
|
authors = ["Electrolux Developer Portal Team <devportal@electrolux.com>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|