From 7f75d10df15cbc2fcdeea2a9107d6199b5d298e4 Mon Sep 17 00:00:00 2001
From: Beta-User <>
Date: Tue, 25 Jan 2022 17:58:29 +0000
Subject: [PATCH] mqtt2.template: add first version of tasmota_NSPanel_split
git-svn-id: https://svn.fhem.de/fhem/trunk@25559 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/lib/AttrTemplate/mqtt2.template | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
index 4669c6f2d..df93d101d 100644
--- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template
+++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
@@ -1413,6 +1413,33 @@ option:{ CALLSPEECHRECOGN }
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_switch
+# sonoff NSPanel flashed with Tasmota.
+name:tasmota_NSPanel_split
+filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*(tele|cmnd|stat).*
+desc:Early version for Sonoff NSPanel (2 channel) device flashed with Tasmota.
NOTE: a second device will be created for the second channel.
See Forum Thread and Tasmota Template Repository
+order:A_02a7
+par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
+par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
+set DEVICE attrTemplate tasmota_2channel_split CALLSPEECHRECOGN=1 SETCHANNELINFO=1
+attr DEVICE icon tradfri_filled_floalt
+attr DEVICE setList \
+ off:noArg CMNDTOPIC/POWER1 0\
+ on:noArg CMNDTOPIC/POWER1 1\
+ toggle:noArg CMNDTOPIC/POWER1 2\
+ setOtaUrl:textField CMNDTOPIC/OtaUrl $EVTPART1\
+ upgrade:noArg CMNDTOPIC/upgrade 1\
+ x_NSPSend_json:textField { my $payload = $EVENT;$payload =~ s/$EVTPART0 //g; qq(CMNDTOPIC/NSPSend $payload)}\
+ x_NSPSend_delete:selectnumbers,1,1,8,0,lin CMNDTOPIC/NSPSend {"index":$EVTPART1, "type":"delete"}
+attr DEVICE stateFormat \
+LWT\
+\
+state
+attr DEVICE devStateIcon Online:10px-kreis-gruen Offline:10px-kreis-rot
+attr DEVICE,DEVICE_CH2 webCmd :
+attr DEVICE,DEVICE_CH2 model tasmota_NSPanel_split
+setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20220125
+
+
#contributed by 87insane
# tasmota 2ch as shutter device.
name:tasmota_2ch_shutter_invert_1