mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-17 00:24:25 -04:00
Issue with sync_command (#16)
* Added water heater appliance. Added ability to send only mandatory parameters * fixed build * formatting * cleanup * cleanup * reformatting * Added ability to send specific parameters. Useful in case the command has many not mandatory parameters and you want to send only one/few * cleanup * Fixed code style * sync_command - fixed typos, skip to sync(actually reset) parameters of different types. Improved WaterHeater appliance * cleanup * cleanup * clean code style * check if base parameter is mandatory * Reverted back sync_command, send mandatory parameters beside with specified --------- Co-authored-by: Vadym Melnychuk <vme@primexm.com>
This commit is contained in:
parent
ff8ae160bb
commit
6ae40481e3
3 changed files with 20 additions and 5 deletions
pyhon
|
@ -132,7 +132,7 @@ class HonCommand:
|
|||
async def send_specific(self, param_names: List[str]) -> bool:
|
||||
params: Dict[str, str | float] = {}
|
||||
for key, parameter in self._parameters.items():
|
||||
if key in param_names:
|
||||
if key in param_names or parameter.mandatory:
|
||||
params[key] = parameter.value
|
||||
return await self.send_parameters(params)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue