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
VadymMelnychuk commented 2023-07-11 16:23:16 +02:00 (Migrated from github.com)

In my case I have command StartProgram that has 3 parameters (Commands TestData Link):

  • onOffStatus
  • machMode
  • tempSel

But only onOffStatus is mandatory.
The problem is when I send StartProgram command the body contains all 3 parameters with default values. As result I set tempSel to default value. Instead of this I want to send only mandatory parameters.
I'm also preparing changes Hon repository as well

P.S. It might fix issue with on/off AC too

In my case I have command StartProgram that has 3 parameters ([Commands TestData Link](https://github.com/Andre0512/hon-test-data/blob/12a40ce2dc918e6d21bc1248ba917ad92826f018/test_data/wh_265/commands.json#L114)): - onOffStatus - machMode - tempSel But only `onOffStatus` is mandatory. The problem is when I send `StartProgram` command the body contains all 3 parameters with default values. As result I set `tempSel` to default value. Instead of this I want to send only mandatory parameters. I'm also preparing changes Hon repository as well P.S. It might fix issue with on/off AC too
Andre0512 commented 2023-07-11 18:01:44 +02:00 (Migrated from github.com)

Looks good so far, thanks!
You can also use black locally to format the code 🙂
pip install black; black pyhon/

Looks good so far, thanks! You can also use black locally to format the code 🙂 ```pip install black; black pyhon/```
VadymMelnychuk commented 2023-07-12 10:46:45 +02:00 (Migrated from github.com)

Thanks for help me with black :)
Now it's fixed

Thanks for help me with black :) Now it's fixed
VadymMelnychuk commented 2023-07-13 18:37:13 +02:00 (Migrated from github.com)

@Andre0512
I added more options to manage the process of sending command

@Andre0512 I added more options to manage the process of sending command
Andre0512 commented 2023-07-14 00:52:37 +02:00 (Migrated from github.com)

Good work, I think this can also resolve the new issue https://github.com/Andre0512/hon/issues/92 🙂
To get the actions running, have a look at the python-check.yml. You can test the action local if you run:

pip install -r requirements_dev.txt
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
mypy pyhon/
pylint  $(git ls-files '*.py')
black . --check```
Good work, I think this can also resolve the new issue https://github.com/Andre0512/hon/issues/92 :slightly_smiling_face: To get the actions running, have a look at the [python-check.yml](https://github.com/Andre0512/pyhOn/blob/main/.github/workflows/python-check.yml). You can test the action local if you run: ```bash pip install -r requirements_dev.txt flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics mypy pyhon/ pylint $(git ls-files '*.py') black . --check```
Andre0512 (Migrated from github.com) requested changes 2023-07-16 02:38:53 +02:00
Andre0512 (Migrated from github.com) commented 2023-07-11 17:59:55 +02:00

Please use snake-case here for parameters -> only_mandatory

Please use snake-case here for parameters -> `only_mandatory`
VadymMelnychuk (Migrated from github.com) reviewed 2023-07-17 09:03:19 +02:00
VadymMelnychuk (Migrated from github.com) commented 2023-07-17 09:03:19 +02:00

Done

Done
Andre0512 (Migrated from github.com) approved these changes 2023-07-18 21:25:32 +02:00
Andre0512 commented 2023-07-18 21:37:08 +02:00 (Migrated from github.com)

Thanks! It's now available in the new version v0.15.0 🙂

Thanks! It's now available in the new version `v0.15.0` :slightly_smiling_face:
Sign in to join this conversation.
No description provided.