node-red-contrib-alice 2.1.5 → 2.2.0

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.
@@ -66,6 +66,12 @@
66
66
  <option value="devices.types.sensor.button">Sensor button</option>
67
67
  <option value="devices.types.sensor.gas">Sensor gas</option>
68
68
  <option value="devices.types.sensor.smoke">Sensor smoke</option>
69
+ <option value="devices.types.smart_meter">Counter</option>
70
+ <option value="devices.types.smart_meter.cold_water">Cold Water counter</option>
71
+ <option value="devices.types.smart_meter.hot_water">Hot Water counter</option>
72
+ <option value="devices.types.smart_meter.electricity">Electricity counter</option>
73
+ <option value="devices.types.smart_meter.gas">Gas counter</option>
74
+ <option value="devices.types.smart_meter.heat">Heat Water counter</option>
69
75
  <option value="devices.types.pet_drinking_fountain">Pet drinking fountain</option>
70
76
  <option value="devices.types.pet_feeder">Pet feeder</option>
71
77
  <option value="devices.types.other">Other</option>
@@ -86,7 +86,6 @@
86
86
  .end()
87
87
  .append('<option value="unit.temperature.celsius">Celsius</option>')
88
88
  .append('<option value="unit.temperature.kelvin">Kelvin</option>')
89
- // .val('unit.temperature.celsius')
90
89
  .prop('disabled', false);
91
90
  if (this.unit && this.unit.includes("unit.temperature")){
92
91
  $('#node-input-unit').val(this.unit);
@@ -174,6 +173,51 @@
174
173
  .val('unit.density.mcg_m3')
175
174
  .prop('disabled', 'disabled');
176
175
  break;
176
+ case 'electricity_meter':
177
+ $('#node-input-unit')
178
+ .find('option')
179
+ .remove()
180
+ .end()
181
+ .append('<option value="unit.kilowatt_hour">kW⋅h</option>')
182
+ .val('unit.kilowatt_hour')
183
+ .prop('disabled', 'disabled');
184
+ break;
185
+ case 'gas_meter':
186
+ $('#node-input-unit')
187
+ .find('option')
188
+ .remove()
189
+ .end()
190
+ .append('<option value="unit.cubic_meter">m3</option>')
191
+ .val('unit.cubic_meter')
192
+ .prop('disabled', 'disabled');
193
+ break;
194
+ case 'heat_meter':
195
+ $('#node-input-unit')
196
+ .find('option')
197
+ .remove()
198
+ .end()
199
+ .append('<option value="unit.gigacalorie">Gcal</option>')
200
+ .val('unit.gigacalorie')
201
+ .prop('disabled', 'disabled');
202
+ break;
203
+ case 'water_meter':
204
+ $('#node-input-unit')
205
+ .find('option')
206
+ .remove()
207
+ .end()
208
+ .append('<option value="unit.cubic_meter">m3</option>')
209
+ .val('unit.cubic_meter')
210
+ .prop('disabled', 'disabled');
211
+ break;
212
+ case 'meter':
213
+ $('#node-input-unit')
214
+ .find('option')
215
+ .remove()
216
+ .end()
217
+ // .append('<option value="unit.gigacalorie">Gcal</option>')
218
+ // .val('unit.gigacalorie')
219
+ .prop('disabled', 'disabled');
220
+ break;
177
221
  default:
178
222
  $('#node-input-unit').prop('disabled', 'disabled');
179
223
  break;
@@ -212,15 +256,13 @@
212
256
  <option value="tvoc">TVOC</option>
213
257
  <option value="voltage">Voltage</option>
214
258
  <option value="water_level">Water level</option>
259
+ <option value="electricity_meter">Electricity counter</option>
260
+ <option value="gas_meter">Gas counter</option>
261
+ <option value="water_meter">Water counter</option>
262
+ <option value="meter">Universal counter</option>
215
263
  </select>
216
264
  </div>
217
- <!-- <div class="form-row">
218
- <label for="node-input-stype">Data Type</label>
219
- <select id="node-input-stype" style="width: 70%;" disabled>
220
- <option value="devices.properties.float">Number (float)</option>
221
- <option value="devices.properties.bool">Boolean (true/false)</option>
222
- </select>
223
- </div> -->
265
+
224
266
  <div class="form-row">
225
267
  <label for="node-input-unit">Unit</label>
226
268
  <select id="node-input-unit" style="width: 70%;">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-alice",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "description": "",
5
5
  "main": "alice.js",
6
6
  "scripts": {