bugfix ->{NAME}

This commit is contained in:
Marko Oldenburg 2016-11-13 12:39:48 +01:00
parent c85006ac21
commit 4ddc8489e1

View File

@ -35,7 +35,7 @@ use POSIX;
use JSON;
use Blocking;
my $version = "0.1.54";
my $version = "0.1.55";
@ -168,6 +168,7 @@ sub XiaomiFlowerSens_Attr(@) {
sub XiaomiFlowerSens_stateRequest($) {
my ($hash) = @_;
my $name = $hash->{NAME};
readingsSingleUpdate ( $hash, "state", "active", 1 ) if( ReadingsVal($name, "state", 0) eq "initialized" or ReadingsVal($name, "state", 0) eq "unreachable" );
XiaomiFlowerSens($hash);