diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
index 53a06603f..3fa512eec 100644
--- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template
+++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template
@@ -1145,11 +1145,12 @@ par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingL
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
-par:BCKLGCMND;Command to be issued for configuration via backlog;{q(LedState 2; SetOption80 1; Interlock 1,2; Interlock ON; SetOption81 1; switchmode1 3; switchmode2 3; PulseTime1 0; PulseTime2 0; SaveData 1;)}
+par:BCKLGCMND;Command to be issued for configuration via backlog;{q(LedState 2; SetOption80 1; Interlock 1,2; Interlock ON; SetOption81 1; switchmode1 3; switchmode2 3; PulseTime1 0; PulseTime2 0; ShutterOpenDuration1 20; ShutterCloseDuration1 20; ShutterInvert1 1;SaveData 1;)}
+par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") }
set DEVICE attrTemplate tasmota_set_lowercase_texts_and_state1
+attr DEVICE icon ICON
set IO_DEV publish CMNDTOPIC/Backlog BCKLGCMND
set IO_DEV publish CMNDTOPIC/Restart 1
-defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog ShutterOpenDuration1 20;; ShutterCloseDuration1 20;; ShutterInvert1 1;; SaveData 1;;
attr DEVICE setList \
close:noArg CMNDTOPIC/ShutterClose1\
open:noArg CMNDTOPIC/ShutterOpen1\
@@ -1175,6 +1176,7 @@ attr DEVICE readingList \
attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_100 0:fts_shutter_10 9\d.*:fts_shutter_90 8\d.*:fts_shutter_80 7\d.*:fts_shutter_70 6\d.*:fts_shutter_60 5\d.*:fts_shutter_50 4\d.*:fts_shutter_40 3\d.*:fts_shutter_30 2\d.*:fts_shutter_20 1\d.*:fts_shutter_10 \b\d\b.*:fts_shutter_10 set_.*:fts_shutter_updown
attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
attr DEVICE webCmd :open:close:half:stop:pct
+attr DEVICE eventMap open:opens close:closes
attr DEVICE stateFormat \
LWT\
\
@@ -1200,8 +1202,7 @@ desc:Configures a dual chanel tasmota device as shutter; needs some configuratio
order:A_02b1
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
-set DEVICE attrTemplate tasmota_2ch_shutter_invert_1
-defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog ShutterOpenDuration1 20;; ShutterCloseDuration1 20;; ShutterInvert1 0;; SaveData 1;;
+set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 BCKLGCMND="LedState 2; SetOption80 1; Interlock 1,2; Interlock ON; SetOption81 1; switchmode1 3; switchmode2 3; PulseTime1 0; PulseTime2 0; ShutterOpenDuration1 20; ShutterCloseDuration1 20; ShutterInvert1 0;SaveData 1;"
attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90
attr DEVICE model tasmota_2ch_shutter_invert_0
setreading DEVICE attrTemplateVersion 20201206
@@ -1216,13 +1217,7 @@ par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readi
par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}tele$3" : undef }
par:STATTOPIC;ack topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}stat$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
-par:ICON;ICON as set, defaults to fts_shutter_updown;{ AttrVal("DEVICE","icon","fts_shutter_updown") }
-set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 CALLSPEECHRECOGN=0 BCKLGCMND="SetOption26 1; SetOption80 1; SetOption81 1; ShutterRelay1 1; ShutterRelay2 3; PulseTime1 0; PulseTime2 0; PulseTime3 0; PulseTime4 0; SwitchMode1 3; SwitchMode2 3; SwitchMode3 3; SwitchMode4 3; Interlock 1,2 3,4; Interlock 1; SaveData 1; StateText1 off ; StateText2 on; StateText3 toggle; StateText4 hold;"
-defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog ShutterOpenDuration1 20;; ShutterCloseDuration1 20;; ShutterOpenDuration2 20;; ShutterCloseDuration2 20;; ShutterInvert1 0;; SaveData 1;;
-attr DEVICE icon ICON
-attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
-attr DEVICE setStateList open close half stop pct
-attr DEVICE webCmd :open:close:half:stop:pct
+set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 CALLSPEECHRECOGN=0 BCKLGCMND="SetOption26 1; SetOption80 1; SetOption81 1; ShutterRelay1 1; ShutterRelay2 3; PulseTime1 0; PulseTime2 0; PulseTime3 0; PulseTime4 0; SwitchMode1 3; SwitchMode2 3; SwitchMode3 3; SwitchMode4 3; Interlock 1,2 3,4; Interlock 1; StateText1 off ; StateText2 on; StateText3 toggle; StateText4 hold; ShutterOpenDuration1 20; ShutterCloseDuration1 20; ShutterOpenDuration2 20; ShutterCloseDuration2 20; ShutterInvert1 0; SaveData 1;"
set DEVICE attrTemplate set_associatedWith \CHANNELS=2 \MAKECOPIES=1
attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90
attr DEVICE_CH2 devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90
@@ -1245,7 +1240,7 @@ attr DEVICE_CH2 readingList \
attr DEVICE,DEVICE_CH2 model tasmota_4ch_two_shutters_invert_0
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20201206
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_blind
-
+
# sonoff 4 channel device flashed with Tasmota.
# contributed by Blauhorn, https://forum.fhem.de/index.php/topic,94495.msg976113.html#msg976113
@@ -1921,7 +1916,7 @@ order:A_01u03
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/[^/]+/SENSOR:, ? "${1}cmnd$3" : undef }
par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*/[^/]+/SENSOR)?:, ? "${1}tele$3" : undef }
par:DEV_ID;ZigBee short ID, hex value without leading 0x;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)/.*/([^/]+)/SENSOR?:, ? "$3" : undef }
-par:ICON;ICON as set, defaults to light_control;{ AttrVal("DEVICE","icon","light_control") }
+par:ICON;ICON as set, defaults to on;{ AttrVal("DEVICE","icon","on") }
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
attr DEVICE icon ICON
attr DEVICE readingList \
@@ -1934,10 +1929,42 @@ attr DEVICE jsonMap Power:state Device:0
deletereading -q DEVICE (?!associatedWith).*
option:{ CALLSPEECHRECOGN }
set DEVICE attrTemplate speechcontrol_type_switch
+option:global
attr DEVICE model tasmota_zigbee2tasmota_single_switch
setreading DEVICE attrTemplateVersion 20200806
+name:tasmota_zigbee2tasmota_2channel_split
+prereq:{my @devices=devspec2array("model=tasmota_zigbee2tasmota_bridge");;return 1 if $devices[0];;return 0}
+filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*tele.*/..../SENSOR:.*
+desc:zigbee 2 channel switch device like QS-Zigbee-S04-2C-L.
NOTE: Early testing version, not yet tested.
NOTE: a second device will be created for the second channel
+order:A_01u031
+par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/[^/]+/SENSOR:, ? "${1}cmnd$3" : undef }
+par:TELETOPIC;info topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*/[^/]+/SENSOR)?:, ? "${1}tele$3" : undef }
+par:DEV_ID;ZigBee short ID, hex value without leading 0x;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)/.*/([^/]+)/SENSOR?:, ? "$3" : undef }
+par:ICON;ICON as set, defaults to on;{ AttrVal("DEVICE","icon","on") }
+par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
+attr DEVICE icon ICON
+attr DEVICE setStateList on off
+attr DEVICE setExtensionsEvent 1
+attr DEVICE jsonMap Power:state Device:0 Endpoint:0
+deletereading -q DEVICE (?!associatedWith).*
+set DEVICE attrTemplate set_associatedWith \CHANNELS=2 \MAKECOPIES=1
+attr DEVICE readingList \
+ TELETOPIC:.* { return if $EVENT !~ m/.Endpoint..1/; $EVENT =~ s/"Power":1/"Power":"on"/g; $EVENT =~ s/"Power":0/"Power":"off"/g; $EVENT =~ m,^.*(..Device.+)..$, ? json2nameValue($1,'',$JSONMAP) : $EVENT =~ m,0xDEV_ID.:(.*).., ? json2nameValue($1,'',$JSONMAP) : undef }
+attr DEVICE setList on CMNDTOPIC/ZbSend {"device":"0xDEV_ID","Endpoint":1,"send":{"Power":"On"}}\
+ off CMNDTOPIC/ZbSend {"device":"0xDEV_ID","Endpoint":1,"send":{"Power":"Off"}}
+attr DEVICE_CH2 readingList \
+ TELETOPIC:.* { return if $EVENT !~ m/.Endpoint..2/; $EVENT =~ s/"Power":1/"Power":"on"/g; $EVENT =~ s/"Power":0/"Power":"off"/g; $EVENT =~ m,^.*(..Device.+)..$, ? json2nameValue($1,'',$JSONMAP) : $EVENT =~ m,0xDEV_ID.:(.*).., ? json2nameValue($1,'',$JSONMAP) : undef }
+attr DEVICE_CH2 setList on CMNDTOPIC/ZbSend {"device":"0xDEV_ID","Endpoint":2,"send":{"Power":"On"}}\
+ off CMNDTOPIC/ZbSend {"device":"0xDEV_ID","Endpoint":2,"send":{"Power":"Off"}}
+option:{ CALLSPEECHRECOGN }
+set DEVICE attrTemplate speechcontrol_type_switch
+option:global
+attr DEVICE,DEVICE_CH2 model tasmota_zigbee2tasmota_2channel_split
+setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20201206
+
+
name:tasmota_zigbee2tasmota_generic_battery_sensor
prereq:{my @devices=devspec2array("model=tasmota_zigbee2tasmota_bridge");;return 1 if $devices[0];;return 0}
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*tele.*/..../SENSOR:.*
@@ -2235,9 +2262,10 @@ attr DEVICE stateFormat pct
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close stop
set DEVICE x_mqttcom announce
+attr DEVICE eventMap open:opens close:closes
set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model shelly2_roller
-setreading DEVICE attrTemplateVersion 20200522 or prior
+setreading DEVICE attrTemplateVersion 20201206
# shelly25 using original firmware in roller mode.
# contributed by 87insane, https://forum.fhem.de/index.php/topic,94060.msg940978.html#msg940978
@@ -2280,10 +2308,11 @@ attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_
attr DEVICE webCmd :open:close:half:stop:pct
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct
+attr DEVICE eventMap open:opens close:closes
set DEVICE x_mqttcom announce
set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model shelly25_roller_invert_0
-setreading DEVICE attrTemplateVersion 20200831
+setreading DEVICE attrTemplateVersion 20201206
name:shelly25_roller_invert_1
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.*
@@ -2324,10 +2353,11 @@ attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_
attr DEVICE webCmd :open:close:half:stop:pct
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct
+attr DEVICE eventMap open:opens close:closes
set DEVICE x_mqttcom announce
set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model shelly25_roller_invert_1
-setreading DEVICE attrTemplateVersion 20200926
+setreading DEVICE attrTemplateVersion 20201206
# shelly2 using original firmware.
# NOTE: a second device will be created for the second channel