From cda5eccd1bd091f2f2c2abd25bd653f0b64bb33d Mon Sep 17 00:00:00 2001 From: "klaus.schauer" <> Date: Mon, 7 Dec 2020 18:07:25 +0000 Subject: [PATCH] 98_ModbusElsnerWS: minor function and commandref changes git-svn-id: https://svn.fhem.de/fhem/trunk@23308 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_ModbusElsnerWS.pm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/98_ModbusElsnerWS.pm b/fhem/FHEM/98_ModbusElsnerWS.pm index 4868fccd5..b9e438647 100644 --- a/fhem/FHEM/98_ModbusElsnerWS.pm +++ b/fhem/FHEM/98_ModbusElsnerWS.pm @@ -565,6 +565,13 @@ sub ModbusElsnerWS_Attr(@) { } } } + } elsif ($attrName eq "customCmdPriority") { + if (!defined $attrVal) { + + } elsif ($attrVal !~ m/^down|up$/) { + $err = "attribute-value [$attrName] = $attrVal wrong"; + CommandDeleteAttr(undef, "$name $attrName"); + } } elsif ($attrName eq "signOfLife") { if (!defined $attrVal) { @@ -907,10 +914,10 @@ sub ModbusElsnerWS_Delete($$) {
  • Day/night signal
  • Display of date, time, sun azimuth, sun elevation, longitude and latitude
  • Execution of custom alarm commands, see customCmdAlarmOff and - customCmdAlarmOn
  • + customCmdAlarmOn.
  • Execution of custom up and down commands that can be triggered by the readings dayNight, isRaining, isStormy, isSunny, isSunnyEast, isSunnySouth, isSunnyWest and isWindy, see customCmdDown and - customCmdUp
  • + customCmdUp.
    Prerequisites @@ -1018,8 +1025,8 @@ sub ModbusElsnerWS_Delete($$) { else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE and the current readings
    $BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH", - $ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME, - $TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.
    + $ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME, + $TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.
    The eventMap replacements are taken into account. This data is available as a local variable in perl, as environment variable for shell scripts, and will be textually replaced for Fhem commands.
    @@ -1033,8 +1040,8 @@ sub ModbusElsnerWS_Delete($$) { else it is a "plain" fhem.pl command (chain). In the <command> you can access the name of the device by using $NAME, $TYPE and the current readings
    $BRIGHTNESS, $DATE, $DAYNIGHT, $HEMISPHERE, $ISRAINING, $ISSTORMY, $ISSUNNY, $ISSUNNYEAST, $ISSUNNYSOUTH", - $ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME, - $TIMEZONE, $TWILIGHT, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.
    + $ISSUNNYWEST, $ISWINDY, $LATITUDE, $LONGITUDE, $NAME, $SUNAZIMUTH, $SUNEAST, $SUNELAVATION, $SUNSOUTH, $SUNWEST, $TEMPERATURE, $TIME, + $TIMEZONE, $TWILIGHT, $TYPE, $WEEKDAY, $WINDAVG2MIN, $WINDGUST10MIN, $WINDGUSTCURRNT, $WINDPEAK10MIN, $WINDSPEED, $WINDSTENGTH.
    The eventMap replacements are taken into account. This data is available as a local variable in perl, as environment variable for shell scripts, and will be textually replaced for Fhem commands.