mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
00_TCM: attr baseID added
git-svn-id: https://svn.fhem.de/fhem/trunk@6239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c62af504e5
commit
6b8112f3e7
@ -901,7 +901,11 @@ sub TCM_Notify(@) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($comType ne "RS485" && $hash->{DeviceName} ne "none" && !defined(AttrVal($name, "baseID", undef))) {
|
||||
my $baseID = AttrVal($name, "baseID", undef);
|
||||
if (defined($baseID)) {
|
||||
$hash->{BaseID} = $baseID;
|
||||
$hash->{LastID} = sprintf "%08X", (hex $baseID) + 127;
|
||||
} elsif ($comType ne "RS485" && $hash->{DeviceName} ne "none") {
|
||||
my @getBaseID = ("get", "baseID");
|
||||
if (TCM_Get($hash, @getBaseID) =~ /[Ff]{2}[\dA-Fa-f]{6}/ ) {
|
||||
$hash->{BaseID} = sprintf "%08X", hex $&;
|
||||
|
Loading…
x
Reference in New Issue
Block a user