mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-27 10:31:59 +00:00
Add Async ADC PIR Support
- Add: Async function to get the current state of the ADC PIR sensor. - Fix: Move ADC PIR state and config into proper dataclasses. - Add: Add CLI test for passing bad quotes to feature set.
This commit is contained in:
@@ -68,6 +68,15 @@ async def test_motion_threshold(dev: IotDimmer, mocker: MockerFixture):
|
||||
)
|
||||
|
||||
|
||||
@dimmer_iot
|
||||
async def test_motion_realtime(dev: IotDimmer, mocker: MockerFixture):
|
||||
motion: Motion = dev.modules[Module.IotMotion]
|
||||
query_helper = mocker.patch("kasa.iot.IotDimmer._query_helper")
|
||||
|
||||
await motion.get_pir_state()
|
||||
query_helper.assert_called_with("smartlife.iot.PIR", "get_adc_value", None)
|
||||
|
||||
|
||||
@dimmer_iot
|
||||
def test_motion_feature(dev: IotDimmer):
|
||||
assert Module.IotMotion in dev.modules
|
||||
|
||||
Reference in New Issue
Block a user