Skip to content

Commit

Permalink
fix: Merge pull request #81 from seamapi/fix-online_access_codes_enabled
Browse files Browse the repository at this point in the history
fix offline access codes enabled
  • Loading branch information
itelo authored Nov 21, 2023
2 parents 29a1669 + 8367a9f commit 576bc76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Objects/DeviceProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static function from_json(mixed $json): DeviceProperties|null
"available_hvac_mode_settings" => $json->available_hvac_mode_settings ?? null,
"can_enable_automatic_cooling" => $json->can_enable_automatic_cooling ?? null,
"can_enable_automatic_heating" => $json->can_enable_automatic_heating ?? null,

"offline_access_codes_enabled" => $json->offline_access_codes_enabled ?? null,
"online_access_codes_enabled" => $json->online_access_codes_enabled ?? null,
]);

return new self($props);
Expand Down
2 changes: 2 additions & 0 deletions tests/DevicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public function testGetAndListDevices(): void
$manufacturer = $devices[0]->properties->manufacturer;
$device = $seam->devices->get(name: $device_name);
$this->assertTrue($device->properties->manufacturer === $manufacturer);
$this->assertNotNull($device->properties->offline_access_codes_enabled);
$this->assertNotNull($device->properties->online_access_codes_enabled);

$seam->devices->delete(device_id: $device_id);
try {
Expand Down

0 comments on commit 576bc76

Please sign in to comment.