introduced readingsBulkUpdate, readingsSingleUpdate
introduced GPLv2 git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2099 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1,5 +1,26 @@
|
||||
##############################################
|
||||
# $Id$
|
||||
##############################################################################
|
||||
#
|
||||
# 98_structure.pm
|
||||
# Copyright by
|
||||
# e-mail:
|
||||
#
|
||||
# This file is part of fhem.
|
||||
#
|
||||
# Fhem is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Fhem is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
package main;
|
||||
|
||||
use strict;
|
||||
@@ -232,9 +253,7 @@ sub structure_Notify($$)
|
||||
Log 3, "Update structure '" .$me . "' to " . $newState .
|
||||
" because device '" .$dev->{NAME}. "' has changed";
|
||||
$hash->{STATE} = $newState;
|
||||
readingsBeginUpdate($hash);
|
||||
readingsUpdate($hash, "state", $newState);
|
||||
readingsEndUpdate($hash, 1);
|
||||
readingsSingleUpdate($hash, "state", $newState, 1);
|
||||
}
|
||||
undef;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user