Water Heater. Ability to send only mandatory parameters #14

Merged
VadymMelnychuk merged 11 commits from main into main 2023-07-18 21:26:11 +02:00
Showing only changes of commit ecdb976c41 - Show all commits

View File

@ -120,7 +120,8 @@ class HonCommand:
self._parameters[name] = HonParameterProgram(name, self, "custom") self._parameters[name] = HonParameterProgram(name, self, "custom")
async def send(self, onlyMandatory: bool = False) -> bool: async def send(self, onlyMandatory: bool = False) -> bool:
grouped_params = self.mandatory_parameter_groups if onlyMandatory else self.parameter_groups grouped_params = self.mandatory_parameter_groups \
if onlyMandatory else self.parameter_groups
params = grouped_params.get("parameters", {}) params = grouped_params.get("parameters", {})
ancillary_params = self.parameter_groups.get("ancillaryParameters", {}) ancillary_params = self.parameter_groups.get("ancillaryParameters", {})
ancillary_params.pop("programRules", None) ancillary_params.pop("programRules", None)