zigbee-herdsman-converters 25.9.0 → 25.10.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.
@@ -44,7 +44,7 @@ exports.definitions = [
44
44
  extend: [m.light({ colorTemp: { range: [153, 370] }, color: true })],
45
45
  endpoint: (device) => {
46
46
  // https://github.com/Koenkk/zigbee-herdsman-converters/issues/5463
47
- const endpoint = device.endpoints.find((e) => e.inputClusters.includes(6)).ID;
47
+ const endpoint = device.endpoints.find((e) => e.inputClusters.includes(6))?.ID ?? 1;
48
48
  return { default: endpoint };
49
49
  },
50
50
  },
@@ -1 +1 @@
1
- {"version":3,"file":"seastar_intelligence.js","sourceRoot":"","sources":["../../src/devices/seastar_intelligence.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AAG5B,QAAA,WAAW,GAA2B;IAC/C;QACI,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,kBAAkB;QAC1B,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAC,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAChE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACjB,mEAAmE;YACnE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9E,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,CAAC;QAC/B,CAAC;KACJ;CACJ,CAAC"}
1
+ {"version":3,"file":"seastar_intelligence.js","sourceRoot":"","sources":["../../src/devices/seastar_intelligence.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AAG5B,QAAA,WAAW,GAA2B;IAC/C;QACI,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,kBAAkB;QAC1B,WAAW,EAAE,2BAA2B;QACxC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,EAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAC,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAChE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YACjB,mEAAmE;YACnE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACpF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,CAAC;QAC/B,CAAC;KACJ;CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"slacky_diy.d.ts","sourceRoot":"","sources":["../../src/devices/slacky_diy.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,oBAAoB,EAA0D,MAAM,cAAc,CAAC;AA05B5H,eAAO,MAAM,WAAW,EAAE,oBAAoB,EA+9B7C,CAAC"}
1
+ {"version":3,"file":"slacky_diy.d.ts","sourceRoot":"","sources":["../../src/devices/slacky_diy.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAa,oBAAoB,EAA0D,MAAM,cAAc,CAAC;AA6/B5H,eAAO,MAAM,WAAW,EAAE,oBAAoB,EAmoC7C,CAAC"}
@@ -83,6 +83,11 @@ const attrHumidityOffset = 0xf005;
83
83
  const attrHumidityOnOff = 0xf006;
84
84
  const attrHumidityLow = 0xf007;
85
85
  const attrHumidityHigh = 0xf008;
86
+ const attrCo2Calibration = 0xf008;
87
+ const attrFeaturesSensors = 0xf009;
88
+ const attrDisplayRotate = 0xf00a;
89
+ const attrDisplayInversion = 0xf00b;
90
+ const switchFeatures = ["nothing", "co2_forced_calibration", "co2_factory_reset", "bind_reset", ""];
86
91
  const fzLocal = {
87
92
  thermostat_custom_fw: {
88
93
  cluster: "hvacThermostat",
@@ -372,8 +377,8 @@ const tzLocal = {
372
377
  thermostat_schedule_mode: {
373
378
  key: ["schedule_mode"],
374
379
  convertSet: async (entity, key, value, meta) => {
375
- utils.assertNumber(value);
376
- const lookup = { Off: 0, "5+2": 1, "6+1": 2, "7": 3 };
380
+ //utils.assertNumber(value);
381
+ const lookup = { off: 0, "5+2": 1, "6+1": 2, "7": 3 };
377
382
  await entity.write("hvacThermostat", { [attrThermScheduleMode]: { value: utils.getFromLookup(value, lookup), type: 0x30 } });
378
383
  return { state: { schedule_mode: value } };
379
384
  },
@@ -942,6 +947,84 @@ function waterPreset() {
942
947
  ];
943
948
  return { toZigbee, exposes, isModernExtend: true };
944
949
  }
950
+ const air_extend = {
951
+ led_brightness: () => {
952
+ const exposes = [e.numeric("brightness", ea.ALL).withValueMin(0).withValueMax(255).withDescription("LED brightness")];
953
+ const toZigbee = [
954
+ {
955
+ key: ["brightness"],
956
+ convertSet: async (entity, key, value, meta) => {
957
+ await entity.command("genLevelCtrl", "moveToLevel", { level: value, transtime: 0 }, utils.getOptions(meta.mapped, entity));
958
+ return { state: { brightness: value } };
959
+ },
960
+ convertGet: async (entity, key, meta) => {
961
+ await entity.read("genLevelCtrl", ["currentLevel"]);
962
+ },
963
+ },
964
+ ];
965
+ const fromZigbee = [
966
+ {
967
+ cluster: "genLevelCtrl",
968
+ type: ["attributeReport", "readResponse"],
969
+ convert: (model, msg, publish, options, meta) => {
970
+ const result = {};
971
+ if (Object.hasOwn(msg.data, "currentLevel")) {
972
+ const data = Number.parseInt(msg.data.currentLevel, 10);
973
+ result.brightness = data;
974
+ }
975
+ return result;
976
+ },
977
+ },
978
+ ];
979
+ return {
980
+ exposes,
981
+ fromZigbee,
982
+ toZigbee,
983
+ isModernExtend: true,
984
+ };
985
+ },
986
+ features_sensors: () => {
987
+ const exposes = [
988
+ e.composite("features_sensors", "features_sensors", ea.SET).withFeature(e.enum("features", ea.STATE_SET, switchFeatures)),
989
+ ];
990
+ const toZigbee = [
991
+ {
992
+ key: ["features_sensors"],
993
+ convertSet: async (entity, key, rawValue, meta) => {
994
+ const endpoint = meta.device.getEndpoint(1);
995
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
996
+ const value = rawValue.features;
997
+ if (value != null) {
998
+ const lookup = {
999
+ nothing: 0,
1000
+ co2_forced_calibration: 1,
1001
+ co2_factory_reset: 2,
1002
+ bind_reset: 3,
1003
+ };
1004
+ const value_lookup = utils.getFromLookup(value, lookup);
1005
+ //logger.logger.info("value_lookup: " + value_lookup);
1006
+ if (value_lookup >= 1 && value_lookup <= 3) {
1007
+ await endpoint.write("hvacUserInterfaceCfg", { [attrFeaturesSensors]: { value: value_lookup, type: 0x30 } });
1008
+ return {
1009
+ state: { [key]: value },
1010
+ };
1011
+ }
1012
+ }
1013
+ },
1014
+ convertGet: async (entity, key, meta) => {
1015
+ await entity.read("hvacUserInterfaceCfg", [attrFeaturesSensors]);
1016
+ },
1017
+ },
1018
+ ];
1019
+ const fromZigbee = [];
1020
+ return {
1021
+ exposes,
1022
+ fromZigbee,
1023
+ toZigbee,
1024
+ isModernExtend: true,
1025
+ };
1026
+ },
1027
+ };
945
1028
  exports.definitions = [
946
1029
  {
947
1030
  zigbeeModel: ["Tuya_CO2Sensor_r01"],
@@ -1933,5 +2016,169 @@ exports.definitions = [
1933
2016
  meta: {},
1934
2017
  ota: true,
1935
2018
  },
2019
+ {
2020
+ zigbeeModel: ["AirQ_Monitor_S01"],
2021
+ model: "AirQ_Monitor_S01",
2022
+ vendor: "Slacky-DIY",
2023
+ description: "Air quality monitor",
2024
+ configure: async (device, coordinatorEndpoint, logger) => {
2025
+ const endpoint = device.getEndpoint(1);
2026
+ await endpoint.read("genLevelCtrl", ["currentLevel"]);
2027
+ },
2028
+ extend: [
2029
+ m.co2({ reporting: { min: 10, max: 3600, change: 0.00001 } }),
2030
+ m.numeric({
2031
+ name: "voc_index",
2032
+ access: "STATE_GET",
2033
+ cluster: "genAnalogInput",
2034
+ attribute: "presentValue",
2035
+ reporting: { min: 10, max: 3600, change: 30 },
2036
+ unit: "VOC Index points",
2037
+ description: "VOC index",
2038
+ }),
2039
+ m.temperature(),
2040
+ m.humidity(),
2041
+ m.pressure(),
2042
+ m.illuminance(),
2043
+ m.enumLookup({
2044
+ name: "display_rotate",
2045
+ lookup: { horizontal: 0, vertical: 1 },
2046
+ cluster: "hvacUserInterfaceCfg",
2047
+ attribute: { ID: attrDisplayRotate, type: 0x30 },
2048
+ reporting: { min: 0, max: 65000, change: 0 },
2049
+ description: "Display orientation (horizontal/vertical)",
2050
+ }),
2051
+ m.enumLookup({
2052
+ name: "display_inversion",
2053
+ lookup: { black_on_white: 0, white_on_black: 1 },
2054
+ cluster: "hvacUserInterfaceCfg",
2055
+ attribute: { ID: attrDisplayInversion, type: 0x30 },
2056
+ reporting: { min: 0, max: 65000, change: 0 },
2057
+ description: "Display inversion (black on white/white on black)",
2058
+ }),
2059
+ m.enumLookup({
2060
+ name: "temperature_display_mode",
2061
+ lookup: { celsius: 0, fahrenheit: 1 },
2062
+ cluster: "hvacUserInterfaceCfg",
2063
+ attribute: "tempDisplayMode",
2064
+ reporting: { min: 0, max: 65000, change: 0 },
2065
+ description: "The units of the temperature displayed on the device screen",
2066
+ }),
2067
+ m.numeric({
2068
+ name: "temperature_offset",
2069
+ cluster: "msTemperatureMeasurement",
2070
+ attribute: { ID: 0xf000, type: 0x29 },
2071
+ unit: "°C",
2072
+ valueMin: -5,
2073
+ valueMax: 5,
2074
+ valueStep: 0.1,
2075
+ scale: 100,
2076
+ description: "Offset to add/subtract to the inside temperature",
2077
+ }),
2078
+ m.numeric({
2079
+ name: "read_interval",
2080
+ cluster: "msTemperatureMeasurement",
2081
+ attribute: { ID: 0xf001, type: 0x21 },
2082
+ unit: "Sec",
2083
+ valueMin: 5,
2084
+ valueMax: 600,
2085
+ valueStep: 1,
2086
+ description: "Sensors reading period",
2087
+ }),
2088
+ m.binary({
2089
+ name: "enabling_co2_control",
2090
+ cluster: "msCO2",
2091
+ attribute: { ID: 0xf002, type: 0x10 },
2092
+ description: "Enables/disables CO2 control",
2093
+ valueOn: ["ON", 0x01],
2094
+ valueOff: ["OFF", 0x00],
2095
+ }),
2096
+ m.numeric({
2097
+ name: "low_co2",
2098
+ cluster: "msCO2",
2099
+ attribute: { ID: 0xf003, type: 0x21 },
2100
+ unit: "ppm",
2101
+ valueMin: 400,
2102
+ valueMax: 2000,
2103
+ valueStep: 1,
2104
+ description: "CO2 low turn-off limit",
2105
+ }),
2106
+ m.numeric({
2107
+ name: "high_co2",
2108
+ cluster: "msCO2",
2109
+ attribute: { ID: 0xf004, type: 0x21 },
2110
+ unit: "ppm",
2111
+ valueMin: 400,
2112
+ valueMax: 2000,
2113
+ valueStep: 1,
2114
+ description: "CO2 high turn-on limit",
2115
+ }),
2116
+ m.binary({
2117
+ name: "enabling_voc_control",
2118
+ cluster: "genAnalogInput",
2119
+ attribute: { ID: 0xf005, type: 0x10 },
2120
+ description: "Enables/disables VOC control",
2121
+ valueOn: ["ON", 0x01],
2122
+ valueOff: ["OFF", 0x00],
2123
+ }),
2124
+ m.numeric({
2125
+ name: "low_voc",
2126
+ cluster: "genAnalogInput",
2127
+ attribute: { ID: 0xf006, type: 0x21 },
2128
+ unit: "VOC index points",
2129
+ valueMin: 1,
2130
+ valueMax: 500,
2131
+ valueStep: 1,
2132
+ description: "VOC low turn-off limit",
2133
+ }),
2134
+ m.numeric({
2135
+ name: "high_voc",
2136
+ cluster: "genAnalogInput",
2137
+ attribute: { ID: 0xf007, type: 0x21 },
2138
+ unit: "VOC index points",
2139
+ valueMin: 1,
2140
+ valueMax: 500,
2141
+ valueStep: 1,
2142
+ description: "VOC high turn-on limit",
2143
+ }),
2144
+ m.enumLookup({
2145
+ name: "switch_actions",
2146
+ lookup: { off: 0, on: 1 },
2147
+ cluster: "genOnOffSwitchCfg",
2148
+ attribute: "switchActions",
2149
+ description: "Actions switch",
2150
+ }),
2151
+ air_extend.led_brightness(),
2152
+ m.binary({
2153
+ name: "enabling_sound",
2154
+ cluster: "hvacUserInterfaceCfg",
2155
+ attribute: { ID: 0xf00c, type: 0x10 },
2156
+ description: "Enables/disables sound",
2157
+ valueOn: ["ON", 0x01],
2158
+ valueOff: ["OFF", 0x00],
2159
+ }),
2160
+ m.numeric({
2161
+ name: "frc_co2_correction",
2162
+ access: "STATE_GET",
2163
+ cluster: "msCO2",
2164
+ attribute: { ID: attrCo2Calibration, type: 0x29 },
2165
+ reporting: { min: 0, max: 3600, change: 0 },
2166
+ unit: "ppm",
2167
+ description: "FRC CO2 correction",
2168
+ }),
2169
+ air_extend.features_sensors(),
2170
+ m.numeric({
2171
+ name: "life_time",
2172
+ access: "STATE_GET",
2173
+ cluster: "genTime",
2174
+ attribute: "time",
2175
+ reporting: { min: 60, max: 3600, change: 0 },
2176
+ unit: "h",
2177
+ description: "Life time of device",
2178
+ }),
2179
+ ],
2180
+ meta: {},
2181
+ ota: true,
2182
+ },
1936
2183
  ];
1937
2184
  //# sourceMappingURL=slacky_diy.js.map