Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions homeassistant/components/zwave_js/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,13 @@ def get_config_parameter_discovery_schema(
dependent_value=ZwaveValueID(2, CommandClass.CONFIGURATION, endpoint=0),
),
),
# FortrezZ SSA1/SSA2
# FortrezZ SSA1/SSA2/SSA3
ZWaveDiscoverySchema(
platform="select",
hint="multilevel_switch",
manufacturer_id={0x0084},
product_id={0x0107, 0x0108, 0x010B, 0x0205},
product_type={0x0311, 0x0313, 0x0341, 0x0343},
product_type={0x0311, 0x0313, 0x0331, 0x0341, 0x0343},
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
data_template=BaseDiscoverySchemaDataTemplate(
{
Expand Down
14 changes: 14 additions & 0 deletions tests/components/zwave_js/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,12 @@ def fortrezz_ssa1_siren_state_fixture():
return json.loads(load_fixture("zwave_js/fortrezz_ssa1_siren_state.json"))


@pytest.fixture(name="fortrezz_ssa3_siren_state", scope="session")
def fortrezz_ssa3_siren_state_fixture():
"""Load the fortrezz ssa3 siren node state fixture data."""
return json.loads(load_fixture("zwave_js/fortrezz_ssa3_siren_state.json"))


@pytest.fixture(name="client")
def mock_client_fixture(controller_state, version_state, log_config_state):
"""Mock a client."""
Expand Down Expand Up @@ -901,6 +907,14 @@ def fortrezz_ssa1_siren_fixture(client, fortrezz_ssa1_siren_state):
return node


@pytest.fixture(name="fortrezz_ssa3_siren")
def fortrezz_ssa3_siren_fixture(client, fortrezz_ssa3_siren_state):
"""Mock a fortrezz ssa3 siren node."""
node = Node(client, copy.deepcopy(fortrezz_ssa3_siren_state))
client.driver.controller.nodes[node.node_id] = node
return node


@pytest.fixture(name="firmware_file")
def firmware_file_fixture():
"""Return mock firmware file stream."""
Expand Down
355 changes: 355 additions & 0 deletions tests/components/zwave_js/fixtures/fortrezz_ssa3_siren_state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,355 @@
{
"nodeId": 61,
"index": 0,
"status": 4,
"ready": true,
"isListening": true,
"isRouting": true,
"isSecure": false,
"manufacturerId": 132,
"productId": 267,
"productType": 817,
"firmwareVersion": "1.11",
"deviceConfig": {
"filename": "/data/db/devices/0x0084/ssa3.json",
"isEmbedded": true,
"manufacturer": "FortrezZ LLC",
"manufacturerId": 132,
"label": "SSA3",
"description": "Siren and Strobe Alarm",
"devices": [
{
"productType": 833,
"productId": 517
},
{
"productType": 817,
"productId": 267
}
],
"firmwareVersion": {
"min": "0.0",
"max": "255.255"
},
"paramInformation": {
"_map": {}
}
},
"label": "SSA3",
"interviewAttempts": 1,
"endpoints": [
{
"nodeId": 61,
"index": 0,
"deviceClass": {
"basic": {
"key": 4,
"label": "Routing Slave"
},
"generic": {
"key": 17,
"label": "Multilevel Switch"
},
"specific": {
"key": 0,
"label": "Unused"
},
"mandatorySupportedCCs": [
32,
38
],
"mandatoryControlledCCs": []
}
}
],
"values": [
{
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "targetValue",
"propertyName": "targetValue",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": true,
"label": "Target value",
"valueChangeOptions": [
"transitionDuration"
],
"min": 0,
"max": 99
}
},
{
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "duration",
"propertyName": "duration",
"ccVersion": 1,
"metadata": {
"type": "duration",
"readable": true,
"writeable": true,
"label": "Transition duration"
}
},
{
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "currentValue",
"propertyName": "currentValue",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Current value",
"min": 0,
"max": 99
},
"value": 0
},
{
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "Up",
"propertyName": "Up",
"ccVersion": 1,
"metadata": {
"type": "boolean",
"readable": true,
"writeable": true,
"label": "Perform a level change (Up)",
"ccSpecific": {
"switchType": 2
}
}
},
{
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "Down",
"propertyName": "Down",
"ccVersion": 1,
"metadata": {
"type": "boolean",
"readable": true,
"writeable": true,
"label": "Perform a level change (Down)",
"ccSpecific": {
"switchType": 2
}
}
},
{
"endpoint": 0,
"commandClass": 114,
"commandClassName": "Manufacturer Specific",
"property": "manufacturerId",
"propertyName": "manufacturerId",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Manufacturer ID",
"min": 0,
"max": 65535
},
"value": 132
},
{
"endpoint": 0,
"commandClass": 114,
"commandClassName": "Manufacturer Specific",
"property": "productType",
"propertyName": "productType",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Product type",
"min": 0,
"max": 65535
},
"value": 817
},
{
"endpoint": 0,
"commandClass": 114,
"commandClassName": "Manufacturer Specific",
"property": "productId",
"propertyName": "productId",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Product ID",
"min": 0,
"max": 65535
},
"value": 267
},
{
"endpoint": 0,
"commandClass": 134,
"commandClassName": "Version",
"property": "libraryType",
"propertyName": "libraryType",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": false,
"label": "Library type",
"states": {
"0": "Unknown",
"1": "Static Controller",
"2": "Controller",
"3": "Enhanced Slave",
"4": "Slave",
"5": "Installer",
"6": "Routing Slave",
"7": "Bridge Controller",
"8": "Device under Test",
"9": "N/A",
"10": "AV Remote",
"11": "AV Device"
}
},
"value": 6
},
{
"endpoint": 0,
"commandClass": 134,
"commandClassName": "Version",
"property": "protocolVersion",
"propertyName": "protocolVersion",
"ccVersion": 1,
"metadata": {
"type": "string",
"readable": true,
"writeable": false,
"label": "Z-Wave protocol version"
},
"value": "2.97"
},
{
"endpoint": 0,
"commandClass": 134,
"commandClassName": "Version",
"property": "firmwareVersions",
"propertyName": "firmwareVersions",
"ccVersion": 1,
"metadata": {
"type": "string[]",
"readable": true,
"writeable": false,
"label": "Z-Wave chip firmware versions"
},
"value": [
"1.11"
]
},
{
"endpoint": 0,
"commandClass": 112,
"commandClassName": "Configuration",
"property": 1,
"propertyName": "Delay before accept of Basic Set Off",
"ccVersion": 1,
"metadata": {
"type": "number",
"readable": true,
"writeable": true,
"label": "Delay before accept of Basic Set Off",
"default": 0,
"min": 0,
"max": 255,
"valueSize": 1,
"format": 1,
"allowManualEntry": true,
"isFromConfig": true
},
"value": 0
}
],
"isFrequentListening": false,
"maxDataRate": 40000,
"supportedDataRates": [
40000
],
"protocolVersion": 3,
"supportsBeaming": true,
"supportsSecurity": false,
"nodeType": 1,
"deviceClass": {
"basic": {
"key": 4,
"label": "Routing Slave"
},
"generic": {
"key": 17,
"label": "Multilevel Switch"
},
"specific": {
"key": 0,
"label": "Unused"
},
"mandatorySupportedCCs": [
32,
38
],
"mandatoryControlledCCs": []
},
"commandClasses": [
{
"id": 38,
"name": "Multilevel Switch",
"version": 1,
"isSecure": false
},
{
"id": 114,
"name": "Manufacturer Specific",
"version": 1,
"isSecure": false
},
{
"id": 134,
"name": "Version",
"version": 1,
"isSecure": false
},
{
"id": 113,
"name": "Notification",
"version": 2,
"isSecure": false
},
{
"id": 112,
"name": "Configuration",
"version": 1,
"isSecure": false
}
],
"interviewStage": "Complete",
"deviceDatabaseUrl": "https://devices.zwave-js.io/?jumpTo=0x0084:0x0331:0x010b:1.11",
"statistics": {
"commandsTX": 12,
"commandsRX": 11,
"commandsDroppedRX": 0,
"commandsDroppedTX": 0,
"timeoutResponse": 1
},
"highestSecurityClass": -1
}
Loading