Skip to content

Commit

Permalink
Clearing old code from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwi-cam committed Sep 30, 2024
1 parent eefcc15 commit 26ecd0d
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion accessories/air-purifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class AirPurifierAccessory extends FanAccessory {
state.currentState = Characteristic.CurrentAirPurifierState.INACTIVE
}

//serviceManager.refreshCharacteristicUI(Characteristic.CurrentAirPurifierState);
serviceManager.updateCharacteristic(Characteristic.CurrentAirPurifierState,state.currentState);
}

Expand Down
6 changes: 0 additions & 6 deletions accessories/aircon.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ class AirConAccessory extends BroadlinkRMAccessory {

// Do the actual sending of the temperature
this.sendTemperature(state.targetTemperature, previousValue);
//serviceManager.refreshCharacteristicUI(Characteristic.TargetTemperature);
serviceManager.updateCharacteristic(Characteristic.TargetTemperature, state.targetTemperature);
}

Expand Down Expand Up @@ -272,13 +271,10 @@ class AirConAccessory extends BroadlinkRMAccessory {
//Force Temperature send
delayForDuration(0.25).then(() => {
this.sendTemperature(temperature, state.currentTemperature);
//serviceManager.refreshCharacteristicUI(Characteristic.TargetTemperature);
serviceManager.updateCharacteristic(Characteristic.TargetTemperature,state.targetTemperature);
});
}

//serviceManager.refreshCharacteristicUI(Characteristic.CurrentHeatingCoolingState);
//serviceManager.refreshCharacteristicUI(Characteristic.TargetHeatingCoolingState);
serviceManager.updateCharacteristic(Characteristic.CurrentHeatingCoolingState,state.currentHeatingCoolingState);
serviceManager.updateCharacteristic(Characteristic.TargetHeatingCoolingState,state.targetHeatingCoolingState);

Expand Down Expand Up @@ -622,8 +618,6 @@ class AirConAccessory extends BroadlinkRMAccessory {
const { config, serviceManager } = this;
const { noHumidity } = config;

//serviceManager.refreshCharacteristicUI(Characteristic.CurrentTemperature);
//if(!noHumidity){serviceManager.refreshCharacteristicUI(Characteristic.CurrentRelativeHumidity);}
serviceManager.updateCharacteristic(Characteristic.CurrentTemperature, this.state.currentTemperature);
if(!noHumidity){serviceManager.updateCharacteristic(Characteristic.CurrentRelativeHumidity, this.state.currentHumidity);}
}
Expand Down
12 changes: 0 additions & 12 deletions accessories/fan.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class FanAccessory extends BroadlinkRMAccessory {

if (config.pingIPAddressStateOnly) {
state.switchState = active ? true : false;
//serviceManager.refreshCharacteristicUI(Characteristic.Active);
serviceManager.updateCharacteristic(Characteristic.Active,state.switchState);

return;
Expand All @@ -106,17 +105,6 @@ class FanAccessory extends BroadlinkRMAccessory {
serviceManager.setCharacteristic(Characteristic.Active, value);
}

//async setSwitchState(hexData) {
// const { data, host, log, name, logLevel } = this;

// this.stateChangeInProgress = true;
// this.reset();

// if (hexData) {await this.performSend(hexData);}

// this.checkAutoOnOff();
//}

async checkPingGrace () {
await catchDelayCancelError(async () => {
const { config, log, name, state, serviceManager } = this;
Expand Down
2 changes: 0 additions & 2 deletions accessories/heater-cooler.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,6 @@ class HeaterCoolerAccessory extends BroadlinkRMAccessory {
const { config, serviceManager, state } = this;
const { noHumidity } = config;

//serviceManager.refreshCharacteristicUI(Characteristic.CurrentTemperature);
//if (!noHumidity) { serviceManager.refreshCharacteristicUI(Characteristic.CurrentRelativeHumidity); }
serviceManager.updateCharacteristic(Characteristic.CurrentTemperature,state.currentTemperature);
if (!noHumidity) { serviceManager.updateCharacteristic(Characteristic.CurrentRelativeHumidity,state.currentHumidity); }
}
Expand Down
3 changes: 0 additions & 3 deletions accessories/humidifier-dehumidifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class HumidifierDehumidifierAccessory extends FanAccessory {
if (logLevel <=2) {log(`${name} setCurrentState: currently ${previousValue}, changing to ${state.currentState}`);}

if(hexData) {await this.performSend(hexData);}
//serviceManager.refreshCharacteristicUI(Characteristic.CurrentHumidifierDehumidifierState);
serviceManager.updateCharacteristic(Characteristic.CurrentHumidifierDehumidifierState,state.currentState);
this.previouslyOff = false;
}
Expand Down Expand Up @@ -150,7 +149,6 @@ class HumidifierDehumidifierAccessory extends FanAccessory {
//Do nothing if turned off
if (!state.switchState) {
state.currentState = Characteristic.CurrentHumidifierDehumidifierState.INACTIVE;
//serviceManager.refreshCharacteristicUI(Characteristic.CurrentHumidifierDehumidifierState);
serviceManager.updateCharacteristic(Characteristic.CurrentHumidifierDehumidifierState,state.currentState);
this.previouslyOff = true;
return;
Expand Down Expand Up @@ -428,7 +426,6 @@ class HumidifierDehumidifierAccessory extends FanAccessory {
updateHumidityUI () {
const { config, serviceManager } = this;

//serviceManager.refreshCharacteristicUI(Characteristic.CurrentRelativeHumidity);
serviceManager.updateCharacteristic(Characteristic.CurrentRelativeHumidity, this.state.currentHumidity);
}

Expand Down
2 changes: 0 additions & 2 deletions accessories/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class LightAccessory extends SwitchAccessory {
x.reset();
x.state.switchState = false;
x.lastBrightness = undefined;
//x.serviceManager.refreshCharacteristicUI(Characteristic.On);
x.serviceManager.updateCharacteristic(Characteristic.On,x.state.switchState);
}
});
Expand Down Expand Up @@ -105,7 +104,6 @@ class LightAccessory extends SwitchAccessory {
if (!state.switchState) {

state.switchState = true;
//serviceManager.refreshCharacteristicUI(Characteristic.On);
serviceManager.updateCharacteristic(Characteristic.On,state.switchState);

if (on) {
Expand Down
1 change: 0 additions & 1 deletion accessories/outlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class OutletAccessory extends SwitchAccessory {

if (config.pingIPAddressStateOnly) {
state.outletInUse = active ? true : false;
//serviceManager.refreshCharacteristicUI(Characteristic.OutletInUse)
serviceManager.updateCharacteristic(Characteristic.OutletInUse, state.outletInUse)

return
Expand Down
3 changes: 0 additions & 3 deletions accessories/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class SwitchAccessory extends BroadlinkRMAccessory {

if (this.serviceManager.getCharacteristic(Characteristic.On) === undefined) {
this.state.switchState = false;
//this.serviceManager.refreshCharacteristicUI(Characteristic.On);
this.serviceManager.updateCharacteristic(Characteristic.On, this.state.switchState);
}
}
Expand Down Expand Up @@ -101,7 +100,6 @@ class SwitchAccessory extends BroadlinkRMAccessory {

if (config.pingIPAddressStateOnly) {
state.switchState = active ? true : false;
//serviceManager.refreshCharacteristicUI(Characteristic.On);
serviceManager.updateCharacteristic(Characteristic.On,state.switchState);

return;
Expand All @@ -120,7 +118,6 @@ class SwitchAccessory extends BroadlinkRMAccessory {

if (config.stateless === true) {
state.switchState = false;
// serviceManager.refreshCharacteristicUI(Characteristic.On);
serviceManager.updateCharacteristic(Characteristic.On,state.switchState);
} else {
this.checkAutoOnOff();
Expand Down
1 change: 0 additions & 1 deletion accessories/tv.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class TVAccessory extends BroadlinkRMAccessory {

if (config.pingIPAddressStateOnly) {
state.switchState = active ? true : false;
//serviceManager.refreshCharacteristicUI(Characteristic.Active);
serviceManager.updateCharacteristic(Characteristic.Active,state.switchState);

return;
Expand Down

0 comments on commit 26ecd0d

Please sign in to comment.