Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Home Connect Device/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ public function ReceiveData($String)
$this->SendDebug('ReceiveData', $String, 0);
$data = json_decode($String, true);
switch ($data['Event']) {
case 'DISCONNECTED':
if (@IPS_GetObjectIDByIdent('OperationState', $this->InstanceID)) {
// Offline device set OperationState to Inactive
$this->SetValue('OperationState','BSH.Common.EnumType.OperationState.Inactive');
}
case 'CONNECTED':
// Device comes online, request states
$this->createStates();
break;
case 'STATUS':
case 'NOTIFY':
$items = json_decode($data['Data'], true)['items'];
Expand Down
Loading