From 8fdbc3486c03f7b01dd37ee68e7870ad40077221 Mon Sep 17 00:00:00 2001 From: Dani Tulp Date: Sat, 2 Dec 2023 17:26:57 +0100 Subject: [PATCH] fix 8.2 deprecations (#82) --- src/Objects/DeviceProperties.php | 9 ++++++++- src/SeamClient.php | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Objects/DeviceProperties.php b/src/Objects/DeviceProperties.php index 24801b9..1623e6d 100644 --- a/src/Objects/DeviceProperties.php +++ b/src/Objects/DeviceProperties.php @@ -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 { @@ -74,4 +76,9 @@ public function __construct( $this->$key = $value; } } + + public function __get($name): mixed + { + return $this->$name ?? null; + } } diff --git a/src/SeamClient.php b/src/SeamClient.php index 8add21a..c95d585 100644 --- a/src/SeamClient.php +++ b/src/SeamClient.php @@ -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; @@ -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;