2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

zwave.template: small bugfix in utils file; mqtt2.template: delete some irrelevant comments

git-svn-id: https://svn.fhem.de/fhem/trunk@22857 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-09-26 15:18:40 +00:00
parent ba945c2dd4
commit bd20984b32
2 changed files with 6 additions and 15 deletions

View File

@ -852,11 +852,9 @@ order:A_01c1
set DEVICE attrTemplate tasmota_2channel_split CALLSPEECHRECOGN=0
set DEVICE attrTemplate tasmota_POW
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
#attr DEVICE comment Channel 1 for DEVICE, see also DEVICE_CH2
par:ICON;ICON as set, defaults to usb;{ AttrVal("DEVICE_CH2","icon","usb") }
attr DEVICE_CH2 icon ICON
attr DEVICE_CH2 comment Channel 2 (USB outlets) for DEVICE
#setreading DEVICE_CH2 associatedWith DEVICE
attr DEVICE_CH2 devStateIcon on:usb:off off:usb@red:on
attr DEVICE_CH2 setStateList on off toggle
set DEVICE_CH2 attrTemplate speechcontrol_type_switch
@ -1066,8 +1064,6 @@ option:{SETCHANNELINFO}
set DEVICE attrTemplate set_associatedWith \CHANNELS=2
option:{ CALLSPEECHRECOGN }
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_switch
#set DEVICE_CH2 attrTemplate speechcontrol_type_switch
#contributed by 87insane
# tasmota 2ch as shutter device.
@ -1137,7 +1133,6 @@ 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;;
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
#set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model tasmota_2ch_shutter_invert_0
setreading DEVICE attrTemplateVersion 20200522 or prior
@ -1303,9 +1298,6 @@ attr DEVICE_USB icon rc_USB
#finally set the model attr for all new devices and do a reboot of device
set IO_DEV publish CMNDTOPIC/status
set IO_DEV publish CMNDTOPIC/restart 1
#set DEVICE_CH2 attrTemplate speechcontrol_general_naming_master_template
#set DEVICE_CH3 attrTemplate speechcontrol_general_naming_master_template
#set DEVICE_USB attrTemplate speechcontrol_general_naming_master_template
farewell:Template has been applied successfully. Wait some seconds for reboot to complete and watch readings get populated.
attr DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_USB model tasmota_3socketUSB_channel_split
setreading DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_USB attrTemplateVersion 20200522 or prior
@ -2167,9 +2159,9 @@ attr DEVICE webCmd :open:close:half:stop:pct
deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct
set DEVICE x_mqttcom announce
#set DEVICE attrTemplate speechcontrol_type_blind
set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model shelly25_roller_invert_1
setreading DEVICE attrTemplateVersion 20200831
setreading DEVICE attrTemplateVersion 20200926
# shelly2 using original firmware.
# NOTE: a second device will be created for the second channel
@ -2331,7 +2323,6 @@ deletereading -q DEVICE status_.*
attr DEVICE readingList shellies/DEVNAME/color/0/status:.* {json2nameValue($EVENT,'',$JSONMAP)}
attr DEVICE userReadings ct:temp.* {ReadingsVal($name,"temp",3000)}, rgb:red.* {if(ReadingsVal($name,"mode","") eq "color"){sprintf("%02X%02X%02X", ReadingsVal($name,"red",99), ReadingsVal($name,"green",99), ReadingsVal($name,"blue",99))}else{my $a=sprintf("%02X",ReadingsVal($name,"brightness",0)*2.555);"$a$a$a"}}
attr DEVICE webCmd on:off:pct:ct:rgb
#attr DEVICE genericDeviceType light
attr DEVICE jsonMap brightness:pct
set DEVICE x_mqttcom announce
set DEVICE attrTemplate speechcontrol_type_light
@ -2367,7 +2358,6 @@ attr DEVICE readingList\
attr DEVICE userReadings ct:temp.* {ReadingsVal($name,"temp",3000)}
attr DEVICE webCmd on:off:pct:ct
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,"online","false") eq "true"?"10px-kreis-gruen":"10px-kreis-rot"; my $light = ReadingsVal($name,"state","off"); my $cons = ReadingsVal($name,"power","unknown"); "<a href=\"http://".ReadingsVal($name,"ip","none")." \"target=\"_blank\">".FW_makeImage($onl)."</a> <a href=\"/fhem?cmd.dummy=set $name toggle&XHR=1\">".FW_makeImage($light)."</a><div>Verbrauch: $cons</div>"}
#attr DEVICE genericDeviceType light
attr DEVICE jsonMap brightness:pct
set DEVICE x_mqttcom announce
set DEVICE attrTemplate speechcontrol_type_light

View File

@ -49,12 +49,12 @@ sub devStateIcon_venetian_shutter {
my @slatnames = devspec2array("DEF=$def".'.'.$defnr);
$slatname = shift @slatnames;
$slatlevel= ReadingsNum($slatname,"state",0);
$moving = 1 if ReadingsNum($slatname,"power",0) > 0;
$moving = 1 if ReadingsNum($levelname,"power",0) > 0;
}
if ($model eq "FGRM222") {
$slatlevel= ReadingsNum($slatname,"positionSlat",0);
$slatlevel= ReadingsNum($levelname,"positionSlat",0);
$slatcommand_string = "positionSlat ";
$moving = 1 if ReadingsNum($slatname,"power",0) > 0;
$moving = 1 if ReadingsNum($levelname,"power",0) > 0;
}
#levelicon
@ -81,6 +81,7 @@ sub devStateIcon_venetian_shutter {
1;
__END__
=pod
=begin html