mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-23 11:43:34 +00:00
21 lines
441 B
Python
21 lines
441 B
Python
"""Tests for smart camera devices."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from kasa import Device, DeviceType
|
|
|
|
from ..conftest import device_smartcamera
|
|
|
|
|
|
@device_smartcamera
|
|
async def test_state(dev: Device):
|
|
if dev.device_type is DeviceType.Hub:
|
|
pytest.skip("Hubs cannot be switched on and off")
|
|
|
|
state = dev.is_on
|
|
await dev.set_state(not state)
|
|
await dev.update()
|
|
assert dev.is_on is not state
|