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

Add newly added API fields to the status message definitions #83

Merged
merged 1 commit into from
Jan 2, 2024
Merged
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
13 changes: 13 additions & 0 deletions custom_components/maestro_mcz/maestro/responses/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class Status:
site_time_zone: str | None = None
blocking_event_id: str | None = None
pren_acc: bool | None = None
umid_rel: float | None = None

#first generation M1+ only fields
pwd_wifi: str | None = None
Expand Down Expand Up @@ -139,6 +140,11 @@ class Status:
soglia_temp_cons_cald: float | None = None
com_inv_pos_bruciatore: bool | None = None
tempo_sleep: int | None = None
temp_max_stufa_off: float | None = None
temp_min_stufa_on: float | None = None
is_config_valid: bool | None = None
ingr_flux: float | None = None
soglia_usc_temp: float | None = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soglia_usc_temp is not available on my stove

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Crisicus, this is optional, some models have it, others not.


unknown_fields: dict | None = None

Expand Down Expand Up @@ -235,6 +241,8 @@ def __init__(self, json, from_mocked_response = False) -> None:
case "SiteTimeZone": self.site_time_zone = json[key]
case "BlockingEventId": self.blocking_event_id = json[key]
case "pren_acc" : self.pren_acc = json[key]
case "umid_rel" : self.umid_rel = json[key]


case "pwd_wifi": self.pwd_wifi = json[key]
case "mac_wifi": self.mac_wifi = json[key]
Expand Down Expand Up @@ -282,6 +290,11 @@ def __init__(self, json, from_mocked_response = False) -> None:
case "soglia_temp_cons_cald": self.soglia_temp_cons_cald = json[key]
case "com_inv_pos_bruciatore": self.com_inv_pos_bruciatore = json[key]
case "tempo_sleep": self.tempo_sleep = json[key]
case "temp_max_stufa_off": self.temp_max_stufa_off = json[key]
case "temp_min_stufa_on": self.temp_min_stufa_on = json[key]
case "isConfigValid": self.is_config_valid = json[key]
case "ingr_flux": self.ingr_flux = json[key]
case "soglia_usc_temp": self.soglia_usc_temp = json[key]
case _ :
temp_unknown_fields[key] = json[key]
_LOGGER.warning(f"Unknown status property '{key}' received from API endpoint. If this happens, please make an issue on the github repository")
Expand Down