2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

HMCCUCHN: Minor changes

git-svn-id: https://svn.fhem.de/fhem/trunk@10120 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
fhemzap 2015-12-07 17:22:03 +00:00
parent b0a3b40e38
commit 1b1c657a89

View File

@ -99,6 +99,7 @@ sub HMCCUCHN_Define ($@)
} }
$hash->{ccutype} = HMCCU_GetDeviceType ($hash->{ccuaddr}, ''); $hash->{ccutype} = HMCCU_GetDeviceType ($hash->{ccuaddr}, '');
$hash->{channels} = 1;
$hash->{statevals} = 'devstate'; $hash->{statevals} = 'devstate';
my $arg = shift @a; my $arg = shift @a;
@ -178,7 +179,7 @@ sub HMCCUCHN_Set ($@)
if (!defined ($objname) || !defined ($objvalue)) { if (!defined ($objname) || !defined ($objvalue)) {
return HMCCUCHN_SetError ($hash, "Usage: set <name> datapoint <datapoint> <value> [...]"); return HMCCUCHN_SetError ($hash, "Usage: set <name> datapoint <datapoint> <value> [...]");
} }
$objvalue = HMCCU_Substitute ($objvalue, $statevals); $objvalue = HMCCU_Substitute ($objvalue, $statevals, 1);
# Build datapoint address # Build datapoint address
$objname = $hash->{ccuif}.'.'.$hash->{ccuaddr}.'.'.$objname; $objname = $hash->{ccuif}.'.'.$hash->{ccuaddr}.'.'.$objname;
@ -199,7 +200,7 @@ sub HMCCUCHN_Set ($@)
if (!defined ($objvalue)) { if (!defined ($objvalue)) {
return HMCCUCHN_SetError ($hash, "Usage: set <device> devstate <value>"); return HMCCUCHN_SetError ($hash, "Usage: set <device> devstate <value>");
} }
$objvalue = HMCCU_Substitute ($objvalue, $statevals); $objvalue = HMCCU_Substitute ($objvalue, $statevals, 1);
# Build datapoint address # Build datapoint address
my $objname = $hash->{ccuif}.'.'.$hash->{ccuaddr}.'.'.$statedatapoint; my $objname = $hash->{ccuif}.'.'.$hash->{ccuaddr}.'.'.$statedatapoint;