mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-27 20:34:52 +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
fhem
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# 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: 98_dewpoint: Refactoring using API calls, verbose attribute added
|
||||||
- change: FileLog removes newlines from the data (Forum #79684)
|
- change: FileLog removes newlines from the data (Forum #79684)
|
||||||
- bugfix: 98_Siro.pm: Support favorit for model ERB15LE
|
- bugfix: 98_Siro.pm: Support favorit for model ERB15LE
|
||||||
|
@ -164,13 +164,13 @@ sub SmartPi_Attr(@) {
|
|||||||
readingsSingleUpdate ( $hash, "state", "disabled", 1 );
|
readingsSingleUpdate ( $hash, "state", "disabled", 1 );
|
||||||
Log3 $name, 3, "SmartPi ($name) - disabled";
|
Log3 $name, 3, "SmartPi ($name) - disabled";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
readingsSingleUpdate ( $hash, "state", "enabled", 1 );
|
readingsSingleUpdate ( $hash, "state", "enabled", 1 );
|
||||||
Log3 $name, 3, "SmartPi ($name) - enabled";
|
Log3 $name, 3, "SmartPi ($name) - enabled";
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif( $attrName eq "disabledForIntervals" ) {
|
} elsif( $attrName eq "disabledForIntervals" ) {
|
||||||
if( $cmd eq "set" ) {
|
if( $cmd eq "set" ) {
|
||||||
return "check disabledForIntervals Syntax HH:MM-HH:MM or 'HH:MM-HH:MM HH:MM-HH:MM ...'"
|
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?)+$/);
|
unless($attrVal =~ /^((\d{2}:\d{2})-(\d{2}:\d{2})\s?)+$/);
|
||||||
@ -182,8 +182,7 @@ sub SmartPi_Attr(@) {
|
|||||||
Log3 $name, 3, "SmartPi ($name) - enabled";
|
Log3 $name, 3, "SmartPi ($name) - enabled";
|
||||||
readingsSingleUpdate ( $hash, "state", "active", 1 );
|
readingsSingleUpdate ( $hash, "state", "active", 1 );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} elsif( $attrName eq "interval" ) {
|
} elsif( $attrName eq "interval" ) {
|
||||||
if( $cmd eq "set" ) {
|
if( $cmd eq "set" ) {
|
||||||
$hash->{INTERVAL} = $attrVal;
|
$hash->{INTERVAL} = $attrVal;
|
||||||
@ -192,7 +191,7 @@ sub SmartPi_Attr(@) {
|
|||||||
$hash->{INTERVAL} = 300;
|
$hash->{INTERVAL} = 300;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user