2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 02:10:32 +00:00

HMCCU: fixed command lookup table bug

git-svn-id: https://svn.fhem.de/fhem/trunk@28567 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
zap 2024-02-28 16:34:43 +00:00
parent 073c90db29
commit 4b756eadca
3 changed files with 13 additions and 8 deletions

View File

@ -4365,6 +4365,7 @@ sub HMCCU_GetEnumValues ($$$$;$$)
foreach my $cv (split(',', $argList)) { foreach my $cv (split(',', $argList)) {
$valList{$cv} = $i; $valList{$cv} = $i;
$valIndex{$i} = $cv; $valIndex{$i} = $cv;
$i++;
} }
} }
} }
@ -6725,7 +6726,7 @@ sub HMCCU_UpdateRoleCommands ($$)
# Build lookup table # Build lookup table
my $argList = ''; my $argList = '';
my $el = HMCCU_GetEnumValues ($ioHash, $paramDef, undef, $role, '#', $pv); my $el = HMCCU_GetEnumValues ($ioHash, $paramDef, $dpt, $role, '#', $pv);
if ($el ne '') { if ($el ne '') {
my $min; my $min;
my $max; my $max;

View File

@ -597,8 +597,7 @@ sub HMCCUCHN_Get ($@)
Turn device off. Turn device off.
</li><br/> </li><br/>
<li><b>set &lt;name&gt; oldLevel</b><br/> <li><b>set &lt;name&gt; oldLevel</b><br/>
[dimmer, blind] Set level to previous value. The command is only available if channel [dimmer, blind, jalousie, shutter] Set level to previous value.
contains a datapoint LEVEL with a maximum value of 1.01.
</li><br/> </li><br/>
<li><b>set &lt;name&gt; on</b><br/> <li><b>set &lt;name&gt; on</b><br/>
Turn device on. Turn device on.

View File

@ -396,8 +396,9 @@ $HMCCU_CONFIG_VERSION = '5.0';
'close' => 'V:LEVEL:0', 'close' => 'V:LEVEL:0',
'up' => 'V:LEVEL:?delta=+20', 'up' => 'V:LEVEL:?delta=+20',
'down' => 'V:LEVEL:?delta=-20', 'down' => 'V:LEVEL:?delta=-20',
'oldPos' => 'V:LEVEL:1.005', 'oldLevel' => 'V:LEVEL:1.005',
'stop' => 'V:STOP:1' 'stop' => 'V:STOP:1',
'toggle' => 'V:LEVEL:0,100'
}, },
'BLIND_VIRTUAL_RECEIVER' => { 'BLIND_VIRTUAL_RECEIVER' => {
'pct' => 'V:LEVEL:?level', 'pct' => 'V:LEVEL:?level',
@ -410,7 +411,8 @@ $HMCCU_CONFIG_VERSION = '5.0';
'pctSlats' => 'V:LEVEL_2:?level V:LEVEL:1.005', 'pctSlats' => 'V:LEVEL_2:?level V:LEVEL:1.005',
'openSlats' => 'V:LEVEL_2:100 V:LEVEL:1.005', 'openSlats' => 'V:LEVEL_2:100 V:LEVEL:1.005',
'closeSlats' => 'V:LEVEL_2:0 V:LEVEL:1.005', 'closeSlats' => 'V:LEVEL_2:0 V:LEVEL:1.005',
'allLevels' => 'V:LEVEL_2:?slatLevel V:LEVEL:?blindLevel' 'allLevels' => 'V:LEVEL_2:?slatLevel V:LEVEL:?blindLevel',
'toggle' => 'V:LEVEL:0,100'
}, },
'CLIMATECONTROL_REGULATOR' => { 'CLIMATECONTROL_REGULATOR' => {
'desired-temp' => 'V:SETPOINT:?temperature', 'desired-temp' => 'V:SETPOINT:?temperature',
@ -482,10 +484,12 @@ $HMCCU_CONFIG_VERSION = '5.0';
'up' => 'V:LEVEL:?delta=+20', 'up' => 'V:LEVEL:?delta=+20',
'down' => 'V:LEVEL:?delta=-20', 'down' => 'V:LEVEL:?delta=-20',
'stop' => 'V:STOP:1', 'stop' => 'V:STOP:1',
'oldLevel' => 'V:LEVEL:1.005',
'pctSlats' => 'V:LEVEL_SLATS:?level', 'pctSlats' => 'V:LEVEL_SLATS:?level',
'openSlats' => 'V:LEVEL_SLATS:100', 'openSlats' => 'V:LEVEL_SLATS:100',
'closeSlats' => 'V:LEVEL_SLATS:0', 'closeSlats' => 'V:LEVEL_SLATS:0',
'allLevels' => 'V:LEVEL_SLATS:?slatLevel V:LEVEL:?blindLevel' 'allLevels' => 'V:LEVEL_SLATS:?slatLevel V:LEVEL:?blindLevel',
'toggle' => 'V:LEVEL:0,100'
}, },
'KEY' => { 'KEY' => {
'on' => 'V:PRESS_SHORT:1', 'on' => 'V:PRESS_SHORT:1',
@ -529,7 +533,8 @@ $HMCCU_CONFIG_VERSION = '5.0';
'close' => 'V:LEVEL:0', 'close' => 'V:LEVEL:0',
'up' => 'V:LEVEL:?delta=+20', 'up' => 'V:LEVEL:?delta=+20',
'down' => 'V:LEVEL:?delta=-20', 'down' => 'V:LEVEL:?delta=-20',
'stop' => 'V:STOP:1' 'stop' => 'V:STOP:1',
'toggle' => 'V:LEVEL:0,100'
}, },
'SMOKE_DETECTOR' => { 'SMOKE_DETECTOR' => {
'command' => 'V:SMOKE_DETECTOR_COMMAND:#command' 'command' => 'V:SMOKE_DETECTOR_COMMAND:#command'