Skip to content

Commit

Permalink
Add filtering of devices from the plugin homebridge-alexa-smarthome (#…
Browse files Browse the repository at this point in the history
…676)

* --- (#634)

updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mqtt from 5.5.0 to 5.6.1 (#632)

Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 5.5.0 to 5.6.1.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](mqttjs/MQTT.js@v5.5.0...v5.6.1)

---
updated-dependencies:
- dependency-name: mqtt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 20.11.30 to 20.12.12 (#631)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.30 to 20.12.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rimraf from 5.0.5 to 5.0.7 (#629)

Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.5 to 5.0.7.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v5.0.5...v5.0.7)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump semver from 7.6.0 to 7.6.2 (#628)

Bumps [semver](https://github.com/npm/node-semver) from 7.6.0 to 7.6.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.6.0...v7.6.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ws from 8.16.0 to 8.17.0 (#622)

Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.16.0...8.17.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump typescript from 5.4.3 to 5.4.5 (#617)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.4.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.4.3...v5.4.5)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Filter alexa-smarthome (#635)

* Setup for beta-0.7.0

* Update CHANGELOG.md

* Final

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
NorthernMan54 and dependabot[bot] authored Jul 12, 2024
1 parent 9e6318d commit caa480f
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 163 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## 0.7.0 (2023-05-30)

## [Version 0.7.0](https://github.com/northernman54/homebridge-alexa/compare/v0.6.9...v0.7.0)

#### Changes

- Filter discovery of devices from homebridge-alexa-smarthome
- Updates to package dependencies

## 0.6.9 (2023-03-30)

## [Version 0.6.9](https://github.com/northernman54/homebridge-alexa/compare/v0.6.8...v0.6.9)
Expand Down
28 changes: 15 additions & 13 deletions lib/parse/Homebridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Homebridge(devices, context) {
thermostatTurnOn: context.thermostatTurnOn
};
this.playback = {};
devices.accessories.accessories.forEach(function(element) {
devices.accessories.accessories.forEach(function (element) {
var accessory = new Accessory(element, this);
if (this.accessories[accessory.name + accessory.aid]) {
debug("Duplicate", accessory.name);
Expand All @@ -44,7 +44,7 @@ function Homebridge(devices, context) {
}.bind(this));
}

Homebridge.prototype.toList = function(opt) {
Homebridge.prototype.toList = function (opt) {
var list = [];
for (var index in this.accessories) {
var accessory = this.accessories[index];
Expand All @@ -60,7 +60,7 @@ Homebridge.prototype.toList = function(opt) {
return (list);
};

Homebridge.prototype.toAlexa = function(opt) {
Homebridge.prototype.toAlexa = function (opt) {
var list = [];

// Alexa devices made up of multiple homekit accessories in a single homebridge instance
Expand Down Expand Up @@ -143,7 +143,7 @@ Homebridge.prototype.toAlexa = function(opt) {
id: this.id,
opt: opt
});
if (messages.playbackNameTranslate(device.name) === "Play" && ! cookie.Pause) {
if (messages.playbackNameTranslate(device.name) === "Play" && !cookie.Pause) {
// No need for fake pause button, the Play button is a pause/play toggle
// debug('Fake pause', this.id, opt);
cookie["Pause"] = device.toCookie("On", {
Expand Down Expand Up @@ -211,16 +211,18 @@ Homebridge.prototype.toAlexa = function(opt) {
if (accessory.playback) {
// debug("Media device", accessory.name);
}
var alexa = accessory.toAlexa({
deviceID: this.deviceID,
if (accessory.info.Manufacturer !== 'homebridge-alexa-smarthome') {
var alexa = accessory.toAlexa({
deviceID: this.deviceID,

homebridge: this.homebridge,
id: this.id,
opt: opt
});
// debug("Alexa", alexa);
if (alexa) {
list = list.concat(alexa);
homebridge: this.homebridge,
id: this.id,
opt: opt
});
// debug("Alexa", alexa);
if (alexa) {
list = list.concat(alexa);
}
}
}
return (list);
Expand Down
Loading

0 comments on commit caa480f

Please sign in to comment.