mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
46_SmartPi: fix syntax error bug in Attribut Sub
git-svn-id: https://svn.fhem.de/fhem/trunk@15556 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
66c28d044d
commit
ba07dc4091
@ -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.
|
||||
- bugfix: 46_SmartPi: fix syntax error bug in Attribut Sub
|
||||
- change: 98_dewpoint: Refactoring using API calls, verbose attribute added
|
||||
- change: FileLog removes newlines from the data (Forum #79684)
|
||||
- bugfix: 98_Siro.pm: Support favorit for model ERB15LE
|
||||
|
@ -164,13 +164,13 @@ sub SmartPi_Attr(@) {
|
||||
readingsSingleUpdate ( $hash, "state", "disabled", 1 );
|
||||
Log3 $name, 3, "SmartPi ($name) - disabled";
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
readingsSingleUpdate ( $hash, "state", "enabled", 1 );
|
||||
Log3 $name, 3, "SmartPi ($name) - enabled";
|
||||
}
|
||||
|
||||
elsif( $attrName eq "disabledForIntervals" ) {
|
||||
|
||||
} elsif( $attrName eq "disabledForIntervals" ) {
|
||||
if( $cmd eq "set" ) {
|
||||
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?)+$/);
|
||||
@ -182,8 +182,7 @@ sub SmartPi_Attr(@) {
|
||||
Log3 $name, 3, "SmartPi ($name) - enabled";
|
||||
readingsSingleUpdate ( $hash, "state", "active", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} elsif( $attrName eq "interval" ) {
|
||||
if( $cmd eq "set" ) {
|
||||
$hash->{INTERVAL} = $attrVal;
|
||||
@ -192,7 +191,7 @@ sub SmartPi_Attr(@) {
|
||||
$hash->{INTERVAL} = 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user