37_Spotify: device_active reading

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14423 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
neumann 2017-05-30 17:59:04 +00:00
parent 26c1cf499c
commit 72eb0399ba

View File

@ -782,7 +782,7 @@ sub Spotify_dispatch($$$) {
$index++; $index++;
} }
readingsBulkUpdateIfChanged($hash, 'devices_cnt', $index-1, 1); readingsBulkUpdateIfChanged($hash, 'devices_cnt', $index-1, 1);
Spotify_saveDevice($hash, {id => "none", "name" => "none", "volume_percent" => -1, "type" => "none"}, 'device_active', 0); Spotify_saveDevice($hash, {id => "none", "name" => "none", "volume_percent" => -1, "type" => "none"}, 'device_active', 0) if(!defined $hash->{helper}{device_active});
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
} }