diff --git a/CHANGED b/CHANGED index b40fa09aa..43c5bd4a4 100644 --- a/CHANGED +++ b/CHANGED @@ -61,6 +61,8 @@ - feature: added new command 'notice'. (M. Fischer) - change: update supports the display and confirmation of system messages via the new notice command (M. Fischer) + - change: BS, USF1000, dummy migrated to readingsFN (Boris) + - 2012-10-28 (5.3) - feature: added functions trim, ltrim, rtrim, UntoggleDirect, diff --git a/FHEM/98_dummy.pm b/FHEM/98_dummy.pm index a56e07ff6..edcca7ca4 100644 --- a/FHEM/98_dummy.pm +++ b/FHEM/98_dummy.pm @@ -12,7 +12,7 @@ dummy_Initialize($) $hash->{SetFn} = "dummy_Set"; $hash->{DefFn} = "dummy_Define"; - $hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 setList"; + $hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 setList ". $readingFnAttributes; } ################################### @@ -29,10 +29,7 @@ dummy_Set($@) my $v = join(" ", @a); Log GetLogLevel($name,2), "dummy set $name $v"; - $hash->{CHANGED}[0] = $v; - $hash->{STATE} = $v; - $hash->{READINGS}{state}{TIME} = TimeNow(); - $hash->{READINGS}{state}{VAL} = $v; + readingsSingleUpdate($hash,"state",$v,1); return undef; } @@ -93,6 +90,7 @@ dummy_Define($$) so the FHEMWEB frontend can construct a dropdown and offer on/off switches. Example: attr dummyName setList on off +