98_structure.pm: respect *_map for clientstate_behavior last (Forum #77056)

git-svn-id: https://svn.fhem.de/fhem/trunk@15129 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2017-09-24 08:58:57 +00:00
parent c3652efebb
commit 97fb374cdf

View File

@@ -275,7 +275,9 @@ structure_Notify($$)
$newState = $priority[$minprio];
} elsif($behavior eq "last"){
$newState = ReadingsVal($dev->{NAME}, "state", undef);
my $readingName = AttrVal($dev->{NAME}, $devmap, "state");
$newState = ReadingsVal($dev->{NAME}, $readingName, undef);
$newState = "undefined" if(!defined($newState));
}