hyxi-cloud-api 1.2.4__tar.gz → 1.2.5__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.
- {hyxi_cloud_api-1.2.4/src/hyxi_cloud_api.egg-info → hyxi_cloud_api-1.2.5}/PKG-INFO +1 -1
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/pyproject.toml +1 -1
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api/__init__.py +1 -1
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api/api.py +4 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5/src/hyxi_cloud_api.egg-info}/PKG-INFO +1 -1
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_extract_device_info_metadata.py +14 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/LICENSE +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/README.md +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/setup.cfg +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api.egg-info/SOURCES.txt +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api.egg-info/dependency_links.txt +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api.egg-info/requires.txt +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api.egg-info/top_level.txt +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_all_in_one.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_api.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_build_plant_tasks.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_caching.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_compute_derived_metrics.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_device_control.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_device_entry.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_devices_errors.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_discovery.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_execute_device_tasks.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_execute_metric_tasks.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_execute_metrics_and_map_alarms.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_extract_battery_info.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fetch_and_process_alarms.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fetch_device_list_for_plant.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fetch_plants.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fetch_state.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fetch_sub_device_list.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_filter_metrics.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_fuzz_parser.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_get_f.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_handle_back_discovery_alarm.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_info_errors.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_mask_id.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_metrics_errors.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_parse_data_list.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_parse_ems_kv.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_parser.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_process_alarms_and_back_discovery.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_process_devices_for_plant.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_sanitize_dict.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_sanitize_list.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_security_fix.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_token_errors.py +0 -0
- {hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_token_handling.py +0 -0
|
@@ -991,6 +991,10 @@ class HyxiApiClient: # pylint: disable=too-many-instance-attributes
|
|
|
991
991
|
if hw_ver:
|
|
992
992
|
entry["hw_version"] = hw_ver
|
|
993
993
|
|
|
994
|
+
detailed_model = i_raw.get("model")
|
|
995
|
+
if detailed_model and detailed_model != entry.get("model"):
|
|
996
|
+
entry["model"] = detailed_model
|
|
997
|
+
|
|
994
998
|
base_info = {
|
|
995
999
|
"hw_version": hw_ver,
|
|
996
1000
|
"_sw_ver_sys": sw_ver,
|
|
@@ -110,3 +110,17 @@ def test_extract_device_info_metadata_micro_ess():
|
|
|
110
110
|
assert base_info["wifiVer"] == "V01.00.00.01"
|
|
111
111
|
assert base_info["ratedFrequency"] == "50"
|
|
112
112
|
assert "batCap" in entry["metrics"]
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def test_extract_device_info_metadata_model():
|
|
116
|
+
"""Test that the model field is extracted and updates the entry when changed."""
|
|
117
|
+
entry = {"metrics": {}, "device_type_code": "UNKNOWN", "model": "generic inverter"}
|
|
118
|
+
i_raw = {"model": "H10K-HT"}
|
|
119
|
+
HyxiApiClient._extract_device_info_metadata(entry, i_raw)
|
|
120
|
+
assert entry["model"] == "H10K-HT"
|
|
121
|
+
|
|
122
|
+
# Verify model is NOT overwritten if not present in response
|
|
123
|
+
entry2 = {"metrics": {}, "device_type_code": "UNKNOWN", "model": "H10K-HT"}
|
|
124
|
+
i_raw2 = {}
|
|
125
|
+
HyxiApiClient._extract_device_info_metadata(entry2, i_raw2)
|
|
126
|
+
assert entry2["model"] == "H10K-HT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/src/hyxi_cloud_api.egg-info/dependency_links.txt
RENAMED
|
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
|
{hyxi_cloud_api-1.2.4 → hyxi_cloud_api-1.2.5}/tests/test_process_alarms_and_back_discovery.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|