Skip to content

Commit accf14b

Browse files
fix: persist failureSensorType to JSON config by marking it required in schema (#245)
* Initial plan * fix: add failureSensorType to schema required fields to prevent UI reversion Agent-Logs-Url: https://github.com/homebridge-plugins/homebridge-updater/sessions/fb682c05-a5ad-42aa-8797-ed2322f46498 Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: donavanbecker <9875439+donavanbecker@users.noreply.github.com>
1 parent 54bd6dc commit accf14b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"properties": {}
223223
}
224224
},
225-
"required": ["name", "sensorType"]
225+
"required": ["name", "sensorType", "failureSensorType"]
226226
},
227227
"layout": [
228228
"name",

src/schema.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ describe('config schema validation', () => {
4141
const config = {
4242
name,
4343
sensorType: 'motion',
44+
failureSensorType: 'motion',
4445
platform: 'HomebridgeUpdater',
4546
}
4647

@@ -118,6 +119,7 @@ describe('config schema validation', () => {
118119
const config = {
119120
name: maxLengthName,
120121
sensorType: 'motion',
122+
failureSensorType: 'motion',
121123
platform: 'HomebridgeUpdater',
122124
}
123125

0 commit comments

Comments
 (0)