mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
RESIDENTS: use group attribute as default for realname
git-svn-id: https://svn.fhem.de/fhem/trunk@14062 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d67142ee5f
commit
7258542f91
@ -350,7 +350,7 @@ sub RESIDENTS_UpdateReadings (@) {
|
||||
$state_guestDev++;
|
||||
|
||||
my $guestName =
|
||||
AttrVal( $guest, AttrVal( $guest, "rg_realname", "alias" ), "" );
|
||||
AttrVal( $guest, AttrVal( $guest, "rg_realname", "group" ), "" );
|
||||
|
||||
Log3 $name, 5, "RESIDENTS $name: considering $guest for state change";
|
||||
|
||||
|
@ -219,7 +219,7 @@ sub GUEST_Initialize($) {
|
||||
<b>rg_presenceDevices</b> - take over presence state from any other FHEM device. Separate more than one device with comma meaning ALL of them need to be either present or absent to trigger update of this ROOMMATE device. You may optionally add a reading name separated by :, otherwise reading name presence and state will be considered.
|
||||
</li>
|
||||
<li>
|
||||
<b>rg_realname</b> - whenever GUEST wants to use the realname it uses the value of attribute alias or group; defaults to alias
|
||||
<b>rg_realname</b> - whenever GUEST wants to use the realname it uses the value of attribute alias or group; defaults to group
|
||||
</li>
|
||||
<li>
|
||||
<b>rg_showAllStates</b> - states 'asleep' and 'awoken' are hidden by default to allow simple gotosleep process via devStateIcon; defaults to 0
|
||||
@ -519,7 +519,7 @@ sub GUEST_Initialize($) {
|
||||
<b>rg_presenceDevices</b> - übernehmen des presence Status von einem anderen FHEM Device. Bei mehreren Devices diese mit Komma trennen, um ein Update des GUEST Devices auszulösen, sobald ALLE Devices entweder absent oder present sind. Optional kann auch durch : abgetrennt ein Reading Name angegeben werden, ansonsten werden die Readings presence und state berücksichtigt.
|
||||
</li>
|
||||
<li>
|
||||
<b>rg_realname</b> - wo immer GUEST den richtigen Namen verwenden möchte nutzt es den Wert des Attributs alias oder group; Standard ist alias
|
||||
<b>rg_realname</b> - wo immer GUEST den richtigen Namen verwenden möchte nutzt es den Wert des Attributs alias oder group; Standard ist group
|
||||
</li>
|
||||
<li>
|
||||
<b>rg_showAllStates</b> - die Status 'asleep' und 'awoken' sind normalerweise nicht immer sichtbar, um einen einfachen Zubettgeh-Prozess über das devStateIcon Attribut zu ermöglichen; Standard ist 0
|
||||
|
@ -1685,35 +1685,27 @@ m/^((?:next[rR]un)?\s*(off|OFF|([\+\-])?(([0-9]{2}):([0-9]{2})|([1-9]+[0-9]*)))?
|
||||
my $macroNameGotosleep = "Macro_" . $wakeupUserdevice . "_gotosleep";
|
||||
my $macroNameAsleep = "Macro_" . $wakeupUserdevice . "_asleep";
|
||||
my $macroNameAwoken = "Macro_" . $wakeupUserdevice . "_awoken";
|
||||
my $TYPE = GetType($wakeupUserdevice);
|
||||
my $prefix = RESIDENTStk_GetPrefixFromType($wakeupUserdevice);
|
||||
|
||||
my $wakeupUserdeviceRealname = "Bewohner";
|
||||
|
||||
if ( IsDevice( $wakeupUserdevice, "ROOMMATE" ) ) {
|
||||
if ( $TYPE eq "RESIDENTS" ) {
|
||||
$wakeupUserdeviceRealname = AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ),
|
||||
AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ), "rr_realname",
|
||||
"group"
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ),
|
||||
$prefix . "realname", "alias"
|
||||
),
|
||||
$wakeupUserdeviceRealname
|
||||
);
|
||||
}
|
||||
elsif ( IsDevice( $wakeupUserdevice, "GUEST" ) ) {
|
||||
else {
|
||||
$wakeupUserdeviceRealname = AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ),
|
||||
AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ), "rg_realname",
|
||||
"alias"
|
||||
),
|
||||
$wakeupUserdeviceRealname
|
||||
);
|
||||
}
|
||||
elsif ( IsDevice( $wakeupUserdevice, "RESIDENTS" ) ) {
|
||||
$wakeupUserdeviceRealname = AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ),
|
||||
AttrVal(
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ), "rgr_realname",
|
||||
"alias"
|
||||
AttrVal( $NAME, "wakeupUserdevice", "" ),
|
||||
$prefix . "realname", "group"
|
||||
),
|
||||
$wakeupUserdeviceRealname
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user