2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-26 04:24:53 +00:00

42_AptToDate: add Attribut upgradeListReading for Reading in JSON

git-svn-id: https://svn.fhem.de/fhem/trunk@16989 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-07-16 08:30:59 +00:00
parent 96d0a4590d
commit 0d82e774bf
2 changed files with 6 additions and 1 deletions

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- feature: 42_AptToDate: add Attribut upgradeListReading for Reading in JSON
- change: 98_DOIFtools: added shortcut remove_DOIFtoolsLog to commandref
- change: 01_FHEMWEB.pm: default plotEmbed to 0 (Forum #82351)
- feature: 73_GardenaSmartBridge: 74_GeardenaSmartDevice: add support for

@ -49,7 +49,7 @@ eval "use JSON;1" or $missingModul .= "JSON ";
my $version = "0.2.2";
my $version = "0.2.4";
@ -102,6 +102,7 @@ sub AptToDate_Initialize($) {
$hash->{AttrFn} = "AptToDate_Attr";
$hash->{AttrList} = "disable:1 ".
"disabledForIntervals ".
"upgradeListReading:1 ".
$readingFnAttributes;
@ -690,6 +691,7 @@ sub AptToDate_WriteReadings($$) {
}
readingsBulkUpdateIfChanged($hash,'updatesAvailable',scalar keys %{$decode_json->{packages}}) if( $hash->{".fhem"}{aptget}{cmd} eq 'getUpdateList' );
readingsBulkUpdateIfChanged($hash,'upgradeListAsJSON',eval{encode_json($hash->{".fhem"}{aptget}{packages})}) if( AttrVal($name,'upgradeListReading','none') ne 'none');
readingsBulkUpdate($hash,'toUpgrade','successful') if( $hash->{".fhem"}{aptget}{cmd} eq 'toUpgrade' and not defined($hash->{".fhem"}{aptget}{'errors'}) and not defined($hash->{".fhem"}{aptget}{'warnings'}) );
if( $hash->{".fhem"}{aptget}{cmd} eq 'getDistribution' ) {
@ -920,6 +922,7 @@ sub AptToDate_ToDay() {
<b>Attributes</b>
<ul>
<li>disable - disables the device</li>
<li>upgradeListReading - add Upgrade List Reading as JSON</li>
<li>disabledForIntervals - disable device for interval time (13:00-18:30 or 13:00-18:30 22:00-23:00)</li>
</ul>
</ul>
@ -983,6 +986,7 @@ sub AptToDate_ToDay() {
<b>Attributes</b>
<ul>
<li>disable - Deaktiviert das Device</li>
<li>upgradeListReading - f&uuml;gt die Upgrade Liste als ein zus&auml;iches Reading im JSON Format ein.</li>
<li>disabledForIntervals - Deaktiviert das Device f&uuml;r eine bestimmte Zeit (13:00-18:30 or 13:00-18:30 22:00-23:00)</li>
</ul>
</ul>