fix get residentsStatus bug
This commit is contained in:
parent
9d1d626fc8
commit
d4038a110f
@ -44,7 +44,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use FHEM::Meta;
|
use FHEM::Meta;
|
||||||
|
|
||||||
my $version = '0.5.99.12';
|
my $version = '0.5.99.15';
|
||||||
|
|
||||||
sub AutoShuttersControl_Initialize($) {
|
sub AutoShuttersControl_Initialize($) {
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
@ -4213,10 +4213,8 @@ BEGIN {
|
|||||||
sub _getRoommateStatus {
|
sub _getRoommateStatus {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $roommate = $self->{roommate};
|
my $roommate = $self->{roommate};
|
||||||
my $default = $self->{defaultarg};
|
|
||||||
|
|
||||||
$default = 'none' if ( not defined($default) );
|
return ReadingsVal( $roommate, $shutters->getRoommatesReading, 'none' );
|
||||||
return ReadingsVal( $roommate, $shutters->getRoommatesReading, $default );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _getRoommateLastStatus {
|
sub _getRoommateLastStatus {
|
||||||
@ -4569,7 +4567,6 @@ sub _getResidentsDev {
|
|||||||
FHEM::AutoShuttersControl::GetAttrValues( $name, 'ASC_residentsDev',
|
FHEM::AutoShuttersControl::GetAttrValues( $name, 'ASC_residentsDev',
|
||||||
'none' );
|
'none' );
|
||||||
|
|
||||||
return $device if ( $device eq 'none' );
|
|
||||||
$self->{ASC_residentsDev}->{device} = $device;
|
$self->{ASC_residentsDev}->{device} = $device;
|
||||||
$self->{ASC_residentsDev}->{reading} =
|
$self->{ASC_residentsDev}->{reading} =
|
||||||
( $reading ne 'none' ? $reading : 'state' );
|
( $reading ne 'none' ? $reading : 'state' );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user