2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 19:04:20 +00:00

10_NeuronPin.pm: Bugfix for alias

git-svn-id: https://svn.fhem.de/fhem/trunk@17898 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klausw 2018-12-05 17:38:33 +00:00
parent de599f7ac9
commit 441fb55942

View File

@ -141,7 +141,9 @@ sub NeuronPin_Parse ($$) {
} elsif (grep( /^$key/, @skipreadings )) { # Wer soll nicht als reading angelegt werden
readingsDelete($hash, $key);
} elsif ($key eq 'alias') { # al_ am Anfang von alias weg
my $alias = (split '_', $message->{$key})[1];
# my $alias = (split '_', $message->{$key})[1];
my @aliases = (split '_', $message->{$key});
my $alias = join(" ",@aliases[1 .. $#aliases]);
readingsBulkUpdate($hash,$key,$alias);
# autocreate alias attribute
if (AttrVal($hash->{NAME}, 'alias', '?') ne $alias && defined AttrVal($hash->{NAME}, 'autoalias', '')) {