Skip to content

Commit

Permalink
feat: Support fan mode, keypad lockout and OTA and remove pi heating …
Browse files Browse the repository at this point in the history
…demand for Zen Zen-01-W (#6078)
  • Loading branch information
Codel1417 authored Aug 17, 2023
1 parent 0ecd6eb commit 520128a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/devices/zen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import fz from '../converters/fromZigbee';
import * as legacy from '../lib/legacy';
import tz from '../converters/toZigbee';
import * as reporting from '../lib/reporting';
import * as ota from '../lib/ota';
const e = exposes.presets;

const definitions: Definition[] = [
Expand All @@ -17,21 +18,24 @@ const definitions: Definition[] = [
tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint, tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_setpoint_raise_lower, tz.thermostat_running_state,
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_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_relay_status_log,
tz.thermostat_keypad_lockout, tz.fan_mode],
ota: ota.zigbeeOTA,
exposes: [e.climate().withSetpoint('occupied_heating_setpoint', 10, 30, 0.5)
.withSetpoint('occupied_cooling_setpoint', 10, 31, 0.5).withLocalTemperature()
.withSystemMode(['off', 'auto', 'heat', 'cool']).withRunningState(['idle', 'heat', 'cool'])
.withLocalTemperatureCalibration().withPiHeatingDemand()],
.withLocalTemperatureCalibration().withFanMode(['auto', 'on'])],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(3) || device.getEndpoint(1);
const binds = ['genBasic', 'genIdentify', 'genPowerCfg', 'genTime', 'hvacThermostat', 'hvacUserInterfaceCfg'];
const binds = ['genBasic', 'genIdentify', 'genPowerCfg', 'genTime', 'hvacThermostat', 'hvacUserInterfaceCfg', 'hvacFanCtrl'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);

await reporting.thermostatSystemMode(endpoint);
await reporting.batteryVoltage(endpoint);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatRunningState(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.fanMode(endpoint);
},
},
];
Expand Down

0 comments on commit 520128a

Please sign in to comment.