Skip to content

Commit

Permalink
old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Apr 6, 2024
1 parent 3165454 commit 85c23d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,12 +1345,15 @@ def mock_area_registry(
area_kwargs = {
"name": "Test Area",
"normalized_name": "test-area",
"aliases": {},
"id": "test-area",
"picture": None,
}
year, month = (int(x) for x in ha_version.split(".")[:2])
if year >= 2024 and month >= 3:
if year <= 2022 and month <= 12:
area_kwargs["aliases"] = {}
elif year >= 2024 and month >= 2:
area_kwargs["icon"] = None
elif year >= 2024 and month >= 3:
area_kwargs["icon"] = None
area_kwargs["floor_id"] = "test-floor"
registry.areas = ar.AreaRegistryItems()
Expand Down

0 comments on commit 85c23d2

Please sign in to comment.