Skip to content

Commit

Permalink
fix 8.2 deprecations (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniTulp authored Dec 2, 2023
1 parent 3602e8b commit 8fdbc34
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Objects/DeviceProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

namespace Seam\Objects;

use stdClass;

use function Seam\filter_out_null_params;

class DeviceProperties
class DeviceProperties extends stdClass
{
public static function from_json(mixed $json): DeviceProperties|null
{
Expand Down Expand Up @@ -74,4 +76,9 @@ public function __construct(
$this->$key = $value;
}
}

public function __get($name): mixed
{
return $this->$name ?? null;
}
}
5 changes: 5 additions & 0 deletions src/SeamClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class SeamClient
public LocksClient $locks;
public ClientSessionsClient $client_sessions;
public NoiseSensorsClient $noise_sensors;
public ThermostatsClient $thermostats;

public string $api_key;
public HTTPClient $client;
Expand Down Expand Up @@ -1243,6 +1244,10 @@ public function delete(
class ThermostatsClient
{
private SeamClient $seam;


public ClimateSettingSchedulesClient $climate_setting_schedules;

public function __construct(SeamClient $seam)
{
$this->seam = $seam;
Expand Down

0 comments on commit 8fdbc34

Please sign in to comment.