correct splitting of read states

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@3798 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klassm
2013-08-26 17:39:03 +00:00
parent fcc445d019
commit 3a786216f6

View File

@@ -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 (