mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
34_ESPEasy.pm: removed trailing white spaces
git-svn-id: https://svn.fhem.de/fhem/trunk@14415 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
887d4259aa
commit
dc0c3c12cb
@ -440,7 +440,6 @@ sub ESPEasy_Set($$@)
|
||||
"parameter(s)\n"."Usage: 'set $name $ESPEasy_setCmdsUsage{$cmd}'";
|
||||
}
|
||||
|
||||
|
||||
#Lights Plugin
|
||||
if (defined AttrVal($name,"mapLightCmds",undef) && $cmd =~ m/^(ct|pct|rgb|on|off|toggle)$/i) {
|
||||
unshift @params, $cmd;
|
||||
@ -796,22 +795,22 @@ sub ESPEasy_Notify($$)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
sub ESPEasy_Rename() {
|
||||
my ($new,$old) = @_;
|
||||
my ($new,$old) = @_;
|
||||
my $i = 0;
|
||||
my $type = $defs{"$new"}->{TYPE};
|
||||
my $name = $defs{"$new"}->{NAME};
|
||||
my $subtype = $defs{"$new"}->{SUBTYPE};
|
||||
my $type = $defs{"$new"}->{TYPE};
|
||||
my $name = $defs{"$new"}->{NAME};
|
||||
my $subtype = $defs{"$new"}->{SUBTYPE};
|
||||
my @am;
|
||||
|
||||
# copy values from old to new device
|
||||
setKeyValue($type."_".$new."-user",getKeyValue($type."_".$old."-user"));
|
||||
setKeyValue($type."_".$new."-pass",getKeyValue($type."_".$old."-pass"));
|
||||
setKeyValue($type."_".$new."-firstrun",getKeyValue($type."_".$old."-firstrun"));
|
||||
setKeyValue($type."_".$new."-user",getKeyValue($type."_".$old."-user"));
|
||||
setKeyValue($type."_".$new."-pass",getKeyValue($type."_".$old."-pass"));
|
||||
setKeyValue($type."_".$new."-firstrun",getKeyValue($type."_".$old."-firstrun"));
|
||||
|
||||
# delete old entries
|
||||
setKeyValue($type."_".$old."-user",undef);
|
||||
setKeyValue($type."_".$old."-pass",undef);
|
||||
setKeyValue($type."_".$old."-firstrun",undef);
|
||||
setKeyValue($type."_".$old."-user",undef);
|
||||
setKeyValue($type."_".$old."-pass",undef);
|
||||
setKeyValue($type."_".$old."-firstrun",undef);
|
||||
|
||||
# replace IDENT in devices if bridge name changed
|
||||
if ($subtype eq "bridge") {
|
||||
@ -845,7 +844,7 @@ sub ESPEasy_Rename() {
|
||||
."Don't forget to save chages.";
|
||||
}
|
||||
|
||||
return undef;
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
||||
@ -1383,8 +1382,7 @@ sub ESPEasy_httpReqParse($$$)
|
||||
# 10 = SENSOR_TYPE_SWITCH
|
||||
my $vType = (defined $res->{plugin} && $res->{plugin} eq "1") ? "10" : "0";
|
||||
if (defined $res->{plugin} && $res->{plugin} eq "123") {
|
||||
# Lights plugin
|
||||
# Log 1, Dumper $res;
|
||||
# Lights plugin (eq 123)
|
||||
foreach (keys %{ $res }) {
|
||||
push @values, "r||$_||".$res->{$_}."||".$vType
|
||||
if $res->{$_} ne "" && $_ ne "plugin";
|
||||
@ -1528,7 +1526,6 @@ sub ESPEasy_resetTimer($;$)
|
||||
$sig = "" if !$sig;
|
||||
|
||||
if ($init_done == 1) {
|
||||
#Log3 $name, 5, "$type $name: RemoveInternalTimer ESPEasy_statusRequest";
|
||||
RemoveInternalTimer($hash, "ESPEasy_statusRequest");
|
||||
}
|
||||
|
||||
@ -1889,12 +1886,10 @@ sub ESPEasy_setCT($$@)
|
||||
|
||||
my $wwcwMaxBri = AttrVal($name,"wwcwMaxBri",0);
|
||||
my ($fww,$fcw) = ESPEasy_ct2wwcw($ct, $ctWW, $ctCW, $wwcwMaxBri, $ctWW_lim, $ctCW_lim);
|
||||
#my ($fww,$fcw) = ESPEasy_ct2wwcw($ct, $ctWW, $ctCW);
|
||||
|
||||
ESPEasy_Set($hash, $name, "pwm", ($gww, int $pct*10.23*$fww));
|
||||
ESPEasy_Set($hash, $name, "pwm", ($gcw, int $pct*10.23*$fcw));
|
||||
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
@ -2073,9 +2068,8 @@ sub ESPEasy_urlEncodeDisplayText($$@)
|
||||
|
||||
# collect all texts parameters
|
||||
for (my $i=$pp-1; $i<$c; $i++) {
|
||||
$params[$i] =~ s/,/./g; # comma is http url parameter splitter
|
||||
#$params[$i] =~ s/[\x00-\x1F\x7F-\xFF]//g; # remove non-printable chrs
|
||||
push( @t, $params[$i] )
|
||||
$params[$i] =~ s/,/./g; # comma is http url parameter splitter
|
||||
push @t, $params[$i];
|
||||
}
|
||||
my $text = join(" ", @t);
|
||||
|
||||
@ -2108,8 +2102,8 @@ sub ESPEasy_loadRequiredModules($)
|
||||
$hash->{helper}{pm}{$_} = 0;
|
||||
if ($init_done || $hash->{SUBTYPE} eq "bridge") {
|
||||
my ($name,$type) = ($hash->{NAME},$hash->{TYPE});
|
||||
Log3 $name, 1, "$type $name: WARNING: Perl module $_ is not installed. "
|
||||
. "Reduced functionality!";
|
||||
Log3 $name, 1, "$type $name: WARNING: Perl module $_ is not installed. "
|
||||
. "Reduced functionality!";
|
||||
Log3 $name, 2, "$type $name: $@" if $init_done;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user