From 285453890f717f55cbeec3924943886b9249ebef Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Tue, 4 Feb 2020 10:34:08 +0000 Subject: [PATCH] mqtt2.template: change roborock template; httpmod.template bugfix in tasmota-updates git-svn-id: https://svn.fhem.de/fhem/trunk@21113 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/lib/AttrTemplate/httpmod.template | 2 +- fhem/FHEM/lib/AttrTemplate/mqtt2.template | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/lib/AttrTemplate/httpmod.template b/fhem/FHEM/lib/AttrTemplate/httpmod.template index 20a7afa9f..f419e0372 100644 --- a/fhem/FHEM/lib/AttrTemplate/httpmod.template +++ b/fhem/FHEM/lib/AttrTemplate/httpmod.template @@ -733,7 +733,7 @@ attr DEVICE stateFormat { my $ret ="";;\ $ret .= sprintf("%-65s",$check);;\ $ret .= ' |';;\ } elsif($check eq "error => no or wrong data from server!") {\ - $ret .= '| ';;\ + $ret .= '| ';;\ $ret .= sprintf("%-65s",$check);;\ $ret .= ' |';;\ } else {\ diff --git a/fhem/FHEM/lib/AttrTemplate/mqtt2.template b/fhem/FHEM/lib/AttrTemplate/mqtt2.template index 0808cfc2e..87c630424 100644 --- a/fhem/FHEM/lib/AttrTemplate/mqtt2.template +++ b/fhem/FHEM/lib/AttrTemplate/mqtt2.template @@ -2334,10 +2334,11 @@ par:DEVNAME;DEVNAME typically is rockrobo;{ AttrVal("DEVICE","readingList","") = deletereading -q DEVICE (?!associatedWith).* defmod DEVICE MQTT2_\DEVICE DEVNAME attr DEVICE icon vacuum_top +attr DEVICE devStateIcon { '' } attr DEVICE readingList homeassistant/vacuum/valetudo_DEVNAME/config:.* { json2nameValue($EVENT) }\ BASE_ID/DEVNAME/state:.* { json2nameValue($EVENT) }\ BASE_ID/DEVNAME/attributes:.* { json2nameValue($EVENT) }\ - BASE_ID/DEVNAME/map_data:.* {attrTmqtt2_roborock_valetudo2svg("map_data",$EVENT,"www/images/valetudo_map.svg")} + BASE_ID/DEVNAME/map_data:.* {attrTmqtt2_roborock_valetudo2svg("map_data",$EVENT,"www/images/DEVNAME_map.svg")} attr DEVICE setList start:noArg BASE_ID/DEVNAME/command start\ charge:noArg BASE_ID/DEVNAME/command return_to_base\ stop:noArg BASE_ID/DEVNAME/command stop\ @@ -2350,8 +2351,8 @@ attr DEVICE setList start:noArg BASE_ID/DEVNAME/command start\ load_map BASE_ID/DEVNAME/custom_command {"command":"load_map","name":"$EVTPART1"}\ store_map BASE_ID/DEVNAME/custom_command {"command":"store_map","name":"$EVTPART1"} attr DEVICE setStateList charge locate pause stop start -attr DEVICE comment For original code for "attrTmqtt2_roborock_valetudo2svg()" see this forum thread. To display generated map, define a weblink device:
define valetudo_map weblink htmlCode -farewell:template has been applied successfully.
NOTE: additional code has been downloaded from svn (contrib).
To display generated map, define a weblink device: define valetudo_map weblink htmlCode .
For details, see this forum thread. +attr DEVICE comment For original code for "attrTmqtt2_roborock_valetudo2svg()" see this forum thread. To display generated map, define a weblink device:
define valetudo_map weblink htmlCode +farewell:template has been applied successfully.
NOTE: additional code has been downloaded from svn (contrib).
To display generated map, define a weblink device: define valetudo_map weblink htmlCode .
For details, see this forum thread. NOTE: For use with rand256-Valetudo variant of the code, change the following line:
BASE_ID/DEVNAME/map:.* { WriteFile("www/images/DEVNAME_map.png",$EVENT);; {map=>"images/DEVNAME_map.png"} } attr DEVICE model roborock # source: https://forum.fhem.de/index.php/topic,105222.0.html