mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
correct splitting of read states
git-svn-id: https://svn.fhem.de/fhem/trunk@3798 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5129bba363
commit
fe3018aae8
@ -128,13 +128,15 @@ sub gcmsend_notify($$)
|
||||
my @keyValue = split(":", $dev->{CHANGED}[$i]);
|
||||
my $length = int($keyValue);
|
||||
|
||||
my $change = $dev->{CHANGED}[$i];
|
||||
my $position = index($change, ':');
|
||||
|
||||
if ($length == 0) {
|
||||
if ($position == -1) {
|
||||
$key = "state";
|
||||
$value = $keyValue[0];
|
||||
} else {
|
||||
$key = @keyValue[0];
|
||||
$value = @keyValue[1];
|
||||
$key = substr($change, 0, $position);
|
||||
$value = substr($change, $position + 2, length($change));
|
||||
}
|
||||
|
||||
if (
|
||||
|
Loading…
x
Reference in New Issue
Block a user