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

chore: implement ESLint rule to avoid unnecessary min/maxValue in config parameters #6322

Merged
merged 2 commits into from
Sep 26, 2023
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
1 change: 1 addition & 0 deletions packages/config/config/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ module.exports = {
],
rules: {
"@zwave-js/consistent-device-config-property-order": "error",
"@zwave-js/no-unnecessary-min-max-value": "error"
}
};
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x0005/pe653.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@
"label": "Freeze Protection: Turn On VSP Speed",
"description": "Requires variable speed pump and connected air/freeze sensor.",
"valueSize": 4,
"minValue": 0,
"maxValue": 5,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x001a/rf9501.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@
"label": "Forward Z-Wave Commands",
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x001a/rf9540-n_0.0_1.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@
"label": "Forward Z-Wave Commands",
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x001a/rf9540-n_1.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@
"label": "Forward Z-Wave Commands",
"description": "Keep associated accessory switches in sync",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
6 changes: 0 additions & 6 deletions packages/config/config/devices/0x015f/mh-ds221.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"#": "2",
"label": "External Switch Type",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"allowManualEntry": false,
"options": [
Expand All @@ -42,8 +40,6 @@
"#": "3",
"label": "External Switch Behavior",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -82,8 +78,6 @@
"#": "8",
"label": "Reports To Group 2",
"valueSize": 1,
"minValue": 0,
"maxValue": 255,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x0178/nx1000.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@
"#": "29",
"label": "Screen Timeout: Primary Page",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
8 changes: 0 additions & 8 deletions packages/config/config/devices/0x0258/nas-pd02z-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
"description": "Period during which motion is measured.",
"valueSize": 1,
"unit": "seconds",
"minValue": 0,
"maxValue": 3,
"defaultValue": 2,
"allowManualEntry": false,
"options": [
Expand All @@ -68,8 +66,6 @@
"label": "Motion Sensor: Pulse Count",
"description": "Number of times motion must be detected within set window time before a detection message is sent.",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -97,8 +93,6 @@
"description": "Time the sensor waits before sending a next motion detected message.",
"valueSize": 1,
"unit": "seconds",
"minValue": 0,
"maxValue": 15,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -197,8 +191,6 @@
"#": "9",
"label": "Motion Control: Basic Set Level",
"valueSize": 1,
"minValue": 0,
"maxValue": 100,
"defaultValue": 100,
"allowManualEntry": false,
"options": [
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x027a/zse09.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
"#": "8",
"label": "Light Trigger",
"valueSize": 1,
"minValue": 0,
"maxValue": 255,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
4 changes: 0 additions & 4 deletions packages/config/config/devices/0x027a/zse33.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
"#": "4",
"label": "Chime Volume",
"valueSize": 1,
"minValue": 1,
"maxValue": 3,
"defaultValue": 3,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -103,8 +101,6 @@
"#": "7",
"label": "Operating Mode",
"valueSize": 1,
"minValue": 1,
"maxValue": 2,
"defaultValue": 2,
"allowManualEntry": false,
"options": [
Expand Down
6 changes: 0 additions & 6 deletions packages/config/config/devices/0x0312/zks31.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
"#": "2",
"label": "LED Indicator Color",
"valueSize": 1,
"minValue": 0,
"maxValue": 6,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -188,8 +186,6 @@
"#": "24",
"label": "Center Press: Brightness",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -245,8 +241,6 @@
"#": "19",
"label": "External Switch Type",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
2 changes: 0 additions & 2 deletions packages/config/config/devices/0x0312/zw39.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
"#": "10",
"label": "Local Dimmer Speed Control",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"allowManualEntry": false,
"options": [
Expand Down
4 changes: 0 additions & 4 deletions packages/config/config/devices/0x0313/e0400z-ef.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
"label": "Basic Set Value (Open)",
"description": "Allowable range: 0-99, 255",
"valueSize": 1,
"minValue": 0,
"maxValue": 255,
"defaultValue": 255,
"unsigned": true,
"allowManualEntry": false,
Expand All @@ -60,8 +58,6 @@
"label": "Basic Set Value (Close)",
"description": "Allowable range: 0-99, 255",
"valueSize": 1,
"minValue": 0,
"maxValue": 255,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
12 changes: 0 additions & 12 deletions packages/config/config/devices/0x031e/vzw31-sn.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@
"#": "21",
"label": "Power Type",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
Expand All @@ -269,8 +267,6 @@
"#": "22",
"label": "Switch Type",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -385,8 +381,6 @@
"$if": "firmwareVersion >= 0.11",
"label": "Exclusion Behavior",
"valueSize": 1,
"minValue": 0,
"maxValue": 2,
"defaultValue": 1,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -605,8 +599,6 @@
"#": "100",
"label": "LED Brightness Scaling",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand All @@ -631,8 +623,6 @@
"#": "158",
"label": "Dimmer Mode",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -674,8 +664,6 @@
"#": "161",
"label": "Relay Click in On/Off Mode",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"allowManualEntry": false,
"options": [
Expand Down
6 changes: 0 additions & 6 deletions packages/config/config/devices/0x0330/sr-zv9032a-eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
"label": "Motion Blind Time",
"description": "The amount of time the sensor will not report motion after it has reported motion.",
"valueSize": 1,
"minValue": 0,
"maxValue": 15,
"defaultValue": 15,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -131,8 +129,6 @@
"label": "Pulse Count",
"description": "Number of moves required for the sensor to report motion. Higher values = less sensitive.",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand All @@ -159,8 +155,6 @@
"label": "Motion Window Time",
"description": "The amount of time the moves specified in parameter #3 need to take place in for the sensor to report motion. Higher values = more sensitive.",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 2,
"allowManualEntry": false,
"options": [
Expand Down
6 changes: 0 additions & 6 deletions packages/config/config/devices/0x0330/sr-zv9080a-a.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
"#": "3",
"label": "Working mode",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 2,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -107,8 +105,6 @@
"label": "Switch Configuration",
"description": "Light mode only",
"valueSize": 1,
"minValue": 0,
"maxValue": 4,
"defaultValue": 0,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -143,8 +139,6 @@
"#": "9",
"label": "Send Central Scene Notifications",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand Down
4 changes: 0 additions & 4 deletions packages/config/config/devices/0x0371/zwa042.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"#": "1",
"label": "LED Indicator",
"valueSize": 1,
"minValue": 0,
"maxValue": 4,
"defaultValue": 2,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -136,8 +134,6 @@
"#": "7",
"label": "Local & Z-Wave Control",
"valueSize": 1,
"minValue": 0,
"maxValue": 2,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
6 changes: 0 additions & 6 deletions packages/config/config/devices/0x0384/ha-zw-5sab.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@
"#": "110",
"label": "Status Change (Temperature/Humidity/Luminance/Battery) Reporting",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down Expand Up @@ -199,8 +197,6 @@
"#": "14",
"label": "Send Basic Set On Motion",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand All @@ -219,8 +215,6 @@
"#": "15",
"label": "Motion: Basic Set Value",
"valueSize": 1,
"minValue": 0,
"maxValue": 1,
"defaultValue": 0,
"unsigned": true,
"allowManualEntry": false,
Expand Down
8 changes: 0 additions & 8 deletions packages/config/config/devices/0x039a/INT-SMMD-N1.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
"label": "Motion Window Time",
"description": "The amount of time the moves specified in parameter #3 need to take place in for the sensor to report motion. Higher values = more sensitive.",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 2,
"allowManualEntry": false,
"options": [
Expand All @@ -56,8 +54,6 @@
"label": "Pulse Count",
"description": "Number of moves required for the sensor to report motion. Higher values = less sensitive.",
"valueSize": 1,
"minValue": 0,
"maxValue": 3,
"defaultValue": 1,
"allowManualEntry": false,
"options": [
Expand All @@ -84,8 +80,6 @@
"label": "Motion Blind Time",
"description": "The amount of time the sensor will not report motion after it has reported motion.",
"valueSize": 1,
"minValue": 0,
"maxValue": 15,
"defaultValue": 15,
"allowManualEntry": false,
"options": [
Expand Down Expand Up @@ -186,8 +180,6 @@
"#": "9",
"label": "Group 2: Basic Set Level",
"valueSize": 1,
"minValue": 0,
"maxValue": 100,
"defaultValue": 100,
"allowManualEntry": false,
"options": [
Expand Down
Loading