Add Tuya Window Covering attributes

This commit is contained in:
Stephan Hadinger 2021-09-06 14:45:10 +02:00
parent 225d757834
commit 8217c1330a
2 changed files with 70 additions and 57 deletions

View File

@ -444,6 +444,8 @@ const char Z_strings[] PROGMEM =
"TuyaAwayTemp" "\x00"
"TuyaBattery" "\x00"
"TuyaBoostTime" "\x00"
"TuyaCalibration" "\x00"
"TuyaCalibrationTime" "\x00"
"TuyaChildLock" "\x00"
"TuyaComfortTemp" "\x00"
"TuyaEcoTemp" "\x00"
@ -451,6 +453,8 @@ const char Z_strings[] PROGMEM =
"TuyaForceMode" "\x00"
"TuyaMaxTemp" "\x00"
"TuyaMinTemp" "\x00"
"TuyaMotorReversal" "\x00"
"TuyaMovingState" "\x00"
"TuyaPreset" "\x00"
"TuyaScheduleHolidays" "\x00"
"TuyaScheduleWorkdays" "\x00"
@ -873,63 +877,67 @@ enum Z_offsets {
Zo_TuyaAwayTemp = 5754,
Zo_TuyaBattery = 5767,
Zo_TuyaBoostTime = 5779,
Zo_TuyaChildLock = 5793,
Zo_TuyaComfortTemp = 5807,
Zo_TuyaEcoTemp = 5823,
Zo_TuyaFanMode = 5835,
Zo_TuyaForceMode = 5847,
Zo_TuyaMaxTemp = 5861,
Zo_TuyaMinTemp = 5873,
Zo_TuyaPreset = 5885,
Zo_TuyaScheduleHolidays = 5896,
Zo_TuyaScheduleWorkdays = 5917,
Zo_TuyaTempTarget = 5938,
Zo_TuyaValveDetection = 5953,
Zo_TuyaValvePosition = 5972,
Zo_TuyaWeekSelect = 5990,
Zo_TuyaWindowDetection = 6005,
Zo_UnoccupiedCoolingSetpoint = 6025,
Zo_UnoccupiedHeatingSetpoint = 6051,
Zo_UtilityName = 6077,
Zo_ValidUntilTime = 6089,
Zo_ValvePosition = 6104,
Zo_VelocityLift = 6118,
Zo_ViewGroup = 6131,
Zo_ViewScene = 6141,
Zo_Water = 6151,
Zo_WhitePointX = 6157,
Zo_WhitePointY = 6169,
Zo_WindowCoveringType = 6181,
Zo_X = 6200,
Zo_Y = 6202,
Zo_ZCLVersion = 6204,
Zo_ZoneState = 6215,
Zo_ZoneStatus = 6225,
Zo_ZoneStatusChange = 6236,
Zo_ZoneType = 6253,
Zo__ = 6262,
Zo_xx = 6264,
Zo_xx000A00 = 6267,
Zo_xx0A = 6276,
Zo_xx0A00 = 6281,
Zo_xx19 = 6288,
Zo_xx190A = 6293,
Zo_xx190A00 = 6300,
Zo_xxxx = 6309,
Zo_xxxx00 = 6314,
Zo_xxxx0A00 = 6321,
Zo_xxxxyy = 6330,
Zo_xxxxyyyy = 6337,
Zo_xxxxyyyy0A00 = 6346,
Zo_xxxxyyzz = 6359,
Zo_xxyy = 6368,
Zo_xxyy0A00 = 6373,
Zo_xxyyyy = 6382,
Zo_xxyyyy000000000000 = 6389,
Zo_xxyyyy0A0000000000 = 6408,
Zo_xxyyyyzz = 6427,
Zo_xxyyyyzzzz = 6436,
Zo_xxyyzzzz = 6447,
Zo_TuyaCalibration = 5793,
Zo_TuyaCalibrationTime = 5809,
Zo_TuyaChildLock = 5829,
Zo_TuyaComfortTemp = 5843,
Zo_TuyaEcoTemp = 5859,
Zo_TuyaFanMode = 5871,
Zo_TuyaForceMode = 5883,
Zo_TuyaMaxTemp = 5897,
Zo_TuyaMinTemp = 5909,
Zo_TuyaMotorReversal = 5921,
Zo_TuyaMovingState = 5939,
Zo_TuyaPreset = 5955,
Zo_TuyaScheduleHolidays = 5966,
Zo_TuyaScheduleWorkdays = 5987,
Zo_TuyaTempTarget = 6008,
Zo_TuyaValveDetection = 6023,
Zo_TuyaValvePosition = 6042,
Zo_TuyaWeekSelect = 6060,
Zo_TuyaWindowDetection = 6075,
Zo_UnoccupiedCoolingSetpoint = 6095,
Zo_UnoccupiedHeatingSetpoint = 6121,
Zo_UtilityName = 6147,
Zo_ValidUntilTime = 6159,
Zo_ValvePosition = 6174,
Zo_VelocityLift = 6188,
Zo_ViewGroup = 6201,
Zo_ViewScene = 6211,
Zo_Water = 6221,
Zo_WhitePointX = 6227,
Zo_WhitePointY = 6239,
Zo_WindowCoveringType = 6251,
Zo_X = 6270,
Zo_Y = 6272,
Zo_ZCLVersion = 6274,
Zo_ZoneState = 6285,
Zo_ZoneStatus = 6295,
Zo_ZoneStatusChange = 6306,
Zo_ZoneType = 6323,
Zo__ = 6332,
Zo_xx = 6334,
Zo_xx000A00 = 6337,
Zo_xx0A = 6346,
Zo_xx0A00 = 6351,
Zo_xx19 = 6358,
Zo_xx190A = 6363,
Zo_xx190A00 = 6370,
Zo_xxxx = 6379,
Zo_xxxx00 = 6384,
Zo_xxxx0A00 = 6391,
Zo_xxxxyy = 6400,
Zo_xxxxyyyy = 6407,
Zo_xxxxyyyy0A00 = 6416,
Zo_xxxxyyzz = 6429,
Zo_xxyy = 6438,
Zo_xxyy0A00 = 6443,
Zo_xxyyyy = 6452,
Zo_xxyyyy000000000000 = 6459,
Zo_xxyyyy0A0000000000 = 6478,
Zo_xxyyyyzz = 6497,
Zo_xxyyyyzzzz = 6506,
Zo_xxyyzzzz = 6517,
};

View File

@ -448,6 +448,11 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = {
{ Zmap8, Cx0102, 0x0017, Z_(Mode), Cm1, 0 },
{ Zoctstr, Cx0102, 0x0018, Z_(IntermediateSetpointsLift),Cm1, 0 },
{ Zoctstr, Cx0102, 0x0019, Z_(IntermediateSetpointsTilt),Cm1, 0 },
// Tuya specific, from Zigbee2MQTT https://github.com/Koenkk/zigbee-herdsman/blob/4fed7310d1e1e9d81e5148cf5b4d8ec98d03c687/src/zcl/definition/cluster.ts#L1772
{ Zenum8, Cx0102, 0xF000, Z_(TuyaMovingState),Cm1, 0 },
{ Zenum8, Cx0102, 0xF001, Z_(TuyaCalibration),Cm1, 0 },
{ Zenum8, Cx0102, 0xF002, Z_(TuyaMotorReversal),Cm1, 0 },
{ Zuint16, Cx0102, 0xF003, Z_(TuyaCalibrationTime),Cm1, 0 },
// Thermostat
{ Zint16, Cx0201, 0x0000, Z_(LocalTemperature), Cm_100, Z_MAPPING(Z_Data_Thermo, temperature) },