Skip to content

Commit a5f07fb

Browse files
committed
final 6.9.2
1 parent b5eabb8 commit a5f07fb

File tree

10 files changed

+495
-110
lines changed

10 files changed

+495
-110
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project are documented in this file.
44

5+
### [6.9.2] 2025-01-09
6+
7+
#### Changed
8+
9+
- added command "household.remove.subwoofer"
10+
11+
512
### [6.9.1] 2024-12-12
613

714
#### Info

docs/Helper.js.html

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,43 @@ <h1 class="page-title">Source: Helper.js</h1>
145145
return item.replace(/:LR|:RR/, '')
146146
})
147147
},
148+
149+
/** Returns the UUID of the subwoofer.
150+
* @param {string} mapString string from HTSatChanMapSet or channelMapSet
151+
*
152+
* @returns {"Promise&lt;string>"} subwoofer UUID
153+
*
154+
* @throws {error}
155+
*
156+
*/
157+
// Example
158+
// eslint-disable-next-line max-len
159+
// RINCON_48A6B8B5614E01400:LF,RF;RINCON_38420B92ABE601400:RR;RINCON_7828CA042C8401400:LR;RINCON_542A1B108A6201400:SW
160+
161+
extractSubwooferUuid: async (mapString) => {
162+
debug('method:%s', 'extractSubwooferUuid')
163+
164+
if (!module.exports.isTruthy(mapString)) {
165+
throw new Error('invalid parameter - invalid/missing')
166+
}
167+
if (typeof mapString !== 'string') {
168+
throw new Error('invalid parameter - is not string')
169+
}
170+
171+
if (!mapString.includes(';')) {
172+
throw new Error('invalid parameter - no subwoofer (missing ;)')
173+
}
174+
const uuidsPlusChannel = mapString.split(';')
175+
const subwooferUuidArray = uuidsPlusChannel.filter((item) => {
176+
return item.includes(':SW')
177+
})
178+
if ((subwooferUuidArray.length !== 1)) {
179+
throw new Error('invalid parameter - no subwoofer found')
180+
}
181+
182+
// remove identifier :SW
183+
return subwooferUuidArray[0].replace(/:SW/, '')
184+
},
148185

149186
/** Converts hh:mm:ss time to milliseconds. Does not check input!
150187
* No validation: hh 0 to 23, mm 0 to 59 ss 0 59, : must exist
@@ -658,7 +695,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Sonos-Ext
658695
<br class="clear">
659696

660697
<footer>
661-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Dec 12 2024 13:22:32 GMT+0100 (Central European Standard Time)
698+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Jan 09 2025 18:19:06 GMT+0100 (Central European Standard Time)
662699
</footer>
663700

664701
<script> prettyPrint(); </script>

docs/global.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Sonos-Ext
14931493
<br class="clear">
14941494

14951495
<footer>
1496-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Dec 12 2024 13:22:32 GMT+0100 (Central European Standard Time)
1496+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Jan 09 2025 18:19:06 GMT+0100 (Central European Standard Time)
14971497
</footer>
14981498

14991499
<script> prettyPrint(); </script>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Sonos-Ext
5656
<br class="clear">
5757

5858
<footer>
59-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Dec 12 2024 13:22:32 GMT+0100 (Central European Standard Time)
59+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Jan 09 2025 18:19:06 GMT+0100 (Central European Standard Time)
6060
</footer>
6161

6262
<script> prettyPrint(); </script>

docs/module-MySonos.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2259,7 +2259,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Sonos-Ext
22592259
<br class="clear">
22602260

22612261
<footer>
2262-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Dec 12 2024 13:22:32 GMT+0100 (Central European Standard Time)
2262+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Jan 09 2025 18:19:06 GMT+0100 (Central European Standard Time)
22632263
</footer>
22642264

22652265
<script> prettyPrint(); </script>

docs/module-Sonos-Commands.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4121,7 +4121,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Sonos-Ext
41214121
<br class="clear">
41224122

41234123
<footer>
4124-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Dec 12 2024 13:22:32 GMT+0100 (Central European Standard Time)
4124+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Thu Jan 09 2025 18:19:06 GMT+0100 (Central European Standard Time)
41254125
</footer>
41264126

41274127
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)