mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
48_BlinkCamera: Correction for JSON values on enabled - true/false 1/0
git-svn-id: https://svn.fhem.de/fhem/trunk@22530 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c490214b71
commit
2e481dc090
@ -58,11 +58,10 @@
|
||||
# New default 1 for homescreenv3 - old apis deactivated
|
||||
# Disclaimer for API changes
|
||||
# Corrected handling of prefered network attribute
|
||||
|
||||
# Adapt active handling to new format
|
||||
# Add new reading Enabled per camera with doc - showing enabled value
|
||||
|
||||
#
|
||||
# Correction for JSON values - true/false 1/0
|
||||
#
|
||||
#
|
||||
#
|
||||
@ -1459,8 +1458,11 @@ sub BlinkCamera_ParseHomescreen($$$)
|
||||
foreach my $device ( @$camList ) {
|
||||
if ( $device->{network_id} eq $network ) {
|
||||
my $active = "disabled";
|
||||
$active = "armed" if ( $device->{enabled} eq "true" );
|
||||
if ( defined( $device->{enabled} ) ) {
|
||||
$active = "armed" if ( $device->{enabled} == 1 );
|
||||
$active = "armed" if ( $device->{enabled} eq "true" );
|
||||
# $active = "armed" if ( $device->{enabled} );
|
||||
}
|
||||
|
||||
$readUpdates->{"networkCamera".$device->{id}} = $device->{name}.":".$active;
|
||||
$readUpdates->{"networkCamera".$device->{id}."Name"} = $device->{name};
|
||||
@ -1507,8 +1509,11 @@ sub BlinkCamera_ParseHomescreen($$$)
|
||||
foreach my $device ( @$owlList ) {
|
||||
if ( $device->{network_id} eq $network ) {
|
||||
my $active = "disabled";
|
||||
$active = "armed" if ( $device->{enabled} eq "true" );
|
||||
# $active = "armed" if ( $device->{enabled} );
|
||||
if ( defined( $device->{enabled} ) ) {
|
||||
$active = "armed" if ( $device->{enabled} == 1 );
|
||||
$active = "armed" if ( $device->{enabled} eq "true" );
|
||||
# $active = "armed" if ( $device->{enabled} );
|
||||
}
|
||||
|
||||
$readUpdates->{"networkCamera".$device->{id}} = $device->{name}.":".$active;
|
||||
$readUpdates->{"networkCamera".$device->{id}."Name"} = $device->{name};
|
||||
|
Loading…
x
Reference in New Issue
Block a user