-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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 scan_interval: 0 is correct configuration #112619
Conversation
if no_entities: | ||
err = f"Modbus {hub[CONF_NAME]} is instable without entities, please add entities!" | ||
_LOGGER.warning(err) | ||
# Ensure timeout is not started/handled. | ||
hub[CONF_TIMEOUT] = -1 |
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.
What would be a use case of adding a hub without adding entities?
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.
In a HA core only, none !
But there are a couple of custom components, who use a base modbus configuration, to add there own configuration on top...and thus use the modbus integration code instead of duplicating it (duplicating it gives nasty dependencies because both use the same library).
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.
But when custom components add entities, is it still unstable?
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.
No, it is only when running without entities....otherwise I would have issued an error and stopped the loading.
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.
Hang on, I made a mistake....the discussion we are having belong to PR #11618, and should not be here...
this one is just a single "if".
Sorry for the mistake, give me 2 seconds, and you will have a commit that correct this PR.
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.
@joostlek updated to be correct....when I created the branch, I forgot to start from dev :-( my mistake.
Breaking change
Proposed change
When scan_interval < 5 a warning is issued, that it may cause stability issues, however 0 is allowed for read-once entities.
Type of change
Additional information
fixes Modbus: scan_interval:0 detected as invalid #112616
Checklist
ruff format 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: