Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@switchbot/homebridge-switchbot

Package Overview
Dependencies
Maintainers
2
Versions
924
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@switchbot/homebridge-switchbot - npm Package Compare versions

Comparing version 0.1.4-beta.2 to 0.1.4-beta.3

95

config.schema.json

@@ -107,3 +107,3 @@ {

{
"title": "IR Fan",
"title": "Fan (IR)",
"enum": [

@@ -114,3 +114,3 @@ "Fan"

{
"title": "DIY IR Fan",
"title": "DIY Fan (IR)",
"enum": [

@@ -121,3 +121,3 @@ "DIY Fan"

{
"title": "IR Air Conditioner",
"title": "Air Conditioner (IR)",
"enum": [

@@ -128,3 +128,3 @@ "Air Conditioner"

{
"title": "DIY IR Air Conditioner",
"title": "DIY Air Conditioner (IR)",
"enum": [

@@ -135,4 +135,76 @@ "DIY Air Conditioner"

{
"title": "Others",
"title": "TV (IR)",
"enum": [
"TV"
]
},
{
"title": "DIY TV (IR)",
"enum": [
"DIY TV"
]
},
{
"title": "Projector (IR)",
"enum": [
"Projector"
]
},
{
"title": "DIY Projector (IR)",
"enum": [
"DIY Projector"
]
},
{
"title": "Set Top Box (IR)",
"enum": [
"Set Top Box"
]
},
{
"title": "DIY Set Top Box (IR)",
"enum": [
"DIY Set Top Box"
]
},
{
"title": "IPTV (IR)",
"enum": [
"IPTV"
]
},
{
"title": "DIY IPTV (IR)",
"enum": [
"DIY IPTV"
]
},
{
"title": "DVD (IR)",
"enum": [
"DVD"
]
},
{
"title": "DIY DVD (IR)",
"enum": [
"DIY DVD"
]
},
{
"title": "Speaker (IR)",
"enum": [
"Speaker"
]
},
{
"title": "DIY Speaker (IR)",
"enum": [
"DIY Speaker"
]
},
{
"title": "Others (IR)",
"enum": [
"Others"

@@ -363,2 +435,14 @@ ]

},
"irtv": {
"type": "object",
"properties": {
"disable_power": {
"title": "Disable Power Command",
"type": "boolean",
"condition": {
"functionBody": "return (model.options && model.options.devices && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].deviceType === 'TV' || model.options.devices[arrayIndices].deviceType === 'DIY TV' || model.options.devices[arrayIndices].deviceType === 'Projector' || model.options.devices[arrayIndices].deviceType === 'DIY Projector' || model.options.devices[arrayIndices].deviceType === 'Set Top Box' || model.options.devices[arrayIndices].deviceType === 'DIY Set Top Box' || model.options.devices[arrayIndices].deviceType === 'IPTV' || model.options.devices[arrayIndices].deviceType === 'DIY IPTV' || model.options.devices[arrayIndices].deviceType === 'DVD' || model.options.devices[arrayIndices].deviceType === 'DIY DVD' || model.options.devices[arrayIndices].deviceType === 'Speaker' || model.options.devices[arrayIndices].deviceType === 'DIY Speaker') && model.options.devices[arrayIndices].deviceId);"
}
}
}
},
"other": {

@@ -490,2 +574,3 @@ "type": "object",

"options.devices[].irair.hide_automode",
"options.devices[].irtv.disable_power",
"options.devices[].other.deviceType",

@@ -492,0 +577,0 @@ "options.devices[].other.commandOn",

12

dist/irdevices/tvs.js

@@ -163,8 +163,10 @@ "use strict";

this.platform.debug(`${this.accessory.displayName} Set Active: ${value}`);
if (value === this.platform.Characteristic.Active.INACTIVE) {
this.pushTvOffChanges();
if (!this.device.irtv?.disable_power) {
if (value === this.platform.Characteristic.Active.INACTIVE) {
this.pushTvOffChanges();
}
else {
this.pushTvOnChanges();
}
}
else {
this.pushTvOnChanges();
}
this.ActiveIdentifier = value;

@@ -171,0 +173,0 @@ if (this.ActiveIdentifier !== undefined) {

@@ -42,2 +42,3 @@ import { MacAddress, PlatformConfig } from 'homebridge';

irair?: irair;
irtv?: irtv;
other?: other;

@@ -91,2 +92,5 @@ ble?: string;

};
export declare type irtv = {
disable_power?: boolean;
};
export declare type other = {

@@ -93,0 +97,0 @@ deviceType?: string;

{
"displayName": "Homebridge SwitchBot",
"name": "@switchbot/homebridge-switchbot",
"version": "0.1.4-beta.2",
"version": "0.1.4-beta.3",
"description": "The [Homebridge](https://homebridge.io) SwitchBot plugin allows you to access your [SwitchBot](https://www.switch-bot.com) device(s) from HomeKit.",

@@ -6,0 +6,0 @@ "author": "SwitchBot <support@wondertechlabs.com> (https://github.com/SwitchBot)",

@@ -194,6 +194,8 @@ import { AxiosResponse } from 'axios';

this.platform.debug(`${this.accessory.displayName} Set Active: ${value}`);
if (value === this.platform.Characteristic.Active.INACTIVE) {
this.pushTvOffChanges();
} else {
this.pushTvOnChanges();
if (!this.device.irtv?.disable_power) {
if (value === this.platform.Characteristic.Active.INACTIVE) {
this.pushTvOffChanges();
} else {
this.pushTvOnChanges();
}
}

@@ -200,0 +202,0 @@ this.ActiveIdentifier = value;

@@ -50,2 +50,3 @@ import { MacAddress, PlatformConfig } from 'homebridge';

irair?: irair;
irtv?: irtv;
other?: other;

@@ -113,2 +114,6 @@ ble?: string;

export type irtv = {
disable_power?: boolean;
};
export type other = {

@@ -115,0 +120,0 @@ deviceType?: string;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc