Skip to content

Commit

Permalink
✨ Rename default level
Browse files Browse the repository at this point in the history
This is a recurring question from users, let's make it more explicit.

Fix #82
  • Loading branch information
kamaradclimber committed Nov 22, 2024
1 parent 67b8f53 commit 29dd886
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions custom_components/vigieau/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def _handle_coordinator_update(self) -> None:

self._attr_icon = {
"vigilance": "mdi:water-check",
"vigilance (pas de restriction)": "mdi:water-check",
"alerte": "mdi:water-alert",
"alerte_renforcée": "mdi:water-remove",
"alerte_renforcee": "mdi:water-remove",
Expand Down
4 changes: 2 additions & 2 deletions custom_components/vigieau/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ async def get_data(
and re.match("Aucune zone.+en vigueur", (await resp.json())["message"])
):
_LOGGER.debug(f"Vigieau replied with no restriction, faking data")
data = {"niveauGravite": "vigilance", "usages": [], "arrete": {}}
data = {"niveauGravite": "vigilance (pas de restriction)", "usages": [], "arrete": {}}
elif resp.status == 200 and (await resp.text()) == "":
_LOGGER.debug(f"Vigieau replied with no data at all, faking data")
data = {"niveauGravite": "vigilance", "usages": [], "arrete": {}}
data = {"niveauGravite": "vigilance (pas de restriction)", "usages": [], "arrete": {}}
elif resp.status in range(200, 300):
data = await resp.json()
else:
Expand Down

0 comments on commit 29dd886

Please sign in to comment.