@@ -410,4 +410,140 @@ export const definitions: DefinitionWithExtend[] = [
410410 ] ,
411411 } ,
412412 } ,
413+ {
414+ fingerprint : tuya . fingerprint ( "TS0601" , [ "_TZE204_lnxdk2ch" ] ) ,
415+ model : "E40" ,
416+ vendor : "ENGO" ,
417+ description : "Zigbee smart thermostat" ,
418+ extend : [ tuya . modernExtend . tuyaBase ( { dp : true } ) ] ,
419+ exposes : [
420+ e . binary ( "state" , ea . STATE_SET , "ON" , "OFF" ) ,
421+ e
422+ . climate ( )
423+ . withSystemMode ( [ "heat" , "cool" ] , ea . STATE_SET )
424+ . withSetpoint ( "current_heating_setpoint" , 5 , 45 , 0.5 , ea . STATE_SET )
425+ . withLocalTemperature ( ea . STATE )
426+ . withLocalTemperatureCalibration ( - 3.5 , 3.5 , 0.5 , ea . STATE_SET )
427+ . withRunningState ( [ "idle" , "heat" , "cool" ] , ea . STATE )
428+ . withPreset ( [ "manual" , "schedule" , "frost" ] ) ,
429+ e
430+ . numeric ( "backlight" , ea . STATE_SET )
431+ . withUnit ( "%" )
432+ . withDescription ( "Backlight brightness" )
433+ . withValueMin ( 0 )
434+ . withValueMax ( 100 )
435+ . withValueStep ( 1 ) ,
436+ e . enum ( "sensor_error" , ea . STATE , [ "normal" , "E1" , "E2" ] ) ,
437+ e . child_lock ( ) ,
438+ e . enum ( "relay_mode" , ea . STATE_SET , [ "NO" , "NC" , "OFF" ] ) ,
439+ e . enum ( "sensor_choose" , ea . STATE_SET , [ "internal" , "all" , "external" ] ) ,
440+ e . numeric ( "holiday_temperature" , ea . STATE_SET ) . withUnit ( "°C" ) . withValueMin ( 5 ) . withValueMax ( 45 ) . withValueStep ( 0.5 ) ,
441+ e . numeric ( "holiday_days" , ea . STATE_SET ) . withUnit ( "days" ) . withValueMin ( 1 ) . withValueMax ( 30 ) . withValueStep ( 1 ) ,
442+ e . enum ( "control_algorithm" , ea . STATE_SET , [
443+ "TPI_UFH" ,
444+ "TPI_RAD" ,
445+ "TPI_ELE" ,
446+ "HIS_04" ,
447+ "HIS_08" ,
448+ "HIS_12" ,
449+ "HIS_16" ,
450+ "HIS_20" ,
451+ "HIS_30" ,
452+ "HIS_40" ,
453+ ] ) ,
454+ e . numeric ( "frost_set" , ea . STATE_SET ) . withUnit ( "°C" ) . withValueMin ( 5 ) . withValueMax ( 17 ) . withValueStep ( 0.5 ) ,
455+ e . binary ( "valve_protection" , ea . STATE_SET , "ON" , "OFF" ) ,
456+ e . enum ( "comfort_warm_floor" , ea . STATE_SET , [ "OFF" , "LEVEL1" , "LEVEL2" , "LEVEL3" , "LEVEL4" , "LEVEL5" ] ) ,
457+ e . max_temperature ( ) . withValueMin ( 5 ) . withValueMax ( 45 ) ,
458+ e . min_temperature ( ) . withValueMin ( 6 ) . withValueMax ( 45 ) ,
459+ e . text ( "schedule_monday" , ea . STATE_SET ) ,
460+ e . text ( "schedule_tuesday" , ea . STATE_SET ) ,
461+ e . text ( "schedule_wednesday" , ea . STATE_SET ) ,
462+ e . text ( "schedule_thursday" , ea . STATE_SET ) ,
463+ e . text ( "schedule_friday" , ea . STATE_SET ) ,
464+ e . text ( "schedule_saturday" , ea . STATE_SET ) ,
465+ e . text ( "schedule_sunday" , ea . STATE_SET ) ,
466+ ] ,
467+ meta : {
468+ tuyaDatapoints : [
469+ [ 1 , "state" , tuya . valueConverter . onOff ] ,
470+ [ 2 , "system_mode" , tuya . valueConverterBasic . lookup ( { heat : tuya . enum ( 0 ) , cool : tuya . enum ( 1 ) } ) ] ,
471+ [
472+ 3 ,
473+ "running_state" ,
474+ tuya . valueConverterBasic . lookup ( {
475+ heat : tuya . enum ( 2 ) ,
476+ cool : tuya . enum ( 3 ) ,
477+ idle : tuya . enum ( 4 ) ,
478+ idle_0 : tuya . enum ( 0 ) ,
479+ } ) ,
480+ ] ,
481+ [ 16 , "current_heating_setpoint" , tuya . valueConverter . divideBy10 ] ,
482+ [ 19 , "max_temperature" , tuya . valueConverter . divideBy10 ] ,
483+ [ 24 , "local_temperature" , tuya . valueConverter . divideBy10 ] ,
484+ [ 26 , "min_temperature" , tuya . valueConverter . divideBy10 ] ,
485+ [
486+ 27 ,
487+ "local_temperature_calibration" ,
488+ {
489+ from : ( v : number ) => {
490+ let value = v ;
491+ if ( value > 0x7fffffff ) value -= 4294967296 ;
492+ return value / 10 ;
493+ } ,
494+ to : ( v : number ) => {
495+ let val = Math . round ( v * 10 ) ;
496+ if ( val < 0 ) val += 4294967296 ;
497+ return val ;
498+ } ,
499+ } ,
500+ ] ,
501+ [ 32 , "holiday_temperature" , tuya . valueConverter . divideBy10 ] ,
502+ [ 33 , "holiday_days" , tuya . valueConverter . raw ] ,
503+ [ 40 , "child_lock" , tuya . valueConverter . lockUnlock ] ,
504+ [ 43 , "sensor_choose" , tuya . valueConverterBasic . lookup ( { internal : tuya . enum ( 0 ) , all : tuya . enum ( 1 ) , external : tuya . enum ( 2 ) } ) ] ,
505+ [ 44 , "backlight" , tuya . valueConverter . raw ] ,
506+ [
507+ 45 ,
508+ "comfort_warm_floor" ,
509+ tuya . valueConverterBasic . lookup ( {
510+ OFF : tuya . enum ( 0 ) ,
511+ LEVEL1 : tuya . enum ( 1 ) ,
512+ LEVEL2 : tuya . enum ( 2 ) ,
513+ LEVEL3 : tuya . enum ( 3 ) ,
514+ LEVEL4 : tuya . enum ( 4 ) ,
515+ LEVEL5 : tuya . enum ( 5 ) ,
516+ } ) ,
517+ ] ,
518+ [ 58 , "preset" , tuya . valueConverterBasic . lookup ( { manual : tuya . enum ( 0 ) , schedule : tuya . enum ( 1 ) , frost : tuya . enum ( 3 ) } ) ] ,
519+ [
520+ 101 ,
521+ "control_algorithm" ,
522+ tuya . valueConverterBasic . lookup ( {
523+ TPI_UFH : tuya . enum ( 0 ) ,
524+ TPI_RAD : tuya . enum ( 1 ) ,
525+ TPI_ELE : tuya . enum ( 2 ) ,
526+ HIS_04 : tuya . enum ( 3 ) ,
527+ HIS_08 : tuya . enum ( 4 ) ,
528+ HIS_12 : tuya . enum ( 5 ) ,
529+ HIS_16 : tuya . enum ( 6 ) ,
530+ HIS_20 : tuya . enum ( 8 ) ,
531+ HIS_30 : tuya . enum ( 9 ) ,
532+ HIS_40 : tuya . enum ( 10 ) ,
533+ } ) ,
534+ ] ,
535+ [ 106 , "frost_set" , tuya . valueConverter . divideBy10 ] ,
536+ [ 107 , "valve_protection" , tuya . valueConverter . onOff ] ,
537+ [ 108 , "relay_mode" , tuya . valueConverterBasic . lookup ( { NO : tuya . enum ( 0 ) , NC : tuya . enum ( 1 ) , OFF : tuya . enum ( 2 ) } ) ] ,
538+ [ 120 , "sensor_error" , tuya . valueConverterBasic . lookup ( { normal : tuya . enum ( 0 ) , E1 : tuya . enum ( 1 ) , E2 : tuya . enum ( 2 ) } ) ] ,
539+ [ 109 , "schedule_monday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 1 ) ] ,
540+ [ 110 , "schedule_tuesday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 2 ) ] ,
541+ [ 111 , "schedule_wednesday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 3 ) ] ,
542+ [ 112 , "schedule_thursday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 4 ) ] ,
543+ [ 113 , "schedule_friday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 5 ) ] ,
544+ [ 114 , "schedule_saturday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 6 ) ] ,
545+ [ 115 , "schedule_sunday" , tuya . valueConverter . thermostatScheduleDayMultiDPWithDayNumber ( 7 ) ] ,
546+ ] ,
547+ } ,
548+ } ,
413549] ;
0 commit comments