fix HASH
This commit is contained in:
parent
624010dd37
commit
fc7fd0fe20
@ -859,11 +859,7 @@ sub WriteReadings {
|
|||||||
{name} . '-' . $t,
|
{name} . '-' . $t,
|
||||||
$v
|
$v
|
||||||
)
|
)
|
||||||
if (
|
if ($decode_json->{abilities}[0]{properties}[$properties]{name} !~ /ethernet_status|wifi_status/ );
|
||||||
$decode_json->{abilities}[0]{properties}[$properties]
|
|
||||||
{name} ne 'ethernet_status'
|
|
||||||
|| $decode_json->{abilities}[0]{properties}
|
|
||||||
[$properties]{name} ne 'wifi_status' );
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
@ -890,8 +886,10 @@ sub WriteReadings {
|
|||||||
elsif ( $decode_json->{abilities}[0]{properties}
|
elsif ( $decode_json->{abilities}[0]{properties}
|
||||||
[$properties]{name} eq 'wifi_status' )
|
[$properties]{name} eq 'wifi_status' )
|
||||||
{
|
{
|
||||||
|
#TODO: read valies if bridge connected to wifi
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
readingsBulkUpdateIfChanged( $hash,
|
||||||
'wifi_status-ssid', $v->{ssid} );
|
'wifi_status-ssid', $v->{ssid} )
|
||||||
|
if (ref($v->{ssid}) ne 'HASH');
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
readingsBulkUpdateIfChanged( $hash,
|
||||||
'wifi_status-mac', $v->{mac} );
|
'wifi_status-mac', $v->{mac} );
|
||||||
readingsBulkUpdateIfChanged( $hash,
|
readingsBulkUpdateIfChanged( $hash,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user