Skip to content

Commit

Permalink
Fix Temperatur
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnittcher committed Aug 21, 2024
1 parent f877d9d commit c00e514
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Gen3Shelly1Mini/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ public function ReceiveData($JSONString)
if (array_key_exists('freq', $Payload)) {
$this->SetValue('Frequency', $Payload['freq']);
}
if (array_key_exists('temperature', $switch)) {
if (array_key_exists('tC', $switch['temperature'])) {
$this->SetValue('DeviceTemperature', $switch['temperature']['tC']);
if (array_key_exists('temperature', $Payload)) {
if (array_key_exists('tC', $Payload['temperature'])) {
$this->SetValue('DeviceTemperature', $Payload['temperature']['tC']);
}
}
if (array_key_exists('aenergy', $Payload)) {
Expand Down

0 comments on commit c00e514

Please sign in to comment.