1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-27 10:46:38 +01:00

Add more detail to invalid rrule calendar error message (#92222)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Allen Porter
2023-04-29 00:57:30 -07:00
committed by GitHub
parent 4511e91cfd
commit 282d5f4488
@@ -164,7 +164,7 @@ def _validate_rrule(value: Any) -> str:
try:
rrulestr(value)
except ValueError as err:
raise vol.Invalid(f"Invalid rrule: {str(err)}") from err
raise vol.Invalid(f"Invalid rrule '{value}': {err}") from err
# Example format: FREQ=DAILY;UNTIL=...
rule_parts = dict(s.split("=", 1) for s in value.split(";"))