Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor representation of heat zones (plates) on hobs #373

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions custom_components/miele/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
TEST_DATA_23,
TEST_DATA_24,
TEST_DATA_27,
TEST_DATA_27_OFF,
TEST_DATA_74,
)
from .services import async_setup_services
Expand Down Expand Up @@ -207,7 +208,8 @@ async def _callback_update_data(data) -> None:
# data["1223021"] = TEST_DATA_21
# data["1223023"] = TEST_DATA_23
# data["1223024"] = TEST_DATA_24
# data["1223027"] = TEST_DATA_27
# data["122A027"] = TEST_DATA_27
# data["122B027"] = TEST_DATA_27_OFF
# data["1223074"] = TEST_DATA_74
flat_result: dict = {}
try:
Expand Down Expand Up @@ -289,7 +291,8 @@ async def async_fetch():
# result["1223021"] = TEST_DATA_21
# result["1223023"] = TEST_DATA_23
# result["1223024"] = TEST_DATA_24
# result["1223027"] = TEST_DATA_27
# result["122A027"] = TEST_DATA_27
# result["122B027"] = TEST_DATA_27_OFF
# result["1223074"] = TEST_DATA_74

try:
Expand Down
91 changes: 89 additions & 2 deletions custom_components/miele/devcap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Device capabilities."""
# pylint: disable=too-many-lines

# API Version 1.0.5
# API Version 1.0.7

DEV_TYPES = {
1: "Washing Machine",
Expand Down Expand Up @@ -1043,13 +1044,99 @@
{"value_raw": 15, "value_localized": 8, "key_localized": "Power level"},
{"value_raw": 220, "value_localized": 10, "key_localized": "Power level"},
{"value_raw": 12, "value_localized": 10, "key_localized": "Power level"},
{"value_raw": 118, "value_localized": 10, "key_localized": "Power level"},
],
"ecoFeedback": None,
"batteryLevel": None,
},
}

TEST_DATA_27_OFF = {
"ident": {
"type": {
"key_localized": "Device type",
"value_raw": 27,
"value_localized": "Induction hob",
},
"deviceName": "",
"protocolVersion": 203,
"deviceIdentLabel": {
"fabNumber": "**REDACTED**",
"fabIndex": "00",
"techType": "KM7474",
"matNumber": "",
"swids": ["000"],
},
"xkmIdentLabel": {
"techType": "EK039W",
"releaseVersion": "02.72",
},
},
"state": {
"ProgramID": {
"value_raw": 0,
"value_localized": "",
"key_localized": "Program name",
},
"status": {
"value_raw": 1,
"value_localized": "Off",
"key_localized": "status",
},
"programType": {
"value_raw": 0,
"value_localized": "Program",
"key_localized": "Program type",
},
"programPhase": {
"value_raw": 0,
"value_localized": "",
"key_localized": "Program phase",
},
"remainingTime": [0, 0],
"startTime": [0, 0],
"targetTemperature": [
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
],
"temperature": [
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
{"value_raw": -32768, "value_localized": None, "unit": "Celsius"},
],
"signalInfo": False,
"signalFailure": False,
"signalDoor": False,
"remoteEnable": {
"fullRemoteControl": True,
"smartGrid": False,
"mobileStart": False,
},
"ambientLight": None,
"light": None,
"elapsedTime": [],
"spinningSpeed": {
"unit": "rpm",
"value_raw": None,
"value_localized": "",
"key_localized": "Spin speed",
},
"dryingStep": {
"value_raw": None,
"value_localized": "",
"key_localized": "Drying level",
},
"ventilationStep": {
"value_raw": None,
"value_localized": "",
"key_localized": "Fan level",
},
"plateStep": [],
"ecoFeedback": None,
"batteryLevel": None,
},
}

TEST_DATA_74 = {
"ident": {
"type": {
Expand Down
Loading
Loading