diff --git a/src/Objects/DeviceProperties.php b/src/Objects/DeviceProperties.php index fb2c2cd..b90e3de 100644 --- a/src/Objects/DeviceProperties.php +++ b/src/Objects/DeviceProperties.php @@ -203,6 +203,9 @@ public static function from_json(mixed $json): DeviceProperties|null null, supports_offline_access_codes: $json->supports_offline_access_codes ?? null, + tado_metadata: isset($json->tado_metadata) + ? DeviceTadoMetadata::from_json($json->tado_metadata) + : null, tedee_metadata: isset($json->tedee_metadata) ? DeviceTedeeMetadata::from_json($json->tedee_metadata) : null, @@ -308,6 +311,7 @@ public function __construct( public bool|null $supports_accessory_keypad, public bool|null $supports_backup_access_code_pool, public bool|null $supports_offline_access_codes, + public DeviceTadoMetadata|null $tado_metadata, public DeviceTedeeMetadata|null $tedee_metadata, public float|null $temperature_celsius, public float|null $temperature_fahrenheit, diff --git a/src/Objects/DeviceTadoMetadata.php b/src/Objects/DeviceTadoMetadata.php new file mode 100644 index 0000000..562b9db --- /dev/null +++ b/src/Objects/DeviceTadoMetadata.php @@ -0,0 +1,25 @@ +device_name, + device_type: $json->device_type, + serial_number: $json->serial_number + ); + } + + public function __construct( + public string $device_name, + public string $device_type, + public string $serial_number + ) { + } +}