Skip to content

Bump zwave-js-server-python to 0.23.0 to support zwave-js 7#48094

Merged
raman325 merged 13 commits intohome-assistant:devfrom
raman325:zwave_js_7
Mar 29, 2021
Merged

Bump zwave-js-server-python to 0.23.0 to support zwave-js 7#48094
raman325 merged 13 commits intohome-assistant:devfrom
raman325:zwave_js_7

Conversation

@raman325
Copy link
Copy Markdown
Contributor

@raman325 raman325 commented Mar 19, 2021

Breaking change

The event names for Z-Wave JS value notification (central scene) events will now be called zwave_js_value_notification and notification (e.g. locking or unlocking a lock) events will now be called zwave_js_notification. For notification events, the properties that Z-Wave JS provides have changed, and we have changed the HA event property names to reflect that. The parameter that used to be called label (The human-readable label for the notification event) is now called event_label as there is now a new label property which is the human-readable label for the notification type. In addition, we now support notification events for two command classes, Entry Control and Notification, so the command class is reflected in the event data. You can learn more about the different command class notifications and what each parameter means for the different notifications here: https://zwave-js.github.io/node-zwave-js/#/api/node?id=quotnotificationquot

Proposed change

Bump zwave-js-server-python to 0.23.0 to support zwave-js 7.0.0. Major changes that affect HA include:

  • Addition of a new notification event for the Entry Control CC
  • Changes to the schema of the notification event for the Notification CC
  • get_log_config returns a string for log level (LogLevel switched from IntEnum to Enum)
  • Under the hood, update_log_config also expects a string instead of an int for log level but that translation is transparent to the user/consuming application (e.g. frontend) because we always expected a string as input and transformed it into an int as part of thee voluptuous schema.
  • Switched ThermostatMode and ColorComponent back to IntEnum since current value ID format only uses property key and not property key name (Switch ThermostatMode and ColorComponent back to IntEnum home-assistant-libs/zwave-js-server-python#171)

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link
Copy Markdown

Hey there @home-assistant/z-wave, mind taking a look at this pull request as its been labeled with an integration (zwave_js) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@raman325 raman325 changed the title Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes Bump zwave-js-server-python to 0.23.0 and add new notification event type Mar 19, 2021
@raman325
Copy link
Copy Markdown
Contributor Author

@cgarwood FYI on the get_log_config change

Comment thread homeassistant/components/zwave_js/__init__.py Outdated
Comment thread homeassistant/components/zwave_js/__init__.py Outdated
@raman325 raman325 changed the title Bump zwave-js-server-python to 0.23.0 and add new notification event type Bump zwave-js-server-python to 0.23.0 to support zwave-js 7 Mar 20, 2021
@MartinHjelmare MartinHjelmare self-assigned this Mar 25, 2021
@raman325 raman325 marked this pull request as ready for review March 25, 2021 16:15
@raman325 raman325 removed the waiting-for-upstream We're waiting for a change upstream label Mar 25, 2021
Comment thread homeassistant/components/zwave_js/services.py Outdated
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@raman325
Copy link
Copy Markdown
Contributor Author

test failure appears to be unrelated to this PR

@MartinHjelmare
Copy link
Copy Markdown
Member

@balloob what do you think about the event name split?

@balloob
Copy link
Copy Markdown
Member

balloob commented Mar 26, 2021

In your description

there is now a new label property which is something different

Can you clarify what it is.

@raman325
Copy link
Copy Markdown
Contributor Author

raman325 commented Mar 26, 2021

In your description

there is now a new label property which is something different

Can you clarify what it is.

Updated

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

If we're happy with the event name split, this looks good.

@raman325
Copy link
Copy Markdown
Contributor Author

@balloob any other concerns before we merge? I'd like to get this merged soon so I can unblock the new service and squeeze it in before beta

@raman325 raman325 merged commit dda9f95 into home-assistant:dev Mar 29, 2021
@raman325 raman325 deleted the zwave_js_7 branch March 29, 2021 20:28
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants