zigbee-herdsman-converters
Version:
Collection of device converters to be used with zigbee-herdsman
63 lines (61 loc) • 3.4 kB
JavaScript
const exposes = require('../lib/exposes');
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const tz = require('../converters/toZigbee');
const reporting = require('../lib/reporting');
const extend = require('../lib/extend');
module.exports = [
{
zigbeeModel: ['DL15S'],
model: 'DL15S-1BZ',
vendor: 'Leviton',
description: 'Lumina RF 15A switch, 120/277V',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['DG6HD'],
model: 'DG6HD-1BW',
vendor: 'Leviton',
description: 'Zigbee in-wall smart dimmer',
extend: extend.light_onoff_brightness({disableEffect: true, noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['65A01-1'],
model: 'RC-2000WH',
vendor: 'Leviton',
description: 'Omnistat2 wireless thermostat',
fromZigbee: [fz.legacy.thermostat_att_report, fz.fan],
toZigbee: [tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration, tz.thermostat_occupancy,
tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_unoccupied_cooling_setpoint, tz.thermostat_setpoint_raise_lower, tz.thermostat_remote_sensing,
tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode, tz.thermostat_weekly_schedule,
tz.thermostat_clear_weekly_schedule, tz.thermostat_relay_status_log, tz.thermostat_running_state,
tz.thermostat_temperature_setpoint_hold, tz.thermostat_temperature_setpoint_hold_duration, tz.fan_mode],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(9);
await reporting.bind(endpoint, coordinatorEndpoint, ['hvacThermostat', 'hvacFanCtrl']);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatSystemMode(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
await reporting.thermostatOccupiedCoolingSetpoint(endpoint);
await reporting.thermostatUnoccupiedCoolingSetpoint(endpoint);
await reporting.fanMode(endpoint);
},
exposes: [
exposes.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 1).withLocalTemperature()
.withSystemMode(['off', 'auto', 'heat', 'cool']).withRunningState(['idle', 'heat', 'cool'])
.withFanMode(['auto', 'on', 'smart']).withSetpoint('occupied_cooling_setpoint', 10, 30, 1)
.withLocalTemperatureCalibration().withPiHeatingDemand()],
},
];