Skip to content

Commit 86a8db1

Browse files
committed
Add Restore 3 support
1 parent 199ee24 commit 86a8db1

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'homebridge-hatch-baby-rest': minor
3+
---
4+
5+
Add support for Restore 3 (restoreV5)

packages/homebridge-hatch-baby-rest/api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const knownProducts: Product[] = [
3333
Product.restore,
3434
Product.restoreIot,
3535
Product.restoreV4,
36+
Product.restoreV5,
3637
Product.restBaby,
3738
],
3839
ignoredProducts: Product[] = [
@@ -244,6 +245,7 @@ export class HatchBabyApi {
244245
restores: createDevices(Product.restore, Restore),
245246
restoreIots: createDevices(Product.restoreIot, RestIot),
246247
restoreV4s: createDevices(Product.restoreV4, RestIot),
248+
restoreV5s: createDevices(Product.restoreV5, RestIot),
247249
restBabies: createDevices(Product.restBaby, RestIot),
248250
}
249251
}

packages/homebridge-hatch-baby-rest/platform.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export class HatchBabyRestPlatform implements DynamicPlatformPlugin {
7575
restIots,
7676
restIotPluses,
7777
restoreV4s,
78+
restoreV5s,
7879
restBabies,
7980
} = hatchBabyApi
8081
? await hatchBabyApi.getDevices()
@@ -86,6 +87,7 @@ export class HatchBabyRestPlatform implements DynamicPlatformPlugin {
8687
restIotPluses: [],
8788
restoreIots: [],
8889
restoreV4s: [],
90+
restoreV5s: [],
8991
restBabies: [],
9092
},
9193
{ api } = this,
@@ -101,6 +103,7 @@ export class HatchBabyRestPlatform implements DynamicPlatformPlugin {
101103
...restores,
102104
...restoreIots,
103105
...restoreV4s,
106+
...restoreV5s,
104107
...restBabies,
105108
]
106109

packages/homebridge-hatch-baby-rest/rest-iot.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export class RestIot extends IotDevice<RestIotState> implements BaseDevice {
2424
return 'Rest+ 2nd Gen'
2525
case Product.restBaby:
2626
return 'Hatch Baby'
27+
case Product.restoreV4:
28+
return 'Restore 2'
29+
case Product.restoreV5:
30+
return 'Restore 3'
2731
case Product.riot:
2832
return 'Rest 2nd Gen'
2933
default:

packages/shared/hatch-sleep-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const Product = {
77
restore: 'restore',
88
restoreIot: 'restoreIot',
99
restoreV4: 'restoreV4',
10+
restoreV5: 'restoreV5',
1011
alexa: 'alexa',
1112
grow: 'grow',
1213
answeredReader: 'answeredReader',

0 commit comments

Comments
 (0)