Skip to content

Commit

Permalink
Remove VZM30-SN from this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rohankapoorcom committed Nov 29, 2024
1 parent 44b0a9a commit 640632d
Showing 1 changed file with 1 addition and 54 deletions.
55 changes: 1 addition & 54 deletions src/devices/inovelli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Zcl} from 'zigbee-herdsman';
import fz from '../converters/fromZigbee';
import tz from '../converters/toZigbee';
import * as exposes from '../lib/exposes';
import {deviceAddCustomCluster, deviceEndpoints, electricityMeter, humidity, identify, temperature} from '../lib/modernExtend';
import {deviceAddCustomCluster, deviceEndpoints, electricityMeter, identify} from '../lib/modernExtend';
import * as ota from '../lib/ota';
import * as reporting from '../lib/reporting';
import * as globalStore from '../lib/store';
Expand Down Expand Up @@ -1244,16 +1244,6 @@ const VZM36_ATTRIBUTES: {[s: string]: Attribute} = {
},
};

const VZM30_ATTRIBUTES: {[s: string]: Attribute} = {
...COMMON_ATTRIBUTES,
...COMMON_DIMMER_ON_OFF_ATTRIBUTES,
switchType: {
...COMMON_ATTRIBUTES.switchType,
values: {'Single Pole': 0, 'Aux Switch': 1},
max: 1,
},
};

const tzLocal = {
inovelli_parameters: (ATTRIBUTES: {[s: string]: Attribute}) =>
({
Expand Down Expand Up @@ -1943,13 +1933,10 @@ const exposesListVZM35: Expose[] = [e.fan().withModes(Object.keys(fanModes)), ex

const exposesListVZM36: Expose[] = [e.light_brightness(), e.fan().withModes(Object.keys(fanModes)), exposeBreezeMode()];

const exposesListVZM30: Expose[] = [e.light_brightness(), exposeLedEffects(), exposeIndividualLedEffects()];

// Populate exposes list from the attributes description
attributesToExposeList(VZM31_ATTRIBUTES, exposesListVZM31);
attributesToExposeList(VZM35_ATTRIBUTES, exposesListVZM35);
attributesToExposeList(VZM36_ATTRIBUTES, exposesListVZM36);
attributesToExposeList(VZM30_ATTRIBUTES, exposesListVZM30);

// Put actions at the bottom of ui
const buttonTapSequences = [
Expand Down Expand Up @@ -1980,8 +1967,6 @@ exposesListVZM31.push(e.action(buttonTapSequences));

exposesListVZM35.push(e.action(buttonTapSequences));

exposesListVZM30.push(e.action(buttonTapSequences));

const definitions: DefinitionWithExtend[] = [
{
zigbeeModel: ['VZM31-SN'],
Expand Down Expand Up @@ -2080,44 +2065,6 @@ const definitions: DefinitionWithExtend[] = [
await reporting.onOff(endpoint2);
},
},
{
zigbeeModel: ['VZM30-SN'],
model: 'VZM30-SN',
vendor: 'Inovelli',
description: 'On/off switch',
exposes: exposesListVZM30.concat(identify().exposes as Expose[]),
extend: [
deviceEndpoints({
endpoints: {'1': 1, '2': 2, '3': 3, '4': 4},
multiEndpointSkip: ['state', 'voltage', 'power', 'current', 'energy', 'brightness', 'temperature', 'humidity'],
}),
inovelliExtend.addCustomClusterInovelli(),
temperature(),
humidity(),
electricityMeter(),
],
toZigbee: [
tzLocal.light_onoff_brightness_inovelli,
tz.power_on_behavior,
tz.ignore_transition,
tz.identify,
tzLocal.inovelli_led_effect,
tzLocal.inovelli_individual_led_effect,
tzLocal.inovelli_parameters(VZM30_ATTRIBUTES),
tzLocal.inovelli_parameters_readOnly(VZM30_ATTRIBUTES),
],
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.power_on_behavior, fz.ignore_basic_report, fzLocal.inovelli(VZM30_ATTRIBUTES)],
ota: ota.inovelli,
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);

// Bind for Button Event Reporting
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint2, coordinatorEndpoint, ['manuSpecificInovelli']);
},
},
];

export default definitions;
Expand Down

0 comments on commit 640632d

Please sign in to comment.