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

Bump zwave-js-server-python to 0.35.3 #70357

Merged
merged 3 commits into from
Apr 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test case for notification event handling
  • Loading branch information
raman325 committed Apr 21, 2022
commit a3c7089d2bbd84ecdd6269b2f92c25ecc83bb5ea
23 changes: 23 additions & 0 deletions tests/components/zwave_js/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,26 @@ async def test_unknown_notification(hass, hank_binary_switch, integration, clien
notification_obj.node = node
with pytest.raises(TypeError):
node.emit("notification", {"notification": notification_obj})

notification_events = async_capture_events(hass, "zwave_js_notification")

# Test a valid notification with an unsupported command class
event = Event(
type="notification",
data={
"source": "node",
"event": "notification",
"nodeId": node.node_id,
"ccId": 0,
"args": {
"commandClassName": "No Operation",
"commandClass": 0,
"testNodeId": 1,
"status": 0,
"acknowledgedFrames": 2,
},
},
)
node.receive_event(event)

assert not notification_events