homebridge-yoto 0.0.10 → 0.0.11
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/lib/yotoMqtt.js +2 -1
- package/package.json +1 -1
package/lib/yotoMqtt.js
CHANGED
|
@@ -569,7 +569,8 @@ export class YotoMqtt extends EventEmitter {
|
|
|
569
569
|
* @returns {string | null}
|
|
570
570
|
*/
|
|
571
571
|
extractDeviceId (topic) {
|
|
572
|
-
|
|
572
|
+
// Match both /device/{id}/ and device/{id}/ patterns
|
|
573
|
+
const match = topic.match(/\/?device\/([^/]+)\//)
|
|
573
574
|
return match?.[1] ?? null
|
|
574
575
|
}
|
|
575
576
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-yoto",
|
|
3
3
|
"description": "Control your Yoto players through Apple HomeKit with real-time MQTT updates",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/bcomnes/homebridge-yoto/issues"
|