Skip to content

Conversation

@MartinHjelmare
Copy link
Contributor

@MartinHjelmare MartinHjelmare commented Jul 26, 2025

  • Consolidate common firmware model parts into base models.
  • No functional changes.

@MartinHjelmare MartinHjelmare marked this pull request as ready for review July 26, 2025 14:53
Copy link
Contributor

@AlCalzone AlCalzone left a comment

Choose a reason for hiding this comment

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

If I understand correctly, the number of files is not exposed for the driver firmware upgrade progress. Even though this is correct now, I wonder if we should expose that information too to stay future-proof without having to touch this again. Just in case zwave-js gains support for multi-step firmware updates for adapters.

Other than that LGTM.

Comment on lines 153 to 154
current_file: int = field(init=False)
total_files: int = field(init=False)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the attributes current_file and total_files?

If it's not supported now, I don't think we should add it. There's no problem with adding them later when they are supported by driver updates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. If we add it now, it's not technically wrong - we're updating file 1 of 1 always. But we don't need to touch the entire stack again when/if that functionality is added in zwave-js.

I don't mind either way, just trying to avoid unnecessary work in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. This is a refactor PR though so we shouldn't add new attributes here. We can do it later when we have time.

@MartinHjelmare MartinHjelmare merged commit 7233dcf into main Jul 28, 2025
3 checks passed
@MartinHjelmare MartinHjelmare deleted the refactor-firmware-models branch July 28, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants