zigbee-herdsman-converters 25.112.0 → 25.113.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/dist/lib/lumi.js CHANGED
@@ -32,10 +32,15 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
35
38
  Object.defineProperty(exports, "__esModule", { value: true });
36
39
  exports.toZigbee = exports.fromZigbee = exports.modernExtend = exports.lumiModernExtend = exports.manufacturerCode = exports.trv = exports.presence = exports.numericAttributes2Payload = exports.buffer2DataObject = void 0;
37
40
  exports.w100EnsureDefaults = w100EnsureDefaults;
41
+ const node_assert_1 = __importDefault(require("node:assert"));
38
42
  const node_buffer_1 = require("node:buffer");
43
+ const zcl_1 = require("zigbee-herdsman/dist/zspec/zcl");
39
44
  const fz = __importStar(require("../converters/fromZigbee"));
40
45
  const exposes = __importStar(require("./exposes"));
41
46
  const logger_1 = require("./logger");
@@ -2019,17 +2024,33 @@ exports.lumiModernExtend = {
2019
2024
  entityCategory: "config",
2020
2025
  ...args,
2021
2026
  }),
2022
- lumiCurtainReverse: (args) => modernExtend.binary({
2023
- name: "reverse_direction",
2024
- valueOn: [true, 1],
2025
- valueOff: [false, 0],
2026
- cluster: "closuresWindowCovering",
2027
- attribute: "windowCoveringMode",
2028
- description: "Whether the curtain direction is inverted",
2029
- access: "ALL",
2030
- entityCategory: "config",
2031
- ...args,
2032
- }),
2027
+ lumiCurtainReverse: (args) => {
2028
+ const { onEvent, configure } = modernExtend.deviceAddCustomCluster("hvacThermostat", {
2029
+ ID: 0x0201,
2030
+ attributes: {
2031
+ // Make windowCoveringMode writable
2032
+ // https://github.com/Koenkk/zigbee2mqtt/issues/30768
2033
+ windowCoveringMode: { ID: 0x0017, type: zcl_1.DataType.BITMAP8, required: true, default: 4, write: true, max: 0xffff },
2034
+ },
2035
+ commands: {},
2036
+ commandsResponse: {},
2037
+ });
2038
+ const result = modernExtend.binary({
2039
+ name: "reverse_direction",
2040
+ valueOn: [true, 1],
2041
+ valueOff: [false, 0],
2042
+ cluster: "closuresWindowCovering",
2043
+ attribute: "windowCoveringMode",
2044
+ description: "Whether the curtain direction is inverted",
2045
+ access: "ALL",
2046
+ entityCategory: "config",
2047
+ ...args,
2048
+ });
2049
+ result.configure.push(...configure);
2050
+ (0, node_assert_1.default)(result.onEvent === undefined);
2051
+ result.onEvent = onEvent;
2052
+ return result;
2053
+ },
2033
2054
  lumiCurtainStatus: (args) => modernExtend.enumLookup({
2034
2055
  name: "status",
2035
2056
  lookup: { closing: 0, opening: 1, stopped: 2, blocked: 3 },