fix state reading after getDistribution
This commit is contained in:
parent
9d9af0eac8
commit
bc8f2ac22f
@ -35,7 +35,7 @@ package main;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my $version = "1.4.1";
|
my $version = "1.4.2";
|
||||||
|
|
||||||
sub AptToDate_Initialize($) {
|
sub AptToDate_Initialize($) {
|
||||||
|
|
||||||
@ -872,7 +872,8 @@ sub WriteReadings($$) {
|
|||||||
readingsBulkUpdate(
|
readingsBulkUpdate(
|
||||||
$hash, 'state',
|
$hash, 'state',
|
||||||
(
|
(
|
||||||
scalar keys %{ $decode_json->{packages} } > 0
|
(scalar keys %{ $decode_json->{packages} } > 0
|
||||||
|
or scalar keys%{ $hash->{".fhem"}{aptget}{packages} } > 0)
|
||||||
? 'system updates available'
|
? 'system updates available'
|
||||||
: 'system is up to date'
|
: 'system is up to date'
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user