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
Conversation
Hey there @adamchengtkc, @vzahradnik, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -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) |
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.
I don't understand this change, does this really do anything?
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.
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.
@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. |
99ee289
to
ff7be1a
Compare
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.
Now it makes sense to me!
Yeah same here... |
Solved on dev. |
Given the severity, a quick 2023.8.4 bugfix release should worth it. |
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:
|
Wait for .4, use dev or downgrade, those are the options. |
Breaking change
Proposed change
slave is allowed with custom datatype, but slave_count is not, fixed “if”
Type of change
Additional information
fixes
structure
illegal withslave_count
/slave
@ data['modbus'] #98643Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: