mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 19:36:02 +00:00
HMCCU: Fixed attribute room bug
git-svn-id: https://svn.fhem.de/fhem/trunk@25134 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b2256e5e1c
commit
1959228cd9
@ -57,7 +57,7 @@ my %HMCCU_CUST_CHN_DEFAULTS;
|
|||||||
my %HMCCU_CUST_DEV_DEFAULTS;
|
my %HMCCU_CUST_DEV_DEFAULTS;
|
||||||
|
|
||||||
# HMCCU version
|
# HMCCU version
|
||||||
my $HMCCU_VERSION = '5.0 212981850';
|
my $HMCCU_VERSION = '5.0 213001927';
|
||||||
|
|
||||||
# Timeout for CCU requests (seconds)
|
# Timeout for CCU requests (seconds)
|
||||||
my $HMCCU_TIMEOUT_REQUEST = 4;
|
my $HMCCU_TIMEOUT_REQUEST = 4;
|
||||||
@ -314,7 +314,7 @@ sub HMCCU_SetSCDatapoints ($$;$$);
|
|||||||
sub HMCCU_GetStateValues ($;$$);
|
sub HMCCU_GetStateValues ($;$$);
|
||||||
sub HMCCU_GetValidDatapoints ($$$$;$);
|
sub HMCCU_GetValidDatapoints ($$$$;$);
|
||||||
sub HMCCU_IsValidDatapoint ($$$$$);
|
sub HMCCU_IsValidDatapoint ($$$$$);
|
||||||
sub HMCCU_SetInitialAttributes ($$);
|
sub HMCCU_SetInitialAttributes ($$;$);
|
||||||
sub HMCCU_SetDefaultAttributes ($;$);
|
sub HMCCU_SetDefaultAttributes ($;$);
|
||||||
sub HMCCU_SetMultipleDatapoints ($$);
|
sub HMCCU_SetMultipleDatapoints ($$);
|
||||||
sub HMCCU_SetMultipleParameters ($$$;$);
|
sub HMCCU_SetMultipleParameters ($$$;$);
|
||||||
@ -1848,6 +1848,7 @@ sub HMCCU_Get ($@)
|
|||||||
|
|
||||||
# Setup attributes for new devices
|
# Setup attributes for new devices
|
||||||
my %ah = ();
|
my %ah = ();
|
||||||
|
HMCCU_SetInitialAttributes ($hash, undef, \%ah);
|
||||||
foreach my $da (keys %$h) { $ah{$da} = $h->{$da} if ($da !~ /^[psf]$/); }
|
foreach my $da (keys %$h) { $ah{$da} = $h->{$da} if ($da !~ /^[psf]$/); }
|
||||||
|
|
||||||
my $cs = HMCCU_CreateFHEMDevices ($hash, $devSpec, $devPrefix, $devSuffix, $devFormat, $defOpts, \%ah);
|
my $cs = HMCCU_CreateFHEMDevices ($hash, $devSpec, $devPrefix, $devSuffix, $devFormat, $defOpts, \%ah);
|
||||||
@ -6610,14 +6611,19 @@ sub HMCCU_GetAttribute ($$$$)
|
|||||||
# device attribute ccudef-attributes
|
# device attribute ccudef-attributes
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
sub HMCCU_SetInitialAttributes ($$)
|
sub HMCCU_SetInitialAttributes ($$;$)
|
||||||
{
|
{
|
||||||
my ($ioHash, $clName) = @_;
|
my ($ioHash, $clName, $ah) = @_;
|
||||||
|
|
||||||
my $ccudefAttributes = AttrVal ($ioHash->{NAME}, 'ccudef-attributes', 'room=Homematic');
|
my $ccudefAttributes = AttrVal ($ioHash->{NAME}, 'ccudef-attributes', '');
|
||||||
foreach my $a (split(';', $ccudefAttributes)) {
|
foreach my $a (split(';', $ccudefAttributes)) {
|
||||||
my ($an, $av) = split('=', $a);
|
my ($an, $av) = split('=', $a);
|
||||||
CommandAttr (undef, "$clName $an $av") if (defined($av));
|
if (defined($ah)) {
|
||||||
|
$ah->{$an} = $av;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CommandAttr (undef, "$clName $an $av") if (defined($av));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10590,11 +10596,10 @@ sub HMCCU_MaxHashEntries ($$)
|
|||||||
Example: Find devices with low batteries. Generate reading in HTML format.<br/>
|
Example: Find devices with low batteries. Generate reading in HTML format.<br/>
|
||||||
name=battery,filter:name=.*,read:(LOWBAT|LOW_BAT),if:any=yes,else:no,prefix:batt_,coll:NAME!All batteries OK,html:/home/battery.cfg<br/>
|
name=battery,filter:name=.*,read:(LOWBAT|LOW_BAT),if:any=yes,else:no,prefix:batt_,coll:NAME!All batteries OK,html:/home/battery.cfg<br/>
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>ccudef-attributes {<attrName>=<attrValue>[;...] | none}</b><br/>
|
<li><b>ccudef-attributes <attrName>=<attrValue>[;...]</b><br/>
|
||||||
Define attributes which are assigned to newly defined HMCCUDEV or HMCCUCHN devices. By default the following
|
Define attributes which are assigned to newly defined HMCCUDEV or HMCCUCHN devices. By default no
|
||||||
attributes will be assigned:<br/>
|
attributes will be assigned. To assign every new device to room Homematic, set this attribute
|
||||||
room=Homematic<br/>
|
to 'room=Homematic'.
|
||||||
If attribute is set to 'none', no attributes will be assigned to new devices.
|
|
||||||
</li><br/>
|
</li><br/>
|
||||||
<li><b>ccudef-hmstatevals <subst-rule[;...]></b><br/>
|
<li><b>ccudef-hmstatevals <subst-rule[;...]></b><br/>
|
||||||
Set global rules for calculation of reading hmstate.
|
Set global rules for calculation of reading hmstate.
|
||||||
|
@ -30,7 +30,7 @@ sub HMCCUCHN_Set ($@);
|
|||||||
sub HMCCUCHN_Get ($@);
|
sub HMCCUCHN_Get ($@);
|
||||||
sub HMCCUCHN_Attr ($@);
|
sub HMCCUCHN_Attr ($@);
|
||||||
|
|
||||||
my $HMCCUCHN_VERSION = '5.0 212981850';
|
my $HMCCUCHN_VERSION = '5.0 213001927';
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Initialize module
|
# Initialize module
|
||||||
|
@ -31,7 +31,7 @@ sub HMCCUDEV_Set ($@);
|
|||||||
sub HMCCUDEV_Get ($@);
|
sub HMCCUDEV_Get ($@);
|
||||||
sub HMCCUDEV_Attr ($@);
|
sub HMCCUDEV_Attr ($@);
|
||||||
|
|
||||||
my $HMCCUDEV_VERSION = '5.0 212981850';
|
my $HMCCUDEV_VERSION = '5.0 213001927';
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Initialize module
|
# Initialize module
|
||||||
|
Loading…
x
Reference in New Issue
Block a user