From 286730165d4182ca46c795c5a41ce13d032bc028 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Fri, 6 Feb 2026 12:27:16 +0100 Subject: [PATCH] Simplify sun condition schema by re-using an existing type (#161894) Co-authored-by: Franck Nijhof --- homeassistant/components/sun/condition.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/sun/condition.py b/homeassistant/components/sun/condition.py index 9d4dc0764ee..40a6eb652c4 100644 --- a/homeassistant/components/sun/condition.py +++ b/homeassistant/components/sun/condition.py @@ -26,9 +26,7 @@ from homeassistant.util import dt as dt_util _OPTIONS_SCHEMA_DICT: dict[vol.Marker, Any] = { vol.Optional("before"): cv.sun_event, vol.Optional("before_offset"): cv.time_period, - vol.Optional("after"): vol.All( - vol.Lower, vol.Any(SUN_EVENT_SUNSET, SUN_EVENT_SUNRISE) - ), + vol.Optional("after"): cv.sun_event, vol.Optional("after_offset"): cv.time_period, }