New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-flair

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-flair - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

3

dist/platform.d.ts
import type { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig } from 'homebridge';
import { Structure, FlairMode, StructureHeatCoolMode } from 'flair-api-ts/lib/client/models';
import { Model } from 'flair-api-ts/lib/client/models/model';
import { Structure, FlairMode, StructureHeatCoolMode, Model } from 'flair-api-ts';
/**

@@ -5,0 +4,0 @@ * HomebridgePlatform

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -11,4 +8,3 @@ exports.FlairPlatform = void 0;

const roomPlatformAccessory_1 = require("./roomPlatformAccessory");
const client_1 = __importDefault(require("flair-api-ts/lib/client"));
const models_1 = require("flair-api-ts/lib/client/models");
const flair_api_ts_1 = require("flair-api-ts");
const class_transformer_1 = require("class-transformer");

@@ -35,3 +31,3 @@ const utils_1 = require("./utils");

}
this.client = new client_1.default(this.config.clientId, this.config.clientSecret, this.config.username, this.config.password);
this.client = new flair_api_ts_1.Client(this.config.clientId, this.config.clientSecret, this.config.username, this.config.password);
// When this event is fired it means Homebridge has restored all cached accessories from disk.

@@ -113,15 +109,15 @@ // Dynamic Platform plugins should only register new accessories after this event was fired,

this.log.info('Restoring accessory from cache:', accessory.displayName);
if (accessory.context.type === models_1.Puck.type) {
if (accessory.context.type === flair_api_ts_1.Puck.type) {
this.log.info('Restoring puck from cache:', accessory.displayName);
accessory.context.device = class_transformer_1.plainToClass(models_1.Puck, accessory.context.device);
accessory.context.device = class_transformer_1.plainToClass(flair_api_ts_1.Puck, accessory.context.device);
new puckPlatformAccessory_1.FlairPuckPlatformAccessory(this, accessory, this.client);
}
else if (accessory.context.type === models_1.Vent.type) {
else if (accessory.context.type === flair_api_ts_1.Vent.type) {
this.log.info('Restoring vent from cache:', accessory.displayName);
accessory.context.device = class_transformer_1.plainToClass(models_1.Vent, accessory.context.device);
accessory.context.device = class_transformer_1.plainToClass(flair_api_ts_1.Vent, accessory.context.device);
new ventPlatformAccessory_1.FlairVentPlatformAccessory(this, accessory, this.client);
}
else if (accessory.context.type === models_1.Room.type) {
else if (accessory.context.type === flair_api_ts_1.Room.type) {
this.log.info('Restoring room from cache:', accessory.displayName);
accessory.context.device = class_transformer_1.plainToClass(models_1.Room, accessory.context.device);
accessory.context.device = class_transformer_1.plainToClass(flair_api_ts_1.Room, accessory.context.device);
this.getStructure().then((structure) => {

@@ -179,12 +175,12 @@ this.rooms.push(new roomPlatformAccessory_1.FlairRoomPlatformAccessory(this, accessory, this.client, structure));

// this is imported from `puckPlatformAccessory.ts`
if (device instanceof models_1.Puck) {
accessory.context.type = models_1.Puck.type;
if (device instanceof flair_api_ts_1.Puck) {
accessory.context.type = flair_api_ts_1.Puck.type;
new puckPlatformAccessory_1.FlairPuckPlatformAccessory(this, accessory, this.client);
}
else if (device instanceof models_1.Vent) {
accessory.context.type = models_1.Vent.type;
else if (device instanceof flair_api_ts_1.Vent) {
accessory.context.type = flair_api_ts_1.Vent.type;
new ventPlatformAccessory_1.FlairVentPlatformAccessory(this, accessory, this.client);
}
else if (device instanceof models_1.Room) {
accessory.context.type = models_1.Room.type;
else if (device instanceof flair_api_ts_1.Room) {
accessory.context.type = flair_api_ts_1.Room.type;
this.getStructure().then((structure) => {

@@ -191,0 +187,0 @@ this.rooms.push(new roomPlatformAccessory_1.FlairRoomPlatformAccessory(this, accessory, this.client, structure));

import type { PlatformAccessory } from 'homebridge';
import { FlairPlatform } from './platform';
import { Puck } from 'flair-api-ts/lib/client/models';
import Client from 'flair-api-ts/lib/client';
import { Puck, Client } from 'flair-api-ts';
/**

@@ -6,0 +5,0 @@ * Platform Accessory

import type { PlatformAccessory } from 'homebridge';
import { CharacteristicGetCallback, CharacteristicSetCallback, CharacteristicValue } from 'homebridge';
import { FlairPlatform } from './platform';
import Client from 'flair-api-ts/lib/client';
import { Room, Structure } from 'flair-api-ts/lib/client/models';
import { Room, Structure, Client } from 'flair-api-ts';
/**

@@ -7,0 +6,0 @@ * Platform Accessory

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlairRoomPlatformAccessory = void 0;
const models_1 = require("flair-api-ts/lib/client/models");
const flair_api_ts_1 = require("flair-api-ts");
const utils_1 = require("./utils");

@@ -46,3 +46,3 @@ /**

if (value === this.platform.Characteristic.TargetHeatingCoolingState.OFF) {
this.platform.setStructureMode(models_1.FlairMode.MANUAL, models_1.StructureHeatCoolMode.COOL).then((structure) => {
this.platform.setStructureMode(flair_api_ts_1.FlairMode.MANUAL, flair_api_ts_1.StructureHeatCoolMode.COOL).then((structure) => {
callback(null, value);

@@ -53,3 +53,3 @@ this.updateFromStructure(structure);

else if (value === this.platform.Characteristic.TargetHeatingCoolingState.COOL) {
this.platform.setStructureMode(models_1.FlairMode.AUTO, models_1.StructureHeatCoolMode.COOL).then((structure) => {
this.platform.setStructureMode(flair_api_ts_1.FlairMode.AUTO, flair_api_ts_1.StructureHeatCoolMode.COOL).then((structure) => {
callback(null, value);

@@ -60,3 +60,3 @@ this.updateFromStructure(structure);

else if (value === this.platform.Characteristic.TargetHeatingCoolingState.HEAT) {
this.platform.setStructureMode(models_1.FlairMode.AUTO, models_1.StructureHeatCoolMode.HEAT).then((structure) => {
this.platform.setStructureMode(flair_api_ts_1.FlairMode.AUTO, flair_api_ts_1.StructureHeatCoolMode.HEAT).then((structure) => {
callback(null, value);

@@ -67,3 +67,3 @@ this.updateFromStructure(structure);

else if (value === this.platform.Characteristic.TargetHeatingCoolingState.AUTO) {
this.platform.setStructureMode(models_1.FlairMode.AUTO, models_1.StructureHeatCoolMode.AUTO).then((structure) => {
this.platform.setStructureMode(flair_api_ts_1.FlairMode.AUTO, flair_api_ts_1.StructureHeatCoolMode.AUTO).then((structure) => {
callback(null, this.platform.Characteristic.TargetHeatingCoolingState.AUTO);

@@ -117,12 +117,12 @@ this.updateFromStructure(structure);

getCurrentHeatingCoolingStateFromStructure(structure) {
if (structure.mode === models_1.FlairMode.MANUAL) {
if (structure.mode === flair_api_ts_1.FlairMode.MANUAL) {
return this.platform.Characteristic.CurrentHeatingCoolingState.OFF;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.COOL) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.COOL) {
return this.platform.Characteristic.CurrentHeatingCoolingState.COOL;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.HEAT) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.HEAT) {
return this.platform.Characteristic.CurrentHeatingCoolingState.HEAT;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.AUTO) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.AUTO) {
return this.platform.Characteristic.CurrentHeatingCoolingState.COOL;

@@ -132,12 +132,12 @@ }

getTargetHeatingCoolingStateFromStructure(structure) {
if (structure.mode === models_1.FlairMode.MANUAL) {
if (structure.mode === flair_api_ts_1.FlairMode.MANUAL) {
return this.platform.Characteristic.TargetHeatingCoolingState.OFF;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.COOL) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.COOL) {
return this.platform.Characteristic.TargetHeatingCoolingState.COOL;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.HEAT) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.HEAT) {
return this.platform.Characteristic.TargetHeatingCoolingState.HEAT;
}
if (structure.structureHeatCoolMode === models_1.StructureHeatCoolMode.AUTO) {
if (structure.structureHeatCoolMode === flair_api_ts_1.StructureHeatCoolMode.AUTO) {
return this.platform.Characteristic.TargetHeatingCoolingState.AUTO;

@@ -144,0 +144,0 @@ }

import type { CharacteristicGetCallback, CharacteristicSetCallback, CharacteristicValue, PlatformAccessory } from 'homebridge';
import { FlairPlatform } from './platform';
import Client from 'flair-api-ts/lib/client';
import { Vent } from 'flair-api-ts/lib/client/models';
import { Vent, Client } from 'flair-api-ts';
/**

@@ -6,0 +5,0 @@ * Platform Accessory

{
"displayName": "Homebridge Flair",
"name": "homebridge-flair",
"version": "1.1.0",
"version": "1.1.1",
"publishConfig": {

@@ -45,3 +45,3 @@ "registry": "https://registry.npmjs.org/"

"class-transformer": "^0.3.1",
"flair-api-ts": "0.0.16",
"flair-api-ts": "1.0.6",
"reflect-metadata": "^0.1.13"

@@ -48,0 +48,0 @@ },

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

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

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