zigbee-herdsman-converters 21.6.0 → 21.7.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.
- package/CHANGELOG.md +19 -0
- package/devices/ikea.js +1 -1
- package/devices/ikea.js.map +1 -1
- package/devices/innr.d.ts.map +1 -1
- package/devices/innr.js +2 -1
- package/devices/innr.js.map +1 -1
- package/devices/moes.js +1 -1
- package/devices/moes.js.map +1 -1
- package/devices/namron.d.ts.map +1 -1
- package/devices/namron.js +133 -0
- package/devices/namron.js.map +1 -1
- package/devices/philips.d.ts.map +1 -1
- package/devices/philips.js +8 -1
- package/devices/philips.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +269 -1
- package/devices/tuya.js.map +1 -1
- package/lib/color.d.ts.map +1 -1
- package/lib/color.js +6 -2
- package/lib/color.js.map +1 -1
- package/lib/tuya.d.ts +16 -4
- package/lib/tuya.d.ts.map +1 -1
- package/lib/tuya.js +118 -1
- package/lib/tuya.js.map +1 -1
- package/package.json +1 -1
package/devices/tuya.js
CHANGED
|
@@ -8341,7 +8341,7 @@ const definitions = [
|
|
|
8341
8341
|
tuyaDatapoints: [
|
|
8342
8342
|
[1, 'temperature', tuya.valueConverter.divideBy10],
|
|
8343
8343
|
[2, 'humidity', tuya.valueConverter.raw],
|
|
8344
|
-
[4, 'battery', tuya.valueConverter.
|
|
8344
|
+
[4, 'battery', tuya.valueConverter.divideBy2],
|
|
8345
8345
|
[9, 'temperature_unit', tuya.valueConverter.temperatureUnit],
|
|
8346
8346
|
[23, 'temperature_calibration', tuya.valueConverter.divideBy10],
|
|
8347
8347
|
[24, 'humidity_calibration', tuya.valueConverter.raw],
|
|
@@ -13335,6 +13335,274 @@ const definitions = [
|
|
|
13335
13335
|
],
|
|
13336
13336
|
},
|
|
13337
13337
|
},
|
|
13338
|
+
{
|
|
13339
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE204_d6i25bwg']),
|
|
13340
|
+
model: 'PO-BOCO-ELEC',
|
|
13341
|
+
vendor: 'Powernity',
|
|
13342
|
+
description: 'Pilot wire heating module',
|
|
13343
|
+
extend: [tuyaBase({ dp: true })],
|
|
13344
|
+
exposes: [
|
|
13345
|
+
e
|
|
13346
|
+
.climate()
|
|
13347
|
+
.withPreset(['manual', 'auto', 'holiday'])
|
|
13348
|
+
.withLocalTemperature(ea.STATE)
|
|
13349
|
+
.withSetpoint('occupied_heating_setpoint', 0, 20, 1, ea.STATE_SET)
|
|
13350
|
+
.withLocalTemperatureCalibration(-5.5, 5.5, 0.5, ea.STATE_SET)
|
|
13351
|
+
.withSystemMode(['off', 'heat', 'auto'], ea.STATE_SET, 'Only for Homeassistant'),
|
|
13352
|
+
e.enum('auto_mode', ea.STATE_SET, ['off', 'antifrost', 'eco', 'comfort_-2', 'comfort_-1', 'comfort']).withDescription('Auto Mode'),
|
|
13353
|
+
e.enum('manual_mode', ea.STATE_SET, ['off', 'antifrost', 'eco', 'comfort_-2', 'comfort_-1', 'comfort']).withDescription('Manual Mode'),
|
|
13354
|
+
tuya.exposes.frostProtection(),
|
|
13355
|
+
// e.text("antifrost_mode", ea.STATE),
|
|
13356
|
+
e.humidity(),
|
|
13357
|
+
e.child_lock(),
|
|
13358
|
+
e.window_detection(),
|
|
13359
|
+
e
|
|
13360
|
+
.enum('window_opening_mode', ea.STATE_SET, ['off', 'antifrost', 'eco', 'comfort_-2', 'comfort_-1', 'comfort'])
|
|
13361
|
+
.withDescription('Window Opening Mode'),
|
|
13362
|
+
e
|
|
13363
|
+
.numeric('window_opening_mode_duration', ea.STATE_SET)
|
|
13364
|
+
.withUnit('min')
|
|
13365
|
+
.withDescription('Duration of the window opening mode')
|
|
13366
|
+
.withValueMin(1)
|
|
13367
|
+
.withValueMax(90),
|
|
13368
|
+
tuya.exposes.temperatureUnit(),
|
|
13369
|
+
e
|
|
13370
|
+
.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF')
|
|
13371
|
+
.withDescription('Boost Heating: the device will enter the boost heating mode.')
|
|
13372
|
+
.withCategory('config'),
|
|
13373
|
+
e
|
|
13374
|
+
.numeric('boost_timeset_countdown', ea.STATE)
|
|
13375
|
+
.withUnit('s')
|
|
13376
|
+
.withDescription('The remaining ' + 'time for the function will be counted down in seconds ( 900 to 0 ) when the boost heating is activated.')
|
|
13377
|
+
.withValueMin(0)
|
|
13378
|
+
.withValueMax(900),
|
|
13379
|
+
e
|
|
13380
|
+
.numeric('power_rating', ea.STATE_SET)
|
|
13381
|
+
.withDescription('How much power is the heater rated to. Entering a value will allow the Thermostat to record a value of power usage that can be checked under settings on the physical Thermostat')
|
|
13382
|
+
.withUnit('kWh')
|
|
13383
|
+
.withValueMin(10)
|
|
13384
|
+
.withValueMax(10000)
|
|
13385
|
+
.withValueStep(10)
|
|
13386
|
+
.withCategory('config'),
|
|
13387
|
+
e.numeric('energy_consumed', ea.STATE).withUnit('kWh').withDescription('Consumed energy'),
|
|
13388
|
+
e
|
|
13389
|
+
.enum('mode_switching', ea.STATE_SET, ['four_modes', 'six_modes'])
|
|
13390
|
+
.withDescription('Choose the number of mode your heater supports.')
|
|
13391
|
+
.withCategory('config'),
|
|
13392
|
+
e
|
|
13393
|
+
.text('schedule_monday', ea.STATE_SET)
|
|
13394
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13395
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13396
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13397
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13398
|
+
e
|
|
13399
|
+
.text('schedule_tuesday', ea.STATE_SET)
|
|
13400
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13401
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13402
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13403
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13404
|
+
e
|
|
13405
|
+
.text('schedule_wednesday', ea.STATE_SET)
|
|
13406
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13407
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13408
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13409
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13410
|
+
e
|
|
13411
|
+
.text('schedule_thursday', ea.STATE_SET)
|
|
13412
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13413
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13414
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13415
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13416
|
+
e
|
|
13417
|
+
.text('schedule_friday', ea.STATE_SET)
|
|
13418
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13419
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13420
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13421
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13422
|
+
e
|
|
13423
|
+
.text('schedule_saturday', ea.STATE_SET)
|
|
13424
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13425
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13426
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13427
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13428
|
+
e
|
|
13429
|
+
.text('schedule_sunday', ea.STATE_SET)
|
|
13430
|
+
.withDescription('Schedule for the auto mode. Can be defined in the following format: ' +
|
|
13431
|
+
'`mode / hours:minutes / mode`. ' +
|
|
13432
|
+
'For example: `comfort / 06:00 / eco / 12:00 / off`. ' +
|
|
13433
|
+
'Note: Minutes can only be set by multiple of 5. Your limited to 9 modes max.'),
|
|
13434
|
+
e
|
|
13435
|
+
.text('holiday_start_stop', ea.STATE_SET)
|
|
13436
|
+
.withDescription('The holiday mode will automatically start ' +
|
|
13437
|
+
'at the set time starting point and run the holiday mode. Can be defined in the following format: ' +
|
|
13438
|
+
'`startYear/startMonth/startDay startHours:startMinutes | endYear/endMonth/endDay endHours:endMinutes | mode`. ' +
|
|
13439
|
+
'For example: `2024/12/12 09:00 | 2024/12/14 10:00 | comfort`' +
|
|
13440
|
+
'Note: You cannot set an interval superior at 255 hours. The end date minutes will be ignore.'),
|
|
13441
|
+
e.binary('reset_consumption', ea.STATE_SET, 'ON', 'OFF').withDescription('Reset energy consumption to zero').withCategory('config'),
|
|
13442
|
+
],
|
|
13443
|
+
meta: {
|
|
13444
|
+
tuyaDatapoints: [
|
|
13445
|
+
[
|
|
13446
|
+
null,
|
|
13447
|
+
'occupied_heating_setpoint',
|
|
13448
|
+
{
|
|
13449
|
+
to: async (v, meta) => {
|
|
13450
|
+
const entity = meta.device.endpoints[0];
|
|
13451
|
+
const mode = meta.state.mode_switching;
|
|
13452
|
+
let temp = v;
|
|
13453
|
+
if (meta.state.temperature_unit === 'fahrenheit')
|
|
13454
|
+
temp = ((temp - 32) * 5) / 9;
|
|
13455
|
+
await tuya.sendDataPointEnum(entity, 2, 1, 'dataRequest', 1); // manual
|
|
13456
|
+
if (temp === 0) {
|
|
13457
|
+
await tuya.sendDataPointEnum(entity, 127, 5, 'dataRequest', 3); //off
|
|
13458
|
+
}
|
|
13459
|
+
else if (temp < 16) {
|
|
13460
|
+
await tuya.sendDataPointEnum(entity, 127, 4, 'dataRequest', 3); //antifrost
|
|
13461
|
+
}
|
|
13462
|
+
else if (temp >= 19) {
|
|
13463
|
+
await tuya.sendDataPointEnum(entity, 127, 0, 'dataRequest', 1); //comfort
|
|
13464
|
+
}
|
|
13465
|
+
else if (mode === 1) {
|
|
13466
|
+
if (temp === 17) {
|
|
13467
|
+
await tuya.sendDataPointEnum(entity, 127, 2, 'dataRequest', 1); // comfort-2
|
|
13468
|
+
}
|
|
13469
|
+
else if (temp === 18) {
|
|
13470
|
+
await tuya.sendDataPointEnum(entity, 127, 1, 'dataRequest', 1); // comfort-1
|
|
13471
|
+
}
|
|
13472
|
+
}
|
|
13473
|
+
else {
|
|
13474
|
+
await tuya.sendDataPointEnum(entity, 127, 3, 'dataRequest', 1); // eco
|
|
13475
|
+
}
|
|
13476
|
+
return v;
|
|
13477
|
+
},
|
|
13478
|
+
},
|
|
13479
|
+
],
|
|
13480
|
+
[
|
|
13481
|
+
2,
|
|
13482
|
+
'preset',
|
|
13483
|
+
tuya.valueConverterBasic.lookup({
|
|
13484
|
+
auto: tuya.enum(0),
|
|
13485
|
+
manual: tuya.enum(1),
|
|
13486
|
+
holiday: tuya.enum(2),
|
|
13487
|
+
}),
|
|
13488
|
+
],
|
|
13489
|
+
[
|
|
13490
|
+
null,
|
|
13491
|
+
'system_mode',
|
|
13492
|
+
{
|
|
13493
|
+
// Extend system_mode to support 'off' in addition to 'heat' and 'auto'
|
|
13494
|
+
to: async (v, meta) => {
|
|
13495
|
+
const entity = meta.device.endpoints[0];
|
|
13496
|
+
let temp = meta.state.occupied_heating_setpoint;
|
|
13497
|
+
if (meta.state.temperature_unit === 'fahrenheit')
|
|
13498
|
+
temp = ((temp - 32) * 5) / 9;
|
|
13499
|
+
const mode = meta.state.mode_switching;
|
|
13500
|
+
switch (v) {
|
|
13501
|
+
case 'off':
|
|
13502
|
+
await tuya.sendDataPointEnum(entity, 2, 1, 'dataRequest', 1); // manual
|
|
13503
|
+
await tuya.sendDataPointEnum(entity, 127, 5, 'dataRequest', 1); // off
|
|
13504
|
+
break;
|
|
13505
|
+
case 'heat':
|
|
13506
|
+
await tuya.sendDataPointEnum(entity, 2, 1, 'dataRequest', 1); // manual
|
|
13507
|
+
if (temp === 0) {
|
|
13508
|
+
await tuya.sendDataPointEnum(entity, 127, 5, 'dataRequest', 3); //off
|
|
13509
|
+
}
|
|
13510
|
+
else if (temp < 16) {
|
|
13511
|
+
await tuya.sendDataPointEnum(entity, 127, 4, 'dataRequest', 3); //antifrost
|
|
13512
|
+
}
|
|
13513
|
+
else if (temp >= 19) {
|
|
13514
|
+
await tuya.sendDataPointEnum(entity, 127, 0, 'dataRequest', 1); //comfort
|
|
13515
|
+
}
|
|
13516
|
+
else if (mode === 1) {
|
|
13517
|
+
if (temp === 17) {
|
|
13518
|
+
await tuya.sendDataPointEnum(entity, 127, 2, 'dataRequest', 1); // comfort-2
|
|
13519
|
+
}
|
|
13520
|
+
else if (temp === 18) {
|
|
13521
|
+
await tuya.sendDataPointEnum(entity, 127, 1, 'dataRequest', 1); // comfort-1
|
|
13522
|
+
}
|
|
13523
|
+
}
|
|
13524
|
+
else {
|
|
13525
|
+
await tuya.sendDataPointEnum(entity, 127, 3, 'dataRequest', 1); // eco
|
|
13526
|
+
}
|
|
13527
|
+
break;
|
|
13528
|
+
case 'auto':
|
|
13529
|
+
await tuya.sendDataPointEnum(entity, 2, 0, 'dataRequest', 1); // auto
|
|
13530
|
+
break;
|
|
13531
|
+
}
|
|
13532
|
+
},
|
|
13533
|
+
},
|
|
13534
|
+
],
|
|
13535
|
+
[8, 'humidity', tuya.valueConverter.raw],
|
|
13536
|
+
[11, 'energy_consumed', tuya.valueConverter.raw],
|
|
13537
|
+
[16, 'local_temperature', tuya.valueConverter.divideBy10],
|
|
13538
|
+
[39, 'child_lock', tuya.valueConverter.lockUnlock],
|
|
13539
|
+
[46, 'temperature_unit', tuya.valueConverter.temperatureUnitEnum],
|
|
13540
|
+
[101, 'local_temperature_calibration', tuya.valueConverter.localTempCalibration1],
|
|
13541
|
+
[108, 'boost_heating', tuya.valueConverter.onOff],
|
|
13542
|
+
[114, 'schedule_monday', tuya.valueConverter.PO_BOCO_ELEC_schedule(1)],
|
|
13543
|
+
[115, 'schedule_tuesday', tuya.valueConverter.PO_BOCO_ELEC_schedule(2)],
|
|
13544
|
+
[116, 'schedule_wednesday', tuya.valueConverter.PO_BOCO_ELEC_schedule(3)],
|
|
13545
|
+
[117, 'schedule_thursday', tuya.valueConverter.PO_BOCO_ELEC_schedule(4)],
|
|
13546
|
+
[118, 'schedule_friday', tuya.valueConverter.PO_BOCO_ELEC_schedule(5)],
|
|
13547
|
+
[119, 'schedule_saturday', tuya.valueConverter.PO_BOCO_ELEC_schedule(6)],
|
|
13548
|
+
[120, 'schedule_sunday', tuya.valueConverter.PO_BOCO_ELEC_schedule(7)],
|
|
13549
|
+
[123, 'boost_timeset_countdown', tuya.valueConverter.raw],
|
|
13550
|
+
// [125, "temperature_antifreeze", tuya.valueConverterBasic.raw],
|
|
13551
|
+
[
|
|
13552
|
+
126,
|
|
13553
|
+
'auto_mode',
|
|
13554
|
+
tuya.valueConverterBasic.lookup({
|
|
13555
|
+
off: tuya.enum(5),
|
|
13556
|
+
antifrost: tuya.enum(4),
|
|
13557
|
+
eco: tuya.enum(3),
|
|
13558
|
+
'comfort_-2': tuya.enum(2),
|
|
13559
|
+
'comfort_-1': tuya.enum(1),
|
|
13560
|
+
comfort: tuya.enum(0),
|
|
13561
|
+
}),
|
|
13562
|
+
],
|
|
13563
|
+
[
|
|
13564
|
+
127,
|
|
13565
|
+
'manual_mode',
|
|
13566
|
+
tuya.valueConverterBasic.lookup({
|
|
13567
|
+
off: tuya.enum(5),
|
|
13568
|
+
antifrost: tuya.enum(4),
|
|
13569
|
+
eco: tuya.enum(3),
|
|
13570
|
+
'comfort_-2': tuya.enum(2),
|
|
13571
|
+
'comfort_-1': tuya.enum(1),
|
|
13572
|
+
comfort: tuya.enum(0),
|
|
13573
|
+
}),
|
|
13574
|
+
],
|
|
13575
|
+
[136, 'frost_protection', tuya.valueConverter.onOff],
|
|
13576
|
+
// [137, "antifrost", tuya.valueConverterBasic.raw],
|
|
13577
|
+
[138, 'window_detection', tuya.valueConverter.onOff],
|
|
13578
|
+
[
|
|
13579
|
+
139,
|
|
13580
|
+
'window_opening_mode',
|
|
13581
|
+
tuya.valueConverterBasic.lookup({
|
|
13582
|
+
off: tuya.enum(5),
|
|
13583
|
+
antifrost: tuya.enum(4),
|
|
13584
|
+
eco: tuya.enum(3),
|
|
13585
|
+
'comfort_-2': tuya.enum(2),
|
|
13586
|
+
'comfort_-1': tuya.enum(1),
|
|
13587
|
+
comfort: tuya.enum(0),
|
|
13588
|
+
}),
|
|
13589
|
+
],
|
|
13590
|
+
[140, 'window_opening_mode_duration', tuya.valueConverter.raw],
|
|
13591
|
+
[141, 'reset_consumption', tuya.valueConverter.onOff],
|
|
13592
|
+
[142, 'power_rating', tuya.valueConverter.raw],
|
|
13593
|
+
[143, 'holiday_start_stop', tuya.valueConverter.PO_BOCO_ELEC_holiday],
|
|
13594
|
+
[
|
|
13595
|
+
144,
|
|
13596
|
+
'mode_switching',
|
|
13597
|
+
tuya.valueConverterBasic.lookup({
|
|
13598
|
+
four_modes: tuya.enum(0),
|
|
13599
|
+
six_modes: tuya.enum(1),
|
|
13600
|
+
}),
|
|
13601
|
+
],
|
|
13602
|
+
// [145, "weekly temperature replication function", ],
|
|
13603
|
+
],
|
|
13604
|
+
},
|
|
13605
|
+
},
|
|
13338
13606
|
];
|
|
13339
13607
|
exports.default = definitions;
|
|
13340
13608
|
module.exports = definitions;
|