mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 20:17:45 +00:00
desired temp reworked to use the set parameter list
git-svn-id: https://svn.fhem.de/fhem/trunk@1465 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5ae7d1b4fb
commit
0a1d66afbc
@ -92,10 +92,11 @@ FHEMWEB_Initialize($)
|
|||||||
$hash->{DefFn} = "FW_Define";
|
$hash->{DefFn} = "FW_Define";
|
||||||
$hash->{UndefFn} = "FW_Undef";
|
$hash->{UndefFn} = "FW_Undef";
|
||||||
$hash->{NotifyFn}= "FW_Notify";
|
$hash->{NotifyFn}= "FW_Notify";
|
||||||
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname fwmodpath fwcompress " .
|
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname fwmodpath fwcompress:0,1 ".
|
||||||
"plotmode:gnuplot,gnuplot-scroll,SVG plotsize refresh " .
|
"plotmode:gnuplot,gnuplot-scroll,SVG plotsize refresh " .
|
||||||
"touchpad smallscreen plotfork basicAuth basicAuthMsg ".
|
"touchpad smallscreen plotfork basicAuth basicAuthMsg ".
|
||||||
"stylesheetPrefix hiddenroom HTTPS longpoll redirectCmds ";
|
"stylesheetPrefix hiddenroom HTTPS longpoll:1,0 ".
|
||||||
|
"redirectCmds:0,1 ";
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Initialize internal structures
|
# Initialize internal structures
|
||||||
@ -929,23 +930,26 @@ FW_showRoom()
|
|||||||
FW_pO "</td>";
|
FW_pO "</td>";
|
||||||
if($cmdlist) {
|
if($cmdlist) {
|
||||||
foreach my $cmd (split(":", $cmdlist)) {
|
foreach my $cmd (split(":", $cmdlist)) {
|
||||||
FW_pH "cmd.$d=set $d $cmd$rf", ReplaceEventMap($d,$cmd,1), 1, "col3";
|
FW_pH "cmd.$d=set $d $cmd$rf", ReplaceEventMap($d,$cmd,1),1,"col3";
|
||||||
}
|
}
|
||||||
|
|
||||||
} elsif($allSets =~ m/ desired-temp /) {
|
} elsif($allSets =~ m/ desired-temp:([^ ]*)/) {
|
||||||
|
my @tv = split(",", $1);
|
||||||
$txt = ReadingsVal($d, "measured-temp", "");
|
$txt = ReadingsVal($d, "measured-temp", "");
|
||||||
$txt =~ s/ .*//;
|
$txt =~ s/ .*//;
|
||||||
$txt = sprintf("%2.1f", int(2*$txt)/2) if($txt =~ m/[0-9.-]/);
|
$txt = sprintf("%2.1f", int(2*$txt)/2) if($txt =~ m/[0-9.-]/);
|
||||||
my @tv = split(" ", getAllSets("$d desired-temp"));
|
|
||||||
$txt = int($txt*20)/$txt if($txt =~ m/^[0-9].$/);
|
$txt = int($txt*20)/$txt if($txt =~ m/^[0-9].$/);
|
||||||
|
|
||||||
FW_pO "<td>".
|
FW_pO "<td>".
|
||||||
FW_hidden("arg.$d", "desired-temp") .
|
FW_hidden("arg.$d", "desired-temp") .
|
||||||
FW_hidden("dev.$d", $d) .
|
FW_hidden("dev.$d", $d) .
|
||||||
FW_select("val.$d", \@tv, ReadingsVal($d, "desired-temp", $txt),"fht") .
|
($FW_room ? FW_hidden("room", $FW_room) : "") .
|
||||||
"</td><td>".
|
FW_select("val.$d", \@tv,
|
||||||
FW_submit("cmd.$d", "set").
|
ReadingsVal($d, "desired-temp", $txt),"fht") .
|
||||||
"</td>";
|
"</td><td>".
|
||||||
|
FW_submit("cmd.$d", "set").
|
||||||
|
"</td>";
|
||||||
|
|
||||||
} elsif($type eq "FileLog") {
|
} elsif($type eq "FileLog") {
|
||||||
$row = FW_dumpFileLog($d, 1, $row);
|
$row = FW_dumpFileLog($d, 1, $row);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user