-
Notifications
You must be signed in to change notification settings - Fork 21
Add driver firmware v15 commands #1260
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
base: main
Are you sure you want to change the base?
Conversation
49525b8
to
2183109
Compare
@@ -0,0 +1,17 @@ | |||
"""Provide common tools for testing Z-Wave JS server models.""" | |||
|
|||
FIRMWARE_UPDATE_INFO = { |
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.
This is a pure move, no changes.
@@ -44,7 +45,7 @@ async def update_firmware( | |||
|
|||
async def driver_firmware_update_otw( | |||
url: str, | |||
firmware_file: DriverFirmwareUpdateData, | |||
firmware_file: FirmwareUpdateData, |
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've renamed this since the driver has all items that the node firmware updates has.
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.
If we think the driver firmware updates will diverge from the node firmware updates, I can add a simple wrapper called DriverFirmwareUpdateData
that inherits FirmwareUpdateData
.
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 have no plans for this to diverge, as it would require changes to the update service for no significant benefit.
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 think I should make a wrapper anyway to make the models consistently named
from ...util.helpers import convert_bytes_to_base64 | ||
|
||
|
||
class DriverFirmwareUpdateDataDataType(TypedDict, total=False): |
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 renamed and moved these to zwave_js_server/model/firmware.py
.
@@ -190,136 +183,3 @@ def __post_init__(self) -> None: | |||
self.success = self.data["success"] | |||
self.wait_time = self.data.get("waitTime") | |||
self.reinterview = self.data["reInterview"] | |||
|
|||
|
|||
class NodeFirmwareUpdateFileInfoDataType(TypedDict): |
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 renamed and moved these to zwave_js_server.model.firmware.py
.
I'll finish this tomorrow. Please let me know what you think on the open questions above. |
I think we can merge this now. |
I'll make some refactors of the firmware models as a prerequisite to this PR to make it easier to use this in Home Assistant. There are many parts of the node and driver firmware models that are common and we should consolidate those first. |
Uh oh!
There was an error while loading. Please reload this page.