Add waterleak alert timestamp (#1162)

The T300 reports the timestamp of the last alarm, this exposes it to
consumers.
This commit is contained in:
Teemu R.
2024-10-18 13:18:12 +02:00
committed by GitHub
parent acd0202cab
commit 8a17752ae2
3 changed files with 568 additions and 534 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
from datetime import datetime
from enum import Enum
import pytest
@@ -15,6 +16,8 @@ waterleak = parametrize(
("feature", "prop_name", "type"),
[
("water_alert", "alert", int),
# Can be converted to 'datetime | None' after py3.9 support is dropped
("water_alert_timestamp", "alert_timestamp", (datetime, type(None))),
("water_leak", "status", Enum),
],
)