mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-07-11 01:42:05 +00:00
Fix SMARTCAM Time module and update tests (#1659)
Update SmartCam time handling to apply timezone-only changes with explicit warnings, while keeping common time and CLI tests focused on devices that support setting clock time and adding SmartCam-specific coverage for the special behavior.
This commit is contained in:
@@ -16,6 +16,8 @@ from kasa.module import _get_feature_attribute
|
||||
from .device_fixtures import (
|
||||
bulb_iot,
|
||||
bulb_smart,
|
||||
device_iot,
|
||||
device_smart,
|
||||
dimmable_iot,
|
||||
dimmer_iot,
|
||||
get_parent_and_child_modules,
|
||||
@@ -63,6 +65,7 @@ light_preset_smart = parametrize(
|
||||
light_preset = parametrize_combine([light_preset_smart, bulb_iot])
|
||||
|
||||
light = parametrize_combine([bulb_smart, bulb_iot, dimmable])
|
||||
time = parametrize_combine([device_smart, device_iot])
|
||||
|
||||
temp_control_smart = parametrize(
|
||||
"has temp control smart",
|
||||
@@ -422,6 +425,7 @@ async def test_thermostat(dev: Device, mocker: MockerFixture):
|
||||
assert therm_mod.temperature_unit == "fahrenheit"
|
||||
|
||||
|
||||
@time
|
||||
async def test_set_time(dev: Device):
|
||||
"""Test setting the device time."""
|
||||
time_mod = dev.modules[Module.Time]
|
||||
|
||||
Reference in New Issue
Block a user