Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
aivus committed Sep 8, 2023
1 parent 4f0fb3a commit 7313c76
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/gree_cooper_hunter_hvac/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class GreeHVACDevice extends Homey.Device {

this.log('[find devices]', 'Finding device with mac:', deviceData.mac);

finder.hvacs.forEach(hvac => {
finder.hvacs.forEach((hvac) => {
if (hvac.message.mac !== deviceData.mac) {
// Skip other HVACs from the finder until find current
this.log('[find devices]', 'Skipping HVAC with mac:', hvac.message.mac);
Expand Down Expand Up @@ -119,22 +119,22 @@ class GreeHVACDevice extends Homey.Device {
* @private
*/
_registerCapabilityListeners() {
this.registerCapabilityListener('onoff', value => {
this.registerCapabilityListener('onoff', (value) => {
const rawValue = value ? HVAC.VALUE.power.on : HVAC.VALUE.power.off;
this.log('[power mode change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.power, rawValue);

return Promise.resolve();
});

this.registerCapabilityListener('target_temperature', value => {
this.registerCapabilityListener('target_temperature', (value) => {
this.log('[temperature change]', `Value: ${value}`);
this._setClientProperty(HVAC.PROPERTY.temperature, value);

return Promise.resolve();
});

this.registerCapabilityListener('thermostat_mode', value => {
this.registerCapabilityListener('thermostat_mode', (value) => {
const rawValue = HVAC.VALUE.mode[value];
this.log('[mode change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._flowTriggerHvacModeChanged.trigger(this, { hvac_mode: value });
Expand All @@ -143,23 +143,23 @@ class GreeHVACDevice extends Homey.Device {
return Promise.resolve();
});

this.registerCapabilityListener('fan_speed', value => {
this.registerCapabilityListener('fan_speed', (value) => {
const rawValue = HVAC.VALUE.fanSpeed[value];
this.log('[fan speed change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.fanSpeed, rawValue);

return Promise.resolve();
});

this.registerCapabilityListener('turbo_mode', value => {
this.registerCapabilityListener('turbo_mode', (value) => {
const rawValue = value ? HVAC.VALUE.turbo.on : HVAC.VALUE.turbo.off;
this.log('[turbo mode change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.turbo, rawValue);

return Promise.resolve();
});

this.registerCapabilityListener('lights', value => {
this.registerCapabilityListener('lights', (value) => {
const rawValue = value ? HVAC.VALUE.lights.on : HVAC.VALUE.lights.off;
this.log('[lights change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.lights, rawValue);
Expand All @@ -168,7 +168,7 @@ class GreeHVACDevice extends Homey.Device {
return Promise.resolve();
});

this.registerCapabilityListener('xfan_mode', value => {
this.registerCapabilityListener('xfan_mode', (value) => {
const rawValue = value ? HVAC.VALUE.blow.on : HVAC.VALUE.blow.off;
this.log('[xfan mode change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.blow, rawValue);
Expand All @@ -177,7 +177,7 @@ class GreeHVACDevice extends Homey.Device {
return Promise.resolve();
});

this.registerCapabilityListener('vertical_swing', value => {
this.registerCapabilityListener('vertical_swing', (value) => {
const rawValue = HVAC.VALUE.swingVert[value];
this.log('[vertical swing change]', `Value: ${value}`, `Raw value: ${rawValue}`);
this._setClientProperty(HVAC.PROPERTY.swingVert, rawValue);
Expand Down

0 comments on commit 7313c76

Please sign in to comment.