@@ -61,6 +61,14 @@ class PresetModeV03(t.enum8):
61
61
Temporary_Manual = 0x02
62
62
63
63
64
+ class PresetModeV04 (t .enum8 ):
65
+ """Tuya preset mode v04 enum."""
66
+
67
+ Manual = 0x00
68
+ Auto = 0x01
69
+ Eco = 0x03
70
+
71
+
64
72
class SensorMode (t .enum8 ):
65
73
"""Tuya sensor mode enum."""
66
74
@@ -473,3 +481,129 @@ def handle_mcu_version_response(
473
481
)
474
482
.add_to_registry (replacement_cluster = NoManufTimeNoVersionRespTuyaMCUCluster )
475
483
)
484
+
485
+
486
+ # Beok TGM50-ZB-WPB
487
+ (
488
+ TuyaQuirkBuilder ("_TZE204_cvub6xbb" , "TS0601" )
489
+ .tuya_dp (
490
+ dp_id = 1 ,
491
+ ep_attribute = TuyaThermostat .ep_attribute ,
492
+ attribute_name = TuyaThermostat .AttributeDefs .system_mode .name ,
493
+ converter = lambda x : {
494
+ True : Thermostat .SystemMode .Heat ,
495
+ False : Thermostat .SystemMode .Off ,
496
+ }[x ],
497
+ dp_converter = lambda x : {
498
+ Thermostat .SystemMode .Heat : True ,
499
+ Thermostat .SystemMode .Off : False ,
500
+ }[x ],
501
+ )
502
+ .tuya_dp (
503
+ dp_id = 2 ,
504
+ ep_attribute = TuyaThermostat .ep_attribute ,
505
+ attribute_name = TuyaThermostat .AttributeDefs .occupied_heating_setpoint .name ,
506
+ converter = lambda x : x * 10 ,
507
+ dp_converter = lambda x : x // 10 ,
508
+ )
509
+ .tuya_dp (
510
+ dp_id = 3 ,
511
+ ep_attribute = TuyaThermostat .ep_attribute ,
512
+ attribute_name = TuyaThermostat .AttributeDefs .local_temperature .name ,
513
+ converter = lambda x : x * 10 ,
514
+ )
515
+ .tuya_enum (
516
+ dp_id = 4 ,
517
+ attribute_name = "preset_mode" ,
518
+ enum_class = PresetModeV04 ,
519
+ translation_key = "preset_mode" ,
520
+ fallback_name = "Preset mode" ,
521
+ )
522
+ .tuya_switch (
523
+ dp_id = 9 ,
524
+ attribute_name = "child_lock" ,
525
+ translation_key = "child_lock" ,
526
+ fallback_name = "Child lock" ,
527
+ )
528
+ .tuya_dp (
529
+ dp_id = 15 ,
530
+ ep_attribute = TuyaThermostat .ep_attribute ,
531
+ attribute_name = TuyaThermostat .AttributeDefs .max_heat_setpoint_limit .name ,
532
+ converter = lambda x : x * 10 ,
533
+ dp_converter = lambda x : x // 10 ,
534
+ )
535
+ .tuya_number (
536
+ dp_id = 19 ,
537
+ attribute_name = TuyaThermostat .AttributeDefs .local_temperature_calibration .name ,
538
+ type = t .int32s ,
539
+ min_value = - 9.9 ,
540
+ max_value = 9.9 ,
541
+ unit = UnitOfTemperature .CELSIUS ,
542
+ step = 0.1 ,
543
+ multiplier = 0.1 ,
544
+ translation_key = "local_temperature_calibration" ,
545
+ fallback_name = "Local temperature calibration" ,
546
+ )
547
+ .tuya_dp (
548
+ dp_id = 101 ,
549
+ ep_attribute = TuyaThermostat .ep_attribute ,
550
+ attribute_name = TuyaThermostat .AttributeDefs .running_state .name ,
551
+ converter = lambda x : RunningState .Heat_State_On if x else RunningState .Idle ,
552
+ )
553
+ .tuya_switch (
554
+ dp_id = 102 ,
555
+ attribute_name = "frost_protection" ,
556
+ translation_key = "frost_protection" ,
557
+ fallback_name = "Frost protection" ,
558
+ )
559
+ .tuya_switch (
560
+ dp_id = 103 ,
561
+ attribute_name = "factory_reset" ,
562
+ translation_key = "factory_reset" ,
563
+ fallback_name = "Factory reset" ,
564
+ )
565
+ .tuya_switch (
566
+ dp_id = 105 ,
567
+ attribute_name = "sound_enabled" ,
568
+ translation_key = "sound_enabled" ,
569
+ fallback_name = "Sound enabled" ,
570
+ )
571
+ .tuya_enum (
572
+ dp_id = 106 ,
573
+ attribute_name = "temperature_sensor_select" ,
574
+ enum_class = SensorMode ,
575
+ translation_key = "sensor_mode" ,
576
+ fallback_name = "Sensor mode" ,
577
+ )
578
+ .tuya_number (
579
+ dp_id = 107 ,
580
+ attribute_name = "deadzone_temperature" ,
581
+ type = t .uint16_t ,
582
+ unit = UnitOfTemperature .CELSIUS ,
583
+ min_value = 0.5 ,
584
+ max_value = 10 ,
585
+ step = 0.5 ,
586
+ multiplier = 0.1 ,
587
+ translation_key = "deadzone_temperature" ,
588
+ fallback_name = "Deadzone temperature" ,
589
+ )
590
+ # 109 ZWT198 schedule, skipped
591
+ .tuya_enum (
592
+ dp_id = 110 ,
593
+ attribute_name = "backlight_mode" ,
594
+ enum_class = BacklightMode ,
595
+ translation_key = "backlight_mode" ,
596
+ fallback_name = "Backlight mode" ,
597
+ )
598
+ .tuya_switch (
599
+ dp_id = 111 ,
600
+ attribute_name = "invert_relay" ,
601
+ on_value = 0 ,
602
+ off_value = 1 ,
603
+ translation_key = "invert_relay" ,
604
+ fallback_name = "Invert relay" ,
605
+ )
606
+ .adds (TuyaThermostat )
607
+ .skip_configuration ()
608
+ .add_to_registry ()
609
+ )
0 commit comments