Advertisement
mwav3

3157100.js

May 8th, 2022
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. const exposes = require('zigbee-herdsman-converters/lib/exposes');
  2. const fz = {...require('zigbee-herdsman-converters/converters/fromZigbee'), legacy: require('zigbee-herdsman-converters/lib/legacy').fromZigbee};
  3. const tz = require('zigbee-herdsman-converters/converters/toZigbee');
  4. const globalStore = require('zigbee-herdsman-converters/lib/store');
  5. const reporting = require('zigbee-herdsman-converters/lib/reporting');
  6. const extend = require('zigbee-herdsman-converters/lib/extend');
  7. const e = exposes.presets;
  8. const ea = exposes.access;
  9. const constants = require('zigbee-herdsman-converters/lib/constants');
  10.  
  11. const definition = {
  12. zigbeeModel: ['3157100'],
  13. model: '3157100',
  14. vendor: 'Centralite',
  15. description: '3-Series pearl touch thermostat,',
  16. fromZigbee: [fz.battery, fz.thermostat, fz.fan, fz.ignore_time_read],
  17. toZigbee: [tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration,
  18. tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
  19. tz.thermostat_setpoint_raise_lower, tz.thermostat_remote_sensing,
  20. tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
  21. tz.thermostat_relay_status_log, tz.fan_mode, tz.thermostat_running_state, tz.thermostat_temperature_setpoint_hold],
  22. exposes: [e.battery(),
  23. exposes.binary('temperature_setpoint_hold', ea.ALL, true, false)
  24. .withDescription('Prevent changes. `false` = run normally. `true` = prevent from making changes.'),
  25. exposes.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 1).withLocalTemperature()
  26. .withSystemMode(['off', 'heat', 'cool', 'emergency_heating'])
  27. .withRunningState(['idle', 'heat', 'cool', 'fan_only']).withFanMode(['auto', 'on'])
  28. .withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
  29. .withLocalTemperatureCalibration(-30, 30, 0.1)],
  30. meta: {battery: {voltageToPercentage: '3V_1500_2800'}},
  31. configure: async (device, coordinatorEndpoint, logger) => {
  32. const endpoint = device.getEndpoint(1);
  33. await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat', 'hvacFanCtrl']);
  34. await reporting.batteryVoltage(endpoint);
  35. await reporting.thermostatRunningState(endpoint);
  36. await reporting.thermostatTemperature(endpoint);
  37. await reporting.fanMode(endpoint);
  38. await reporting.thermostatTemperatureSetpointHold(endpoint);
  39. },
  40. };
  41.  
  42. module.exports = definition;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement