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

Water Heater. Ability to send only mandatory parameters #14

Merged
merged 11 commits into from
Jul 18, 2023

Conversation

VadymMelnychuk
Copy link
Contributor

@VadymMelnychuk VadymMelnychuk commented Jul 11, 2023

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

@Andre0512
Copy link
Owner

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

@VadymMelnychuk
Copy link
Contributor Author

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

… has many not mandatory parameters and you want to send only one/few
@VadymMelnychuk
Copy link
Contributor Author

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

@Andre0512
Copy link
Owner

Good work, I think this can also resolve the new issue Andre0512/hon#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```

pyhon/commands.py Outdated Show resolved Hide resolved
@Andre0512 Andre0512 merged commit 4f7d486 into Andre0512:main Jul 18, 2023
3 checks passed
@Andre0512
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants