diff --git a/fhem/CHANGED b/fhem/CHANGED index a370b2b07..e1142e1ab 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 20_FRM_IN: fix undefined value warning when not initialized - changed: 74_Unifi: removed UCv3 support - feature: 59_Weather: and APIs fix utf8 encode bug, insert patch from lippie - change: 98_Text2Speech.pm: removed some bugs, thanks to RomanticBoy83 diff --git a/fhem/FHEM/20_FRM_IN.pm b/fhem/FHEM/20_FRM_IN.pm index cf759590f..33cf0b976 100755 --- a/fhem/FHEM/20_FRM_IN.pm +++ b/fhem/FHEM/20_FRM_IN.pm @@ -127,7 +127,10 @@ FRM_IN_observer($$$$) { my ($pin,$last,$new,$hash) = @_; my $name = $hash->{NAME}; - my $old = ReadingsVal($name, "reading", undef) eq "on" ? PIN_HIGH : PIN_LOW; + my $old = ReadingsVal($name, "reading", undef); + if (defined($old)) { + $old = $old eq "on" ? PIN_HIGH : PIN_LOW; + } if (AttrVal($hash->{NAME},"activeLow","no") eq "yes") { $new = $new == PIN_LOW ? PIN_HIGH : PIN_LOW; } @@ -308,6 +311,9 @@ FRM_IN_Attr($$$$) { CHANGES + 15.02.2019 jensb + o bugfix: change detection no longer assumes that reading "reading" is defined + 04.11.2018 jensb o bugfix: get alarm/reading/state o feature: remove unused FHEMWEB input field from all get commands