Skip to content

Commit

Permalink
feat(add): SNZB-06P, TRVZB (#6144)
Browse files Browse the repository at this point in the history
* add sonoff new device SNZB-06P Zigbee occupancy sensor and TRVZB zigbee thermostat

* Update sonoff.ts

* Update sonoff.ts

* Update sonoff.ts

* Update sonoff.ts

---------

Co-authored-by: liangjia <“jia.liang@itead.cc”>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
3 people authored Sep 6, 2023
1 parent 69c8ed1 commit 939884c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/devices/sonoff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,38 @@ const definitions: Definition[] = [
await reporting.batteryPercentageRemaining(endpoint, {min: 3600, max: 7200});
},
},
{
zigbeeModel: ['SNZB-06P'],
model: 'SNZB-06P',
vendor: 'SONOFF',
description: 'Zigbee occupancy sensor',
fromZigbee: [fz.occupancy],
toZigbee: [],
exposes: [e.occupancy()],
},
{
zigbeeModel: ['TRVZB'],
model: 'TRVZB',
vendor: 'SONOFF',
description: 'Zigbee thermostat',
exposes: [
e.climate()
.withSetpoint('occupied_heating_setpoint', 4, 35, 0.5)
.withLocalTemperature()
.withSystemMode(['off', 'auto', 'heat'], ea.ALL, 'Mode of the thermostat')
.withRunningState(['idle', 'heat'], ea.STATE_GET)],
fromZigbee: [fz.thermostat],
toZigbee: [
tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration, tz.thermostat_occupied_heating_setpoint,
tz.thermostat_system_mode, tz.thermostat_running_state],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['hvacThermostat']);
await reporting.thermostatTemperature(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.thermostatSystemMode(endpoint);
},
},
];

module.exports = definitions;

0 comments on commit 939884c

Please sign in to comment.