From e208ab979483e69c6181017f33ae2daa756d44b8 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Fri, 10 Aug 2018 14:56:05 +0000 Subject: [PATCH] 46_SmartPi: exchange commandref, add NotifyFn git-svn-id: https://svn.fhem.de/fhem/trunk@17119 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/46_SmartPi.pm | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 337992416..5881c7c8b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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: 46_SmartPi: exchange commandref, add NotifyFn - new: 00_MQTT2_SERVER / 10_MQTT2_DEVICE - bugfix: 93_DbRep: fix in fetchrow function (forum:#89886),fix highlighting - bugfix: 82_LGTV_WebOS: fix set cmd for AmazonLovefilm diff --git a/fhem/FHEM/46_SmartPi.pm b/fhem/FHEM/46_SmartPi.pm index e01631133..39b975f18 100644 --- a/fhem/FHEM/46_SmartPi.pm +++ b/fhem/FHEM/46_SmartPi.pm @@ -60,7 +60,7 @@ use HttpUtils; eval "use JSON;1" or $missingModul .= "JSON "; -my $version = "1.2.0"; +my $version = "1.4.0"; @@ -175,7 +175,6 @@ sub SmartPi_Attr(@) { return "check disabledForIntervals Syntax HH:MM-HH:MM or 'HH:MM-HH:MM HH:MM-HH:MM ...'" unless($attrVal =~ /^((\d{2}:\d{2})-(\d{2}:\d{2})\s?)+$/); Log3 $name, 3, "SmartPi ($name) - disabledForIntervals"; - readingsSingleUpdate ( $hash, "state", "disabled", 1 ); } elsif( $cmd eq "del" ) { @@ -186,9 +185,11 @@ sub SmartPi_Attr(@) { } elsif( $attrName eq "interval" ) { if( $cmd eq "set" ) { $hash->{INTERVAL} = $attrVal; + Log3 $name, 3, "SmartPi ($name) - set interval: $attrVal"; } else { $hash->{INTERVAL} = 300; + Log3 $name, 3, "SmartPi ($name) - delete User interval and set default: 300"; } } @@ -487,6 +488,17 @@ sub SmartPi_WriteReadings($$) {

SmartPi

+ +Define + - get + Attribute