Skip to content

Commit

Permalink
Fix ifte logic
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfire84 committed Jan 23, 2020
1 parent 29c790e commit 33bebd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,18 @@ const sendAlexaState = async(user, device) => {
var hasdisplayCategories = getSafe(() => device.displayCategories);
if (hasdisplayCategories != undefined) {
// Per-device type send-state configuration, can enable/ disable Alexa and/ or Google Home
if (device.displayCategories.indexOf("INTERIOR_BLIND") > -1) {
if (device.displayCategories.indexOf("CONTACT_SENSOR") > -1) {
enableDevTypeStateReport = true;
sendGoogleStateUpdate = true;
}
else if (device.displayCategories.indexOf("CONTACT_SENSOR") > -1) {
else if (device.displayCategories.indexOf("INTERIOR_BLIND") > -1) {
enableDevTypeStateReport = true;
}
if (device.displayCategories.indexOf("EXTERNAL_BLIND") > -1) {
else if (device.displayCategories.indexOf("EXTERNAL_BLIND") > -1) {
enableDevTypeStateReport = true;
sendGoogleStateUpdate = true;
}
if (device.displayCategories.indexOf("FAN") > -1) {
else if (device.displayCategories.indexOf("FAN") > -1) {
enableDevTypeStateReport = true;
sendGoogleStateUpdate = true;
}
Expand Down

0 comments on commit 33bebd4

Please sign in to comment.