Improve learning discovery and dashboard i18n
This commit is contained in:
@@ -120,6 +120,28 @@ def test_normalize_state_history_keeps_categorical_changes() -> None:
|
||||
assert [point.state for point in result[0].points] == ["off", "on"]
|
||||
|
||||
|
||||
def test_normalize_state_history_keeps_light_attribute_changes() -> None:
|
||||
result = normalize_state_history_payload(
|
||||
[
|
||||
[
|
||||
{
|
||||
"entity_id": "light.office",
|
||||
"state": "on",
|
||||
"attributes": {"brightness": 80, "friendly_name": "Office"},
|
||||
"last_changed": "2026-06-01T08:00:00+00:00",
|
||||
},
|
||||
{
|
||||
"state": "on",
|
||||
"attributes": {"brightness": 120, "friendly_name": "Office"},
|
||||
"last_changed": "2026-06-01T08:05:00+00:00",
|
||||
},
|
||||
]
|
||||
]
|
||||
)
|
||||
|
||||
assert [point.attributes["brightness"] for point in result[0].points] == [80, 120]
|
||||
|
||||
|
||||
def test_normalize_logbook_preserves_action_origin() -> None:
|
||||
result = normalize_logbook_payload(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user