From 91d479850bc8901072fd23cd46686153d08c6f86 Mon Sep 17 00:00:00 2001 From: mhosse <31696408+mhosse@users.noreply.github.com> Date: Sat, 30 Nov 2024 13:39:34 +0100 Subject: [PATCH] feat(add): Push_ME (#8399) Co-authored-by: Michael Hosse Co-authored-by: Koen Kanters --- src/devices/cleverio.ts | 11 ----------- src/devices/tuya.ts | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/devices/cleverio.ts b/src/devices/cleverio.ts index 07d88085e9898..02b074c0f55ee 100644 --- a/src/devices/cleverio.ts +++ b/src/devices/cleverio.ts @@ -2,7 +2,6 @@ import fz from '../converters/fromZigbee'; import tz from '../converters/toZigbee'; import * as exposes from '../lib/exposes'; import * as reporting from '../lib/reporting'; -import * as tuya from '../lib/tuya'; import {DefinitionWithExtend} from '../lib/types'; const e = exposes.presets; @@ -28,16 +27,6 @@ const definitions: DefinitionWithExtend[] = [ await reporting.bind(endpoint, coordinatorEndpoint, bindClusters); }, }, - { - fingerprint: [{modelID: 'TS0041A', manufacturerName: '_TYZB01_4qw4rl1u'}], - model: 'SB100', - vendor: 'Cleverio', - description: 'Wireless switch with 1 button', - exposes: [e.battery(), e.action(['single', 'double', 'hold'])], - fromZigbee: [tuya.fz.on_off_action, fz.battery], - toZigbee: [], - configure: tuya.configureMagicPacket, - }, { fingerprint: [{modelID: 'SM0201', manufacturerName: '_TYZB01_lzrhtcxu'}], model: 'SS300', diff --git a/src/devices/tuya.ts b/src/devices/tuya.ts index 7552dc7259eb6..ce8722c258d29 100644 --- a/src/devices/tuya.ts +++ b/src/devices/tuya.ts @@ -3236,6 +3236,26 @@ const definitions: DefinitionWithExtend[] = [ * Initially wrapped in a try catch: https://github.com/Koenkk/zigbee2mqtt/issues/6313 */ }, + { + zigbeeModel: ['TS0041A'], + model: 'TS0041A', + vendor: 'Tuya', + description: 'Wireless switch with 1 button', + whiteLabel: [ + tuya.whitelabel('Cleverio', 'SB100', 'Wireless switch with 1 button', ['_TYZB01_4qw4rl1u']), + tuya.whitelabel('Marmitek', 'Push_ME', 'Wireless switch with 1 button', ['_TYZB01_1xktopx6']), + ], + exposes: [e.battery(), e.battery_voltage(), e.action(['single', 'double', 'hold'])], + fromZigbee: [tuya.fz.on_off_action, fz.battery], + toZigbee: [], + configure: tuya.configureMagicPacket, + /* + * reporting.batteryPercentageRemaining removed as it was causing devices to fall of the network + * every 1 hour, with light flashing when it happened, extremely short battery life, 2 presses for + * action to register: https://github.com/Koenkk/zigbee2mqtt/issues/8072 + * Initially wrapped in a try catch: https://github.com/Koenkk/zigbee2mqtt/issues/6313 + */ + }, { zigbeeModel: ['TS0042'], model: 'TS0042',