Merge pull request 'sebastianschwarz-patch-bridge_hash' (#8) from sebastianschwarz-patch-bridge_hash into testing

Reviewed-on: #8
This commit is contained in:
Marko Oldenburg 2021-03-30 12:41:43 +02:00
commit eeea355524

View File

@ -833,9 +833,6 @@ sub WriteReadings {
$v = encode_utf8($v);
readingsBulkUpdateIfChanged( $hash, $t, $v );
}
readingsBulkUpdateIfChanged( $hash, 'zones',
scalar( @{ $decode_json->{zones} } ) );
}
elsif ($decode_json->{id} ne $hash->{helper}{locations_id}
&& ref( $decode_json->{abilities} ) eq 'ARRAY'
@ -859,11 +856,7 @@ sub WriteReadings {
{name} . '-' . $t,
$v
)
if (
$decode_json->{abilities}[0]{properties}[$properties]
{name} ne 'ethernet_status'
|| $decode_json->{abilities}[0]{properties}
[$properties]{name} ne 'wifi_status' );
if ($decode_json->{abilities}[0]{properties}[$properties]{name} !~ /ethernet_status|wifi_status/ );
if (
(
@ -890,8 +883,10 @@ sub WriteReadings {
elsif ( $decode_json->{abilities}[0]{properties}
[$properties]{name} eq 'wifi_status' )
{
#TODO: read valies if bridge connected to wifi
readingsBulkUpdateIfChanged( $hash,
'wifi_status-ssid', $v->{ssid} );
'wifi_status-ssid', $v->{ssid} )
if (ref($v->{ssid}) ne 'HASH');
readingsBulkUpdateIfChanged( $hash,
'wifi_status-mac', $v->{mac} );
readingsBulkUpdateIfChanged( $hash,
@ -1297,7 +1292,6 @@ sub DeletePassword {
<li>name - Name of your Garden Default My Garden</li>
<li>state - State of the Bridge</li>
<li>token - SessionID</li>
<li>zones - </li>
</ul>
<br><br>
<a name="GardenaSmartBridgeset"></a>
@ -1359,7 +1353,6 @@ sub DeletePassword {
<li>name - Name für das Grundst&uuml;ck Default My Garden</li>
<li>state - Status der Bridge</li>
<li>token - SessionID</li>
<li>zones - </li>
</ul>
<br><br>
<a name="GardenaSmartBridgeset"></a>