mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-25 22:09:21 +00:00
30_HUEBridge.pm: fixed warnigns & crash for old bridge firmware versions
git-svn-id: https://svn.fhem.de/fhem/trunk@12610 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
55cbad7733
commit
468fc57491
@ -175,8 +175,10 @@ sub HUEBridge_fillBridgeInfo($$)
|
||||
$hash->{swversion} = $config->{swversion};
|
||||
$hash->{apiversion} = $config->{apiversion};
|
||||
|
||||
my @l = split( '\.', $config->{apiversion} );
|
||||
$hash->{helper}{apiversion} = ($l[0] << 16) + ($l[1] << 8) + $l[2];
|
||||
if( $hash->{apiversion} ) {
|
||||
my @l = split( '\.', $config->{apiversion} );
|
||||
$hash->{helper}{apiversion} = ($l[0] << 16) + ($l[1] << 8) + $l[2];
|
||||
}
|
||||
|
||||
if( !defined($config->{'linkbutton'})
|
||||
&& !defined($attr{$name}{icon}) ) {
|
||||
@ -815,11 +817,16 @@ HUEBridge_Parse($$)
|
||||
if( my $utc = $config->{UTC} ) {
|
||||
substr( $utc, 10, 1, '_' );
|
||||
|
||||
my $localtime = $config->{localtime};
|
||||
$localtime = TimeNow() if( $localtime eq 'none' );
|
||||
substr( $localtime, 10, 1, '_' );
|
||||
if( my $localtime = $config->{localtime} ) {
|
||||
$localtime = TimeNow() if( $localtime eq 'none' );
|
||||
substr( $localtime, 10, 1, '_' );
|
||||
|
||||
$hash->{helper}{offsetUTC} = SVG_time_to_sec($localtime) - SVG_time_to_sec($utc);
|
||||
$hash->{helper}{offsetUTC} = SVG_time_to_sec($localtime) - SVG_time_to_sec($utc);
|
||||
|
||||
} else {
|
||||
Log3 $name, 2, "$name: missing localtime configuration";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if( defined( $config->{swupdate} ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user