From f9337682b7b1097984df39bcf6c507ef95c4f680 Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Tue, 11 Jan 2022 04:22:39 +0000 Subject: [PATCH] mqtt2.template: more changes II wrt. to shelly 2. gen git-svn-id: https://svn.fhem.de/fhem/trunk@25454 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/lib/AttrTemplate/mqtt2.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template index 223dbbac2..0b6ca56cd 100644 --- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template +++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template @@ -3326,7 +3326,7 @@ setreading DEVICE attrTemplateVersion 20200831 # Shelly Plus 1 using original firmware. name:shellyPlus_1 filter:TYPE=MQTT2_DEVICE -desc:Early version of a base template for second generation shelly devices (names with "plus", without power measurement) +desc:Early version of a base template for second generation shelly devices (names with "plus", without power measurement). NOTE: requires to activate generic status update in firmware settings. par:DEV_TPC;Shelly name in the topic;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<(shellies/[^/]+|shellyp(lus|ro4pm)[^/:_]{4,}+)> ? $1 : undef } par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } order:A_20 @@ -3348,7 +3348,7 @@ attr DEVICE readingList $\DEVICETOPIC/online:.* online\ $\DEVICETOPIC/status/switch_0:.* { $EVENT =~ s/"output":true/"state":"on"/g; $EVENT =~ s/"output":false/"state":"off"/g; json2nameValue($EVENT, 'switch_', $JSONMAP) }\ fhem2shelly/rpc:.* {} attr DEVICE devStateIcon {my $onl = ReadingsVal($name,'online','false') eq 'false'?'10px-kreis-rot': '10px-kreis-gruen'; $onl = FW_makeImage($onl); my $light = FW_makeImage(ReadingsVal($name,'state','off')); my $temp = ReadingsVal($name,'temperature','-100'); my $ip = ReadingsVal($name,'ip','none'); qq(${onl}${light}
Temp: $temp °C
)} -attr DEVICE jsonMap switch_state:state switch_aenergy_total:aenergy_total params_switch_0_apower:apower temperature_tC:temperature temperature_tF:0 params_wifi_sta_ip:ip +attr DEVICE jsonMap switch_state:state switch_temperature_tC:temperature switch_temperature_tF:0 params_wifi_sta_ip:ip attr DEVICE setStateList on off toggle attr DEVICE webCmd : attr DEVICE model shellyPlus_1 @@ -3359,7 +3359,7 @@ set DEVICE attrTemplate speechcontrol_type_switch # Shelly Plus 1PM using original firmware. name:shellyPlus_1pm filter:TYPE=MQTT2_DEVICE -desc:Early version of a base template for second generation shelly devices (names with "plus", with power measurement) +desc:Early version of a base template for second generation shelly devices (names with "plus", with power measurement). NOTE: requires to activate generic status update in firmware settings. par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 } order:A_20a set DEVICE attrTemplate shellyPlus_1 \CALLSPEECHRECOGN=0