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

Modbus write_register accept integer and list #18425

Closed
wants to merge 3 commits into from
Closed

Modbus write_register accept integer and list #18425

wants to merge 3 commits into from

Conversation

gertdb
Copy link
Contributor

@gertdb gertdb commented Nov 13, 2018

Updated voluptuous schema to accept integer and list. That way the correct function code modbus function code is called (0x06 for integer (single register), 0x10 for list (multiple registers)).

Description:

Related issue (if applicable): fixes #

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

Updated voluptuous schema to accept integer and list. That way the correct function code modbus function code is called (0x06 for integer (single register), 0x10 for list (multiple registers)).
@homeassistant
Copy link
Contributor

Hi @gertdb,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@ghost ghost added the in progress label Nov 13, 2018
@@ -60,7 +60,7 @@
SERVICE_WRITE_REGISTER_SCHEMA = vol.Schema({
vol.Required(ATTR_UNIT): cv.positive_int,
vol.Required(ATTR_ADDRESS): cv.positive_int,
vol.Required(ATTR_VALUE): vol.All(cv.ensure_list, [cv.positive_int])
vol.Required(ATTR_VALUE): vol.Any(cv.positive_int, vol.All(cv.ensure_list, [cv.positive_int]))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (98 > 79 characters)

@homeassistant
Copy link
Contributor

Hi @gertdb,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@@ -60,7 +60,9 @@
SERVICE_WRITE_REGISTER_SCHEMA = vol.Schema({
vol.Required(ATTR_UNIT): cv.positive_int,
vol.Required(ATTR_ADDRESS): cv.positive_int,
vol.Required(ATTR_VALUE): vol.All(cv.ensure_list, [cv.positive_int])
vol.Required(ATTR_VALUE): vol.Any(
cv.positive_int,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@frenck
Copy link
Member

frenck commented Nov 19, 2018

Could not find a related documentation PR, adding docs-missing label.

@balloob
Copy link
Member

balloob commented Nov 27, 2018

Besides documentation also requires an update to components/services.yaml

@balloob
Copy link
Member

balloob commented Jan 11, 2019

This PR seems to have gone stale. Closing it.

@balloob balloob closed this Jan 11, 2019
@ghost ghost removed the in progress label Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants