diff --git a/custom_components/grocy/json_encode.py b/custom_components/grocy/json_encode.py index a4482a9..a4d49c2 100644 --- a/custom_components/grocy/json_encode.py +++ b/custom_components/grocy/json_encode.py @@ -1,5 +1,6 @@ import json from datetime import datetime +from datetime import date from pathlib import Path from typing import Any @@ -17,6 +18,8 @@ def default(self, o: Any) -> Any: return o.barcode if isinstance(o, datetime): return o.isoformat() + if isinstance(o, date): + return o.isoformat() if isinstance(o, set): return list(o) if isinstance(o, Path):