homebridge-verano 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +31 -57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homebridge-verano",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Plugins for Verano Heating System",
5
5
  "displayName": "Verano Heating System",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -53,20 +53,7 @@ class VeranoAccessoryPlugin {
53
53
 
54
54
  handleCurrentHeatingCoolingStateGet() {
55
55
  this.log.debug('Triggered GET CurrentHeatingCoolingState');
56
- return this.getTiles()
57
- .then(this.extractMode)
58
- .then(statusId => {
59
-
60
- if (statusId === 1) {
61
- return this.Characteristic.CurrentHeatingCoolingState.COOL;
62
- }
63
-
64
- if (statusId === 0) {
65
- return this.Characteristic.CurrentHeatingCoolingState.HEAT;
66
- }
67
-
68
- return this.Characteristic.CurrentHeatingCoolingState.OFF;
69
- });
56
+ return this.Characteristic.CurrentHeatingCoolingState.HEAT;
70
57
  }
71
58
 
72
59
 
@@ -75,55 +62,42 @@ class VeranoAccessoryPlugin {
75
62
  */
76
63
  handleTargetHeatingCoolingStateGet() {
77
64
  this.log.debug('Triggered GET TargetHeatingCoolingState');
78
- return this.getTiles()
79
- .then(this.extractMode)
80
- .then(statusId => {
81
-
82
- if (statusId === 1) {
83
- return this.Characteristic.TargetHeatingCoolingState.COOL;
84
- }
85
-
86
- if (statusId === 0) {
87
- return this.Characteristic.TargetHeatingCoolingState.HEAT;
88
- }
89
-
90
- return this.Characteristic.TargetHeatingCoolingState.OFF;
91
- });
65
+ return this.Characteristic.TargetHeatingCoolingState.HEAT;
92
66
  }
93
67
 
94
68
  /**
95
69
  * Handle requests to set the "Target Heating Cooling State" characteristic
96
70
  */
97
71
  handleTargetHeatingCoolingStateSet(value) {
98
- this.log.debug('Triggered SET TargetHeatingCoolingState:', value);
99
-
100
- let targetStatusId = 0;
101
- if (value === this.Characteristic.TargetHeatingCoolingState.OFF) {
102
- targetStatusId = 0;
103
- }
104
-
105
- if (value === this.Characteristic.TargetHeatingCoolingState.HEAT) {
106
- targetStatusId = 1;
107
- }
108
-
109
- if (value === this.Characteristic.TargetHeatingCoolingState.COOL) {
110
- targetStatusId = 0;
111
- }
112
-
113
- //verano 1 - heating, 0 - cooling
114
- const requestBody = [
115
- {
116
- ido: 138,
117
- params: targetStatusId,
118
- module_index: 0
119
- }
120
- ]
121
- axios.post('https://emodul.pl/send_control_data', requestBody, {
122
- headers: {
123
- 'Cookie': this.sessionCookie
124
- },
125
- withCredentials: true
126
- }).then(response => response.data);
72
+ // this.log.debug('Triggered SET TargetHeatingCoolingState:', value);
73
+ //
74
+ // let targetStatusId = 0;
75
+ // if (value === this.Characteristic.TargetHeatingCoolingState.OFF) {
76
+ // targetStatusId = 0;
77
+ // }
78
+ //
79
+ // if (value === this.Characteristic.TargetHeatingCoolingState.HEAT) {
80
+ // targetStatusId = 1;
81
+ // }
82
+ //
83
+ // if (value === this.Characteristic.TargetHeatingCoolingState.COOL) {
84
+ // targetStatusId = 0;
85
+ // }
86
+ //
87
+ // //verano 1 - heating, 0 - cooling
88
+ // const requestBody = [
89
+ // {
90
+ // ido: 138,
91
+ // params: targetStatusId,
92
+ // module_index: 0
93
+ // }
94
+ // ]
95
+ // axios.post('https://emodul.pl/send_control_data', requestBody, {
96
+ // headers: {
97
+ // 'Cookie': this.sessionCookie
98
+ // },
99
+ // withCredentials: true
100
+ // }).then(response => response.data);
127
101
  }
128
102
 
129
103
  /**