sebastianschwarz-patch-bridge_hash #8

Merged
marko merged 2 commits from sebastianschwarz-patch-bridge_hash into testing 2021-03-30 10:41:44 +00:00
Showing only changes of commit fc7fd0fe20 - Show all commits

View File

@ -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,