Skip to content

Commit

Permalink
Metadata update
Browse files Browse the repository at this point in the history
  • Loading branch information
amitfin committed Oct 28, 2024
1 parent ddde975 commit a0ea087
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion custom_components/oref_alert/areas_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ async def _check(self, _: datetime | None = None) -> None:
+ ",".join([f'"{area}"' for area in new])
)
if old or new:
issue_id = "upgrade_required"
ir.async_delete_issue(self._hass, DOMAIN, issue_id)
ir.async_create_issue(
self._hass,
DOMAIN,
f"{DOMAIN}_upgrade_required",
issue_id,
is_fixable=False,
learn_more_url="https://github.com/amitfin/oref_alert",
severity=ir.IssueSeverity.WARNING,
Expand Down
1 change: 1 addition & 0 deletions custom_components/oref_alert/metadata/area_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@
"כלא דמון": {"lat": 32.7332, "long": 35.0234},
"כליל": {"lat": 32.9836, "long": 35.1997},
"כלנית": {"lat": 32.8753, "long": 35.454},
"כמאנה": {"lat": 32.9085, "long": 35.3358},
"כמהין": {"lat": 30.9103, "long": 34.4307},
"כמון": {"lat": 32.9125, "long": 35.3555},
"כנות": {"lat": 31.8022, "long": 34.7509},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@
"כלא דמון": 60,
"כליל": 30,
"כלנית": 60,
"כמאנה": 30,
"כמהין": 60,
"כמון": 30,
"כנות": 60,
Expand Down
1 change: 1 addition & 0 deletions custom_components/oref_alert/metadata/areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@
"כלא דמון",
"כליל",
"כלנית",
"כמאנה",
"כמהין",
"כמון",
"כנות",
Expand Down
1 change: 1 addition & 0 deletions custom_components/oref_alert/metadata/areas_and_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@
"כלא דמון",
"כליל",
"כלנית",
"כמאנה",
"כמהין",
"כמון",
"כנות",
Expand Down
1 change: 1 addition & 0 deletions custom_components/oref_alert/metadata/district_to_areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"כחל",
"כישור",
"כליל",
"כמאנה",
"כמון",
"כסרא סמיע",
"כפר הנשיא",
Expand Down
2 changes: 2 additions & 0 deletions custom_components/oref_alert/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ add_sensor:
- כלא דמון
- כליל
- כלנית
- כמאנה
- כמהין
- כמון
- כנות
Expand Down Expand Up @@ -2142,6 +2143,7 @@ synthetic_alert:
- כלא דמון
- כליל
- כלנית
- כמאנה
- כמהין
- כמון
- כנות
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"אל-ח'וואלד מערב": {"lat": 32.771, "long": 35.1363},
"אשדוד -יא,יב,טו,יז,מרינה,סיטי": {"lat": 31.7836, "long": 34.6332}, # noqa: RUF001
"אזור תעשייה מילואות צפון": {"lat": 33.0684, "long": 35.1102},
"כמאנה": {"lat": 32.9085, "long": 35.3358},
}


Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/GetCitiesMix.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/test_areas_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def test_areas_check_failure(
assert len(repairs) == 1
assert repairs[0].data["action"] == "create"
assert repairs[0].data["domain"] == DOMAIN
assert repairs[0].data["issue_id"] == f"{DOMAIN}_upgrade_required"
assert repairs[0].data["issue_id"] == "upgrade_required"


async def test_areas_check_pass(
Expand Down

0 comments on commit a0ea087

Please sign in to comment.