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: slave is allowed with custom #98644

Merged
merged 2 commits into from Aug 18, 2023

Conversation

janiversen
Copy link
Member

Breaking change

Proposed change

slave is allowed with custom datatype, but slave_count is not, fixed “if”

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @adamchengtkc, @vzahradnik, mind taking a look at this pull request as it has been labeled with an integration (modbus) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of modbus can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign modbus Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@@ -65,7 +65,7 @@ def struct_validator(config: dict[str, Any]) -> dict[str, Any]:
name = config[CONF_NAME]
structure = config.get(CONF_STRUCTURE)
slave_count = config.get(CONF_SLAVE_COUNT, 0) + 1
slave = config.get(CONF_SLAVE, 0)
config.get(CONF_SLAVE, 0)
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this change, does this really do anything?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are quite right, seems my editor have a life of its own (I am on my ipad away from my mac). Will add a commit in a moment.

@janiversen
Copy link
Member Author

@Kane610 thanks for catching this, I thought the line was deleted. I have added a commit to the PR solving this. Please have another look.

Copy link
Member

@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

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

Now it makes sense to me!

@janiversen janiversen merged commit 1a032ce into home-assistant:dev Aug 18, 2023
29 checks passed
@janiversen janiversen deleted the solve_slave branch August 18, 2023 21:19
@dj4shots
Copy link

image

image

how to fix this?

@nagyrobi
Copy link
Contributor

Yeah same here...
All modbus stuff is dead now...

@janiversen
Copy link
Member Author

Solved on dev.

@nagyrobi
Copy link
Contributor

Given the severity, a quick 2023.8.4 bugfix release should worth it.

@janiversen
Copy link
Member Author

Not my decision, .4 is planned for late august. Please remember there are more than 1.000 integrations and around 40-50 commits every day, so we would end up with a .day release.

You have 2 options:

  • downgrade
  • use dev

@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2023
@janiversen
Copy link
Member Author

Wait for .4, use dev or downgrade, those are the options.

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

Successfully merging this pull request may close these issues.

structure illegal with slave_count / slave @ data['modbus']
5 participants