mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
75_MSG: compatibility update
git-svn-id: https://svn.fhem.de/fhem/trunk@13942 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0971dd6029
commit
8ca2f171f3
@ -1914,6 +1914,13 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
|
||||
while ( ( my $key, my $value ) =
|
||||
each %$params )
|
||||
{
|
||||
# Compatibility to legacy schema:
|
||||
# lowercase after _
|
||||
$key =~
|
||||
s/^($gatewayDevType)(_[A-Z0-9]+)$/\1\L\2\e/;
|
||||
|
||||
# remove gateway TYPE when
|
||||
# used as prefix
|
||||
$key =~ s/^$gatewayDevType\_//;
|
||||
$cmd .= " $key='$value'"
|
||||
if ( !defined( $h->{$key} )
|
||||
@ -1953,10 +1960,10 @@ m/^(absent|disappeared|unauthorized|disconnected|unreachable)$/i
|
||||
Log3 $logDevice, 5,
|
||||
"msg $device: "
|
||||
. "$type[$i] route command (fhem): $cmd";
|
||||
fhem $cmd, 1;
|
||||
if ($@) {
|
||||
my $ret = fhem $cmd, 1;
|
||||
if ($ret) {
|
||||
$error = 1;
|
||||
$loopReturn3 .= "$gatewayDev: $@\n";
|
||||
$loopReturn3 .= "$gatewayDev: $ret\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user