-
-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Added possibility to define the data type of Homematic #24078
Conversation
Hey there @pvizeli, @danielperna84, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this to the library. Home Assistant consume data only
I see, that is for the service call. |
…t#24078) * Homematic: Added possibility to define the data type for set_device_value * Fixed coding style * Fixed variable name
Description:
The Homematic CCU needs that we send the correct XML-RPC Data Type for setValue, but parsing the yaml will always return a string.
This example request will be ignored by CCU:
the value should be a int:
Homematic component uses pyhomematic and pyhomematic uses xmlrpc.client.ServerProxy, an as stated under https://docs.python.org/3/library/xmlrpc.client.html#xmlrpc.client.ServerProxy, python data types are converted into the correct XML-RPC Type.
I added an optional value_type parameter where you are able to define the desired data type. Supported data types are (I just used the same naming as XML-RPC Types):
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9513
Example entry for
automation.yaml
:Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: