@homebridge-plugins/homebridge-smarthq 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +0 -4
- package/CHANGELOG.md +208 -0
- package/dist/devices/clothesDryer.d.ts +10 -0
- package/dist/devices/clothesDryer.d.ts.map +1 -0
- package/dist/devices/clothesDryer.js +42 -0
- package/dist/devices/clothesDryer.js.map +1 -0
- package/dist/devices/clothesWasher.d.ts +10 -0
- package/dist/devices/clothesWasher.d.ts.map +1 -0
- package/dist/devices/clothesWasher.js +42 -0
- package/dist/devices/clothesWasher.js.map +1 -0
- package/dist/devices/dishwasher.d.ts.map +1 -1
- package/dist/devices/dishwasher.js +24 -9
- package/dist/devices/dishwasher.js.map +1 -1
- package/dist/devices/hood.d.ts +34 -0
- package/dist/devices/hood.d.ts.map +1 -0
- package/dist/devices/hood.js +306 -0
- package/dist/devices/hood.js.map +1 -0
- package/dist/devices/oven.d.ts.map +1 -1
- package/dist/devices/oven.js +45 -21
- package/dist/devices/oven.js.map +1 -1
- package/dist/devices/refrigerator.d.ts.map +1 -1
- package/dist/devices/refrigerator.js +11 -15
- package/dist/devices/refrigerator.js.map +1 -1
- package/dist/platform.d.ts +3 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +114 -0
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +2 -0
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +3 -0
- package/dist/settings.js.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/SmartHQPlatform.html +8 -8
- package/docs/interfaces/DeviceOptions.html +2 -2
- package/docs/interfaces/SmartHQPlatformConfig.html +2 -2
- package/docs/interfaces/SmartHqContext.html +2 -2
- package/docs/interfaces/SmartHqERDResponse.html +2 -2
- package/docs/interfaces/credentials.html +2 -2
- package/docs/interfaces/devicesConfig.html +2 -2
- package/docs/interfaces/options.html +2 -2
- package/docs/variables/API_URL.html +1 -1
- package/docs/variables/ERD_CODES.html +1 -1
- package/docs/variables/ERD_TYPES.html +1 -1
- package/docs/variables/KEEPALIVE_TIMEOUT.html +1 -1
- package/docs/variables/LOGIN_URL.html +1 -1
- package/docs/variables/OAUTH2_CLIENT_ID.html +1 -1
- package/docs/variables/OAUTH2_CLIENT_SECRET.html +1 -1
- package/docs/variables/OAUTH2_REDIRECT_URI.html +1 -1
- package/docs/variables/PLATFORM_NAME.html +1 -1
- package/docs/variables/PLUGIN_NAME.html +1 -1
- package/docs/variables/SECURE_URL.html +1 -1
- package/docs/variables/default.html +1 -1
- package/package.json +7 -6
|
@@ -22,8 +22,6 @@ jobs:
|
|
|
22
22
|
with:
|
|
23
23
|
release_type: ${{ needs.determine-release-type.outputs.release_type }}
|
|
24
24
|
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
|
|
25
|
-
secrets:
|
|
26
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
25
|
|
|
28
26
|
# 3️⃣ Publish to NPM and create GitHub release
|
|
29
27
|
publish-release:
|
|
@@ -48,8 +46,6 @@ jobs:
|
|
|
48
46
|
branch_name: ${{ needs.determine-release-type.outputs.branch_name }}
|
|
49
47
|
release_type: ${{ needs.determine-release-type.outputs.release_type }}
|
|
50
48
|
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
|
|
51
|
-
secrets:
|
|
52
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
53
49
|
|
|
54
50
|
# 5️⃣ Notify if any previous job fails
|
|
55
51
|
workflow-failure:
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,214 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
|
|
4
4
|
|
|
5
|
+
## [0.4.3](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.3) (2025-12-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([2659b21](https://github.com/homebridge-plugins/homebridge-smarthq/commit/2659b21a0a483cb15e0622733f58d75603d99cab))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
20
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
21
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# 0.2.0 (2025-02-23)
|
|
35
|
+
|
|
36
|
+
## [0.4.3](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.3) (2025-12-22)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([2659b21](https://github.com/homebridge-plugins/homebridge-smarthq/commit/2659b21a0a483cb15e0622733f58d75603d99cab))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
51
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
52
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# 0.2.0 (2025-02-23)
|
|
66
|
+
|
|
67
|
+
## [0.4.3](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.3) (2025-12-22)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([2659b21](https://github.com/homebridge-plugins/homebridge-smarthq/commit/2659b21a0a483cb15e0622733f58d75603d99cab))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
82
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
83
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Features
|
|
87
|
+
|
|
88
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# 0.2.0 (2025-02-23)
|
|
97
|
+
|
|
98
|
+
## [0.4.2](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.2) (2025-11-21)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([2659b21](https://github.com/homebridge-plugins/homebridge-smarthq/commit/2659b21a0a483cb15e0622733f58d75603d99cab))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
113
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
114
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Features
|
|
118
|
+
|
|
119
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# 0.2.0 (2025-02-23)
|
|
128
|
+
|
|
129
|
+
## [0.4.2](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.2) (2025-11-21)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([6a98928](https://github.com/homebridge-plugins/homebridge-smarthq/commit/6a989281dcac32d8c47fd78a2eb7bcd76c67c0b5))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
144
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
145
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Features
|
|
149
|
+
|
|
150
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# 0.2.0 (2025-02-23)
|
|
159
|
+
|
|
160
|
+
## [0.4.2](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.1...v0.4.2) (2025-11-20)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* support hood ([#57](https://github.com/homebridge-plugins/homebridge-smarthq/issues/57)) ([8f9cb9e](https://github.com/homebridge-plugins/homebridge-smarthq/commit/8f9cb9e66c5b911093f45d6ab530a68cd75177ac))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### Bug Fixes
|
|
173
|
+
|
|
174
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
175
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
176
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### Features
|
|
180
|
+
|
|
181
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
# 0.2.0 (2025-02-23)
|
|
190
|
+
|
|
191
|
+
## [0.4.1](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.4.0...v0.4.1) (2025-09-18)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Bug Fixes
|
|
195
|
+
|
|
196
|
+
* **air conditioner:** fix temperature setting and update switch display names ([#38](https://github.com/homebridge-plugins/homebridge-smarthq/issues/38)) ([1675205](https://github.com/homebridge-plugins/homebridge-smarthq/commit/16752059c93d6a5b26b782f2b42246e622b4b830))
|
|
197
|
+
* **air conditioner:** preserve decimal precision when converting Celsius to Fahrenheit ([#40](https://github.com/homebridge-plugins/homebridge-smarthq/issues/40)) ([38c8285](https://github.com/homebridge-plugins/homebridge-smarthq/commit/38c82852015d8ea0ceb0f4dd4b9ddf0622f57963))
|
|
198
|
+
* **air conditioner:** report all operating modes off when unit is off ([#42](https://github.com/homebridge-plugins/homebridge-smarthq/issues/42)) ([d44ebe3](https://github.com/homebridge-plugins/homebridge-smarthq/commit/d44ebe34590a2da6645e30db0db269e1dbbe4f3b))
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Features
|
|
202
|
+
|
|
203
|
+
* add Portable AC as supported device ([#45](https://github.com/homebridge-plugins/homebridge-smarthq/issues/45)) ([50d83b1](https://github.com/homebridge-plugins/homebridge-smarthq/commit/50d83b1e003d8d238485459a5c882f357e1c61fb))
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.2.0...v0.4.0) (2025-06-27)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
# 0.2.0 (2025-02-23)
|
|
212
|
+
|
|
5
213
|
## [0.4.0](https://github.com/homebridge-plugins/homebridge-smarthq/releases/tag/v0.4.0) (2025-06-26)
|
|
6
214
|
|
|
7
215
|
### What's Changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
2
|
+
import type { SmartHqContext } from '../settings.js';
|
|
3
|
+
import { deviceBase } from './device';
|
|
4
|
+
export declare class SmartHQClothesDryer extends deviceBase {
|
|
5
|
+
private ClothesDryer;
|
|
6
|
+
constructor(platform: any, accessory: PlatformAccessory<SmartHqContext>, device: any);
|
|
7
|
+
handleGetOn(): Promise<CharacteristicValue>;
|
|
8
|
+
handleSetOn(value: CharacteristicValue): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=clothesDryer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clothesDryer.d.ts","sourceRoot":"","sources":["../../src/devices/clothesDryer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,qBAAa,mBAAoB,SAAQ,UAAU;IACjD,OAAO,CAAC,YAAY,CAEnB;gBAGC,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EAC5C,MAAM,EAAE,GAAG;IAgBP,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAY3C,WAAW,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { deviceBase } from './device';
|
|
2
|
+
export class SmartHQClothesDryer extends deviceBase {
|
|
3
|
+
ClothesDryer;
|
|
4
|
+
constructor(platform, accessory, device) {
|
|
5
|
+
super(platform, accessory, device);
|
|
6
|
+
this.debugLog(`Clothes Dryer Features: ${JSON.stringify(accessory.context.device.features)}`);
|
|
7
|
+
accessory.context.device.features.forEach((feature) => {
|
|
8
|
+
if (feature === 'CLOTHES_DRYER_V1_FOUNDATION') {
|
|
9
|
+
const dryer = this.accessory.getService(accessory.displayName) ?? this.accessory.addService(this.platform.Service.Switch, accessory.displayName, 'Clothes Dryer');
|
|
10
|
+
dryer.getCharacteristic(this.platform.Characteristic.On)
|
|
11
|
+
.onGet(this.handleGetOn.bind(this))
|
|
12
|
+
.onSet(this.handleSetOn.bind(this));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.debugLog(`Feature not supported: ${feature}`);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async handleGetOn() {
|
|
20
|
+
try {
|
|
21
|
+
// TODO: Replace with actual ERD code for dryer On state if available
|
|
22
|
+
// const erdValue = await this.readErd(ERD_TYPES.CLOTHES_DRYER_ON)
|
|
23
|
+
// return Number.parseInt(erdValue) !== 0
|
|
24
|
+
return this.ClothesDryer?.On ?? false;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
this.warnLog?.(`ClothesDryer handleGetOn error: ${error?.message ?? error}`);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async handleSetOn(value) {
|
|
32
|
+
try {
|
|
33
|
+
// TODO: Replace with actual ERD code for dryer On state if available
|
|
34
|
+
// await this.writeErd(ERD_TYPES.CLOTHES_DRYER_ON, value as boolean)
|
|
35
|
+
this.ClothesDryer.On = value;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.warnLog?.(`ClothesDryer handleSetOn error: ${error?.message ?? error}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=clothesDryer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clothesDryer.js","sourceRoot":"","sources":["../../src/devices/clothesDryer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,MAAM,OAAO,mBAAoB,SAAQ,UAAU;IACzC,YAAY,CAEnB;IAED,YACE,QAAa,EACb,SAA4C,EAC5C,MAAW;QAEX,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAClC,IAAI,CAAC,QAAQ,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAC7F,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAe,EAAE,EAAE;YAC5D,IAAI,OAAO,KAAK,6BAA6B,EAAE,CAAC;gBAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,eAAe,CAAC,CAAA;gBACjK,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;qBACrD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;qBAClC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,QAAQ,CAAC,0BAA0B,OAAO,EAAE,CAAC,CAAA;YACpD,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YACH,qEAAqE;YACrE,kEAAkE;YAClE,yCAAyC;YACzC,OAAO,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,KAAK,CAAA;QACvC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,EAAE,CAAC,mCAAmC,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,CAAC,CAAA;YAC5E,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAA0B;QAC1C,IAAI,CAAC;YACH,qEAAqE;YACrE,oEAAoE;YACpE,IAAI,CAAC,YAAY,CAAC,EAAE,GAAG,KAAK,CAAA;QAC9B,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,EAAE,CAAC,mCAAmC,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,CAAC,CAAA;QAC9E,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
2
|
+
import type { SmartHqContext } from '../settings.js';
|
|
3
|
+
import { deviceBase } from './device';
|
|
4
|
+
export declare class SmartHQClothesWasher extends deviceBase {
|
|
5
|
+
private ClothesWasher;
|
|
6
|
+
constructor(platform: any, accessory: PlatformAccessory<SmartHqContext>, device: any);
|
|
7
|
+
handleGetOn(): Promise<CharacteristicValue>;
|
|
8
|
+
handleSetOn(value: CharacteristicValue): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=clothesWasher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clothesWasher.d.ts","sourceRoot":"","sources":["../../src/devices/clothesWasher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,qBAAa,oBAAqB,SAAQ,UAAU;IAClD,OAAO,CAAC,aAAa,CAEpB;gBAGC,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EAC5C,MAAM,EAAE,GAAG;IAgBP,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAY3C,WAAW,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { deviceBase } from './device';
|
|
2
|
+
export class SmartHQClothesWasher extends deviceBase {
|
|
3
|
+
ClothesWasher;
|
|
4
|
+
constructor(platform, accessory, device) {
|
|
5
|
+
super(platform, accessory, device);
|
|
6
|
+
this.debugLog(`Clothes Washer Features: ${JSON.stringify(accessory.context.device.features)}`);
|
|
7
|
+
accessory.context.device.features.forEach((feature) => {
|
|
8
|
+
if (feature === 'CLOTHES_WASHER_V1_FOUNDATION') {
|
|
9
|
+
const washer = this.accessory.getService(accessory.displayName) ?? this.accessory.addService(this.platform.Service.Switch, accessory.displayName, 'Clothes Washer');
|
|
10
|
+
washer.getCharacteristic(this.platform.Characteristic.On)
|
|
11
|
+
.onGet(this.handleGetOn.bind(this))
|
|
12
|
+
.onSet(this.handleSetOn.bind(this));
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
this.debugLog(`Feature not supported: ${feature}`);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async handleGetOn() {
|
|
20
|
+
try {
|
|
21
|
+
// TODO: Replace with actual ERD code for washer On state if available
|
|
22
|
+
// const erdValue = await this.readErd(ERD_TYPES.CLOTHES_WASHER_ON)
|
|
23
|
+
// return Number.parseInt(erdValue) !== 0
|
|
24
|
+
return this.ClothesWasher?.On ?? false;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
this.warnLog(`ClothesWasher handleGetOn error: ${error?.message ?? error}`);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async handleSetOn(value) {
|
|
32
|
+
try {
|
|
33
|
+
// TODO: Replace with actual ERD code for washer On state if available
|
|
34
|
+
// await this.writeErd(ERD_TYPES.CLOTHES_WASHER_ON, value as boolean)
|
|
35
|
+
this.ClothesWasher.On = value;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.warnLog(`ClothesWasher handleSetOn error: ${error?.message ?? error}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=clothesWasher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clothesWasher.js","sourceRoot":"","sources":["../../src/devices/clothesWasher.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAC1C,aAAa,CAEpB;IAED,YACE,QAAa,EACb,SAA4C,EAC5C,MAAW;QAEX,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAClC,IAAI,CAAC,QAAQ,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAC9F,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OA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C,CAAA;QAC7E,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dishwasher.d.ts","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAuB,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,UAAU;IAa7C,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAb3D,OAAO,CAAC,UAAU,CAIjB;IAGD,sBAAsB,EAAG,OAAO,CAAA;IAChC,YAAY,EAAE,GAAG,CAAA;gBAGN,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;
|
|
1
|
+
{"version":3,"file":"dishwasher.d.ts","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAuB,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,UAAU;IAa7C,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAb3D,OAAO,CAAC,UAAU,CAIjB;IAGD,sBAAsB,EAAG,OAAO,CAAA;IAChC,YAAY,EAAE,GAAG,CAAA;gBAGN,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IA4CrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAWpD"}
|
|
@@ -16,15 +16,30 @@ export class SmartHQDishWasher extends deviceBase {
|
|
|
16
16
|
this.device = device;
|
|
17
17
|
this.debugLog(`Dishwasher Features: ${JSON.stringify(accessory.context.device.features)}`);
|
|
18
18
|
accessory.context.device.features.forEach((feature) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
if (feature === 'DISHWASHER_V1_FOUNDATION') {
|
|
20
|
+
const dishwasher = this.accessory.getService(accessory.displayName) ?? this.accessory.addService(this.platform.Service.Lightbulb, accessory.displayName, 'Dishwasher');
|
|
21
|
+
dishwasher
|
|
22
|
+
.getCharacteristic(this.platform.Characteristic.On)
|
|
23
|
+
.onGet(async () => {
|
|
24
|
+
try {
|
|
25
|
+
return await this.readErd(ERD_TYPES.DISHWASHER_CYCLE).then(r => Number.parseInt(r) !== 0);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
this.warnLog?.(`Dishwasher handleGetOn error: ${error?.message ?? error}`);
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
.onSet(async (value) => {
|
|
33
|
+
try {
|
|
34
|
+
await this.writeErd(ERD_TYPES.DISHWASHER_CYCLE, value);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
this.warnLog?.(`Dishwasher handleSetOn error: ${error?.message ?? error}`);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.debugLog(`Feature not supported: ${feature}`);
|
|
28
43
|
}
|
|
29
44
|
});
|
|
30
45
|
// this is subject we use to track when we need to POST changes to the SmartHQ API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dishwasher.js","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAapC;IAEA;IAdX,UAAU;IACF,UAAU,CAIjB;IAED,UAAU;IACV,sBAAsB,CAAU;IAChC,YAAY,CAAK;IAEjB,YACW,QAAyB,EAClC,SAA4C,EACnC,MAAgD;QAEzD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAJzB,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,WAAM,GAAN,MAAM,CAA0C;QAIzD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAC1F,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,
|
|
1
|
+
{"version":3,"file":"dishwasher.js","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE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Q,CAAC,GAAW,EAAE,KAAuB;QACjD,MAAM,KAAK;aACR,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,QAAQ,GAAG,EAAE,EAAE;YAC1E,IAAI,EAAE,wBAAwB;YAC9B,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;YACrC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW;YACtD,GAAG;YACH,KAAK,EAAE,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK;SAClE,CAAC,CAAA;QACJ,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
|
|
2
|
+
import type { SmartHQPlatform } from '../platform.js';
|
|
3
|
+
import type { devicesConfig, SmartHqContext } from '../settings.js';
|
|
4
|
+
import { deviceBase } from './device.js';
|
|
5
|
+
export declare class SmartHQHood extends deviceBase {
|
|
6
|
+
protected readonly platform: SmartHQPlatform;
|
|
7
|
+
protected readonly accessory: PlatformAccessory<SmartHqContext>;
|
|
8
|
+
protected readonly device: SmartHqContext['device'] & devicesConfig;
|
|
9
|
+
private readonly FAN_SVC_NAME;
|
|
10
|
+
private readonly LIGHT_SVC_NAME;
|
|
11
|
+
private readonly fanSvc;
|
|
12
|
+
private readonly lightSvc;
|
|
13
|
+
constructor(platform: SmartHQPlatform, accessory: PlatformAccessory<SmartHqContext>, device: SmartHqContext['device'] & devicesConfig);
|
|
14
|
+
private getErdValue;
|
|
15
|
+
private setErdValue;
|
|
16
|
+
private getFanSpeed;
|
|
17
|
+
private setFanSpeed;
|
|
18
|
+
private getLightLevel;
|
|
19
|
+
private setLightLevel;
|
|
20
|
+
private fanSpeedToRotationSpeed;
|
|
21
|
+
private rotationSpeedToFanSpeed;
|
|
22
|
+
private lightLevelToBrightness;
|
|
23
|
+
private brightnessToLightLevel;
|
|
24
|
+
handleGetFanActive(): Promise<CharacteristicValue>;
|
|
25
|
+
handleSetFanActive(value: CharacteristicValue): Promise<void>;
|
|
26
|
+
handleGetFanRotationSpeed(): Promise<CharacteristicValue>;
|
|
27
|
+
handleSetFanRotationSpeed(value: CharacteristicValue): Promise<void>;
|
|
28
|
+
handleGetLightOn(): Promise<CharacteristicValue>;
|
|
29
|
+
handleSetLightOn(value: CharacteristicValue): Promise<void>;
|
|
30
|
+
handleGetLightBrightness(): Promise<CharacteristicValue>;
|
|
31
|
+
handleSetLightBrightness(value: CharacteristicValue): Promise<void>;
|
|
32
|
+
refreshState(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=hood.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hood.d.ts","sourceRoot":"","sources":["../../src/devices/hood.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAsB,MAAM,gBAAgB,CAAA;AAMvF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAgBxC,qBAAa,WAAY,SAAQ,UAAU;IAOvC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAC5C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC;IAC/D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IARrE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAa;IAC1C,OAAO,CAAC,QAAQ,CAAC,cAAc,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