-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Modbus write_register accept single value and array #21621
Conversation
@fabaff Just recognised, that this merge creates an exception |
Sorry, don’t know how I overlooked this. Forgot double quotes, change to |
Yes, a new PR is needed since this PR is merged. |
Ok, just created PR #21923 to fix this. |
Using 0.90.0 I have several automations using Input Number's to write to registers. These have all been working fine using @Monkey-House multiple modbus hub workaround and @gertdb fix (to write to single values) which became incorporated to 0.90.0 recently.
Also my config is all up and running now (with no trouble at all for modbus sensors, modbus binary sensors and modbus switches) for multiple modbus hubs using:
However I now get this error in my logs when I try to set the register value with input number:
Is there something I have missed in my config or automation changes? |
Please open an issue if you suspect a bug. If you need help please use our help channels: Merged PRs should not be used for support or bug reports. Thanks! |
Description:
Updated voluptuous schema to accept single value and array. That way the correct function code modbus function code is called (0x06 for integer (single register), 0x10 for list (multiple registers)).
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8814
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed: