Enable and convert to future annotations (#838)

This commit is contained in:
Steven B
2024-04-17 14:39:24 +01:00
committed by GitHub
parent 82d92aeea5
commit 203bd79253
59 changed files with 562 additions and 462 deletions

View File

@@ -1,7 +1,8 @@
"""Implementation of the motion detection (PIR) module found in some dimmers."""
from __future__ import annotations
from enum import Enum
from typing import Optional
from ...exceptions import KasaException
from ..iotmodule import IotModule
@@ -43,7 +44,7 @@ class Motion(IotModule):
return await self.call("set_enable", {"enable": int(state)})
async def set_range(
self, *, range: Optional[Range] = None, custom_range: Optional[int] = None
self, *, range: Range | None = None, custom_range: int | None = None
):
"""Set the range for the sensor.