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

fix: allow State as a valid HA option for 6 States with No Data State Parameter options #6606

Closed
wants to merge 1 commit into from

Conversation

apella12
Copy link
Contributor

PR description here

Not being a HA user and a beginner in ZWave JS, this is highly likely not correct, but I can handle that.

This is a potential hack to address #6584. For the 6 states that allow the "No Data" option as state parameters, the device mfr might not provide a state parameter (optional per the ZW spec) and in this case ZWave JS sends the state, not the state parameter. This throws an HA validation error. The intent of this PR is to add the "state" to the "state parameter" list so that validation will succeed. Conveniently all the "states" are higher than any Zwave "state parameter" options, so the device will never send that "state parameter". It is only to inform HA that the value is allowed and means no data was provided.

Not being a HA user and a beginner in ZWave JS, this is highly likely not correct, but I can handle that.

This is a potential hack to address #6584.  For the 6 states that allow the "No Data" option as state parameters, the device mfr might not provide a state parameter (optional per the ZW spec) and in this case ZWave JS sends the state, not the state parameter.  This throws an HA validation error.  The intent of this PR is to add the "state" to the "state parameter" list so that validation will succeed. Conveniently all the "states" are higher than any Zwave "state parameter" options, so the device will never send that "state parameter".  It is only to inform HA that the value is allowed and means no data was provided.

Signed-off-by: Bob Eckhoff <[email protected]>
@AlCalzone
Copy link
Member

I'm afraid the approach wasn't correct. When there are possible states, we want the value to be one of those, not introduce duplicate states. #6719 solves the issue that way.

@apella12 apella12 deleted the notification branch April 4, 2024 15:20
@apella12
Copy link
Contributor Author

apella12 commented Apr 4, 2024

no worries. Just thought I would try for the learning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config ⚙ Configuration issues or updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants