mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-09-19 20:43:52 +00:00
Add LastAlertDetection module for smartcam devices (#1762)
Some checks failed
Stale / stale (push) Has been cancelled
CI / Perform Lint Checks (3.14) (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
Some checks failed
Stale / stale (push) Has been cancelled
CI / Perform Lint Checks (3.14) (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
Add a `LastAlertDetection` module for SMARTCAM devices exposing `getLastAlarmInfo` as two `Info` sensor features: - `last_alert_timestamp` — tz-aware `datetime` of the last alert, `None` when the device has never detected anything (`last_alarm_time` is `""` or `"0"` on such devices, and an unexpected value is also mapped to `None` - `last_alert_type` — `LastAlertType` enum (`Motion`; `Unknown` fallback with a one-time warning per unknown raw value), `None` when unset.
This commit is contained in:
@@ -10,6 +10,7 @@ from .childsetup import ChildSetup
|
||||
from .device import DeviceModule
|
||||
from .glassdetection import GlassDetection
|
||||
from .homekit import HomeKit
|
||||
from .lastalertdetection import LastAlertDetection
|
||||
from .led import Led
|
||||
from .lensmask import LensMask
|
||||
from .linecrossingdetection import LineCrossingDetection
|
||||
@@ -33,6 +34,7 @@ __all__ = [
|
||||
"ChildSetup",
|
||||
"DeviceModule",
|
||||
"GlassDetection",
|
||||
"LastAlertDetection",
|
||||
"Led",
|
||||
"LineCrossingDetection",
|
||||
"MeowDetection",
|
||||
|
||||
Reference in New Issue
Block a user