1
0
mirror of https://github.com/natekspencer/hacs-oasis_mini.git synced 2025-11-17 01:23:43 -05:00

Add temp fix for firmware 2.02 led issue

This commit is contained in:
Nathan Spencer
2025-03-13 04:28:29 +00:00
parent e2f5727669
commit 82a6a3cc1d
2 changed files with 30 additions and 18 deletions

View File

@@ -26,6 +26,14 @@ def _bit_to_bool(val: str) -> bool:
return val == "1"
def _parse_int(val: str) -> int:
"""Convert an int string to int."""
try:
return int(val)
except Exception:
return 0
def draw_svg(track: dict, progress: int, model_id: str) -> str | None:
"""Draw SVG."""
if track and (svg_content := track.get("svg_content")):