diff --git a/fhem/contrib/HMCCU/88_HMCCUCHN.pm b/fhem/contrib/HMCCU/88_HMCCUCHN.pm index 980d3544f..fae20b022 100644 --- a/fhem/contrib/HMCCU/88_HMCCUCHN.pm +++ b/fhem/contrib/HMCCU/88_HMCCUCHN.pm @@ -4,7 +4,7 @@ # # $Id:$ # -# Version 2.4 +# Version 2.5 # # (c) 2015 zap (zap01 t-online de) # @@ -61,7 +61,7 @@ sub HMCCUCHN_Initialize ($) $hash->{GetFn} = "HMCCUCHN_Get"; $hash->{AttrFn} = "HMCCUCHN_Attr"; - $hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address,datapoint ccureadings:0,1 ccustate statedatapoint statevals substitute stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes; + $hash->{AttrList} = "IODev ccureadingfilter ccureadingformat:name,address,datapoint ccureadings:0,1 ccustate ccuget:State,Value statedatapoint statevals substitute stripnumber:0,1,2 loglevel:0,1,2,3,4,5,6 ". $readingFnAttributes; } ##################################### @@ -288,7 +288,12 @@ sub HMCCUCHN_Get ($@) return $ccureadings ? undef : $result; } elsif ($opt eq 'update') { - $rc = HMCCU_GetUpdate ($hash, $hash->{ccuaddr}); + my $ccuget = shift @a; + $ccuget = 'Attr' if (!defined ($ccuget)); + if ($ccuget !~ /^(Attr|State|Value)$/) { + return HMCCUCHN_SetError ($hash, "Usage: get $name update [{'State'|'Value'}]"); + } + $rc = HMCCU_GetUpdate ($hash, $hash->{ccuaddr}, $ccuget); return HMCCUCHN_SetError ($hash, $rc) if ($rc < 0); return undef; } @@ -422,8 +427,7 @@ sub HMCCUCHN_SetError ($$)
Get description of configuration parameters of CCU channel.
-
  • get <name> update -
    +
  • get <name> update [{'State'|'Value'}]
    Update all datapoints / readings of channel.
  • @@ -433,31 +437,29 @@ sub HMCCUCHN_SetError ($$) Attributes