Skip to content

Commit

Permalink
Remove IKEA OTA
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesonuk committed Nov 2, 2024
1 parent f54114a commit bbc911d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 93 deletions.
53 changes: 26 additions & 27 deletions src/devices/ikea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
legacy as ikeaLegacy,
ikeaLight,
ikeaMediaCommands,
ikeaOta,
ikeaVoc,
styrbarCommandOn,
tradfriCommandsLevelCtrl,
Expand Down Expand Up @@ -569,14 +568,14 @@ const definitions: DefinitionWithExtend[] = [
model: 'E1603/E1702/E1708',
vendor: 'IKEA',
description: 'TRADFRI control outlet',
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ota()],
},
{
zigbeeModel: ['ASKVADER on/off switch'],
model: 'E1836',
vendor: 'IKEA',
description: 'ASKVADER on/off switch',
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ota()],
},
{
zigbeeModel: ['KNYCKLAN receiver'],
Expand All @@ -588,22 +587,22 @@ const definitions: DefinitionWithExtend[] = [
onOff(),
iasZoneAlarm({zoneType: 'water_leak', zoneAttributes: ['alarm_1']}),
identify(),
ikeaOta(),
ota(),
],
},
{
zigbeeModel: ['TRETAKT Smart plug'],
model: 'E2204',
vendor: 'IKEA',
description: 'TRETAKT smart plug',
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ota()],
},
{
zigbeeModel: ['INSPELNING Smart plug'],
model: 'E2206',
vendor: 'IKEA',
description: 'INSPELNING smart plug',
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ikeaOta(), electricityMeter()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), onOff(), identify(), ota(), electricityMeter()],
configure: async (device) => {
const endpoint = device.getEndpoint(1);
// Enable reporting of powerDivisor, needs to change dynamically with the amount of power
Expand All @@ -626,7 +625,7 @@ const definitions: DefinitionWithExtend[] = [
windowCovering({controls: ['lift']}),
identify(),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -640,7 +639,7 @@ const definitions: DefinitionWithExtend[] = [
windowCovering({controls: ['lift']}),
identify(),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -654,7 +653,7 @@ const definitions: DefinitionWithExtend[] = [
windowCovering({controls: ['lift']}),
identify(),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -668,7 +667,7 @@ const definitions: DefinitionWithExtend[] = [
windowCovering({controls: ['lift']}),
identify(),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
// #endregion blinds
Expand All @@ -681,14 +680,14 @@ const definitions: DefinitionWithExtend[] = [
whiteLabel: [
{vendor: 'IKEA', model: 'E2006', description: 'STARKVIND air purifier table', fingerprint: [{modelID: 'STARKVIND Air purifier table'}]},
],
extend: [addCustomClusterManuSpecificIkeaUnknown(), addCustomClusterManuSpecificIkeaAirPurifier(), ikeaAirPurifier(), identify(), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), addCustomClusterManuSpecificIkeaAirPurifier(), ikeaAirPurifier(), identify(), ota()],
},
{
zigbeeModel: ['TRADFRI signal repeater'],
model: 'E1746',
vendor: 'IKEA',
description: 'TRADFRI signal repeater',
extend: [addCustomClusterManuSpecificIkeaUnknown(), identify(), linkQuality({reporting: true}), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), identify(), linkQuality({reporting: true}), ota()],
},
// #endregion appliances
// #region remotes
Expand All @@ -705,7 +704,7 @@ const definitions: DefinitionWithExtend[] = [
legacyAction: true,
}),
battery({dontDividePercentage: true}),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -721,7 +720,7 @@ const definitions: DefinitionWithExtend[] = [
tradfriCommandsLevelCtrl(),
ikeaArrowClick(),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -738,7 +737,7 @@ const definitions: DefinitionWithExtend[] = [
commandsLevelCtrl({commands: ['brightness_move_up', 'brightness_move_down', 'brightness_stop'], bind: false}),
ikeaArrowClick({styrbar: true, bind: false}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -760,7 +759,7 @@ const definitions: DefinitionWithExtend[] = [
commandsOnOff({commands: ['on', 'off'], legacyAction: true}),
commandsLevelCtrl({commands: ['brightness_move_up', 'brightness_move_down', 'brightness_stop']}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -775,7 +774,7 @@ const definitions: DefinitionWithExtend[] = [
identify({isSleepy: true}),
commandsOnOff({commands: ['on', 'off']}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -790,7 +789,7 @@ const definitions: DefinitionWithExtend[] = [
commandsOnOff({commands: ['on', 'off']}),
commandsLevelCtrl({commands: ['brightness_move_up', 'brightness_stop']}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -811,15 +810,15 @@ const definitions: DefinitionWithExtend[] = [
legacyAction: true,
}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
zigbeeModel: ['TRADFRI open/close remote'],
model: 'E1766',
vendor: 'IKEA',
description: 'TRADFRI open/close remote',
extend: [ikeaConfigureRemote(), identify({isSleepy: true}), commandsWindowCovering({legacyAction: true}), ikeaBattery(), ikeaOta()],
extend: [ikeaConfigureRemote(), identify({isSleepy: true}), commandsWindowCovering({legacyAction: true}), ikeaBattery(), ota()],
},
{
zigbeeModel: ['SYMFONISK sound remote gen2'],
Expand All @@ -838,7 +837,7 @@ const definitions: DefinitionWithExtend[] = [
ikeaMediaCommands(),
ikeaDotsClick({endpointNames: ['1', '2'], dotsPrefix: true}),
battery({voltage: true}),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -853,7 +852,7 @@ const definitions: DefinitionWithExtend[] = [
commandsOnOff({commands: ['on', 'off']}),
commandsLevelCtrl({commands: ['brightness_move_up', 'brightness_move_down', 'brightness_stop']}),
battery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -868,7 +867,7 @@ const definitions: DefinitionWithExtend[] = [
identify({isSleepy: true}),
ikeaDotsClick({endpointNames: ['1', '2']}),
battery(),
ikeaOta(),
ota(),
],
},
// #endregion remotes
Expand All @@ -884,7 +883,7 @@ const definitions: DefinitionWithExtend[] = [
tradfriRequestedBrightness(),
identify({isSleepy: true}),
ikeaBattery(),
ikeaOta(),
ota(),
],
},
{
Expand Down Expand Up @@ -916,7 +915,7 @@ const definitions: DefinitionWithExtend[] = [
model: 'E2134',
vendor: 'IKEA',
description: 'VALLHORN wireless motion sensor',
extend: [addCustomClusterManuSpecificIkeaUnknown(), occupancy(), illuminance(), identify({isSleepy: true}), battery(), ikeaOta()],
extend: [addCustomClusterManuSpecificIkeaUnknown(), occupancy(), illuminance(), identify({isSleepy: true}), battery(), ota()],
},
{
zigbeeModel: ['PARASOLL Door/Window Sensor'],
Expand All @@ -935,7 +934,7 @@ const definitions: DefinitionWithExtend[] = [
}),
identify({isSleepy: true}),
battery(),
ikeaOta(),
ota(),
],
},
{
Expand All @@ -954,7 +953,7 @@ const definitions: DefinitionWithExtend[] = [
}),
identify({isSleepy: true}),
battery(),
ikeaOta(),
ota(),
],
},
// #endregion sensors
Expand Down
7 changes: 0 additions & 7 deletions src/lib/ikea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ import {
light as lightDontUse,
numeric,
NumericArgs,
ota,
ReportingConfigWithoutAttribute,
setupConfigureForBinding,
setupConfigureForReporting,
TIME_LOOKUP,
} from '../lib/modernExtend';
import {tradfri as ikea} from '../lib/ota';
import * as reporting from '../lib/reporting';
import * as globalStore from '../lib/store';
import {Configure, Expose, Fz, KeyValue, KeyValueAny, ModernExtend, OnEvent, Range, Tz} from '../lib/types';
Expand Down Expand Up @@ -94,7 +92,6 @@ export function ikeaLight(args?: Omit<LightArgs, 'colorTemp'> & {colorTemp?: tru
? args.levelConfig
: {disabledFeatures: ['on_off_transition_time', 'on_transition_time', 'off_transition_time', 'on_level']};
const result = lightDontUse({...args, colorTemp, levelConfig});
result.ota = ikea;
result.onEvent = bulbOnEvent;
if (isObject(args?.colorTemp) && args.colorTemp.viaColor) {
result.toZigbee = replaceInArray(result.toZigbee, [tz.light_color_colortemp], [tz.light_color_and_colortemp_via_color]);
Expand All @@ -120,10 +117,6 @@ export function ikeaLight(args?: Omit<LightArgs, 'colorTemp'> & {colorTemp?: tru
return result;
}

export function ikeaOta(): ModernExtend {
return ota(ikea);
}

export function ikeaBattery(): ModernExtend {
const exposes: Expose[] = [
presets
Expand Down
3 changes: 1 addition & 2 deletions src/lib/ota/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import * as jethome from './jethome';
import * as ledvance from './ledvance';
import * as salus from './salus';
import * as securifi from './securifi';
import * as tradfri from './tradfri';
import * as ubisys from './ubisys';
import * as zigbeeOTA from './zigbeeOTA';

const {setDataDir} = common;

export {inovelli, ledvance, salus, securifi, tradfri, ubisys, zigbeeOTA, jethome, gmmts, setDataDir};
export {inovelli, ledvance, salus, securifi, ubisys, zigbeeOTA, jethome, gmmts, setDataDir};

export type ImageInfo = Ota.ImageInfo;
57 changes: 0 additions & 57 deletions src/lib/ota/tradfri.ts

This file was deleted.

0 comments on commit bbc911d

Please sign in to comment.