From 1fc42b4e4e755bbe73cbb1a779cd5bc394386471 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 29 Oct 2026 19:36:15 -0700 Subject: [PATCH] Fix the sed which was getting the sunset time format and failing rather than the actual time (since sunset is mentioned twice in the response). --- sunset-alarm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sunset-alarm b/sunset-alarm index 09b61b7..0de1218 100755 --- a/sunset-alarm +++ b/sunset-alarm @@ -74,7 +74,7 @@ fetch_sunset_time() { fi # Extract sunset timestamp like "2025-06-15T19:32:00" - SUNSET_RAW=$(echo "$RESPONSE" | grep -o '"sunset":"[^"]*"' | head -1 | sed 's/.*://"//;s/"$//') + SUNSET_RAW=$(echo "$RESPONSE" | jq -r '.daily.sunset[0]') if [ -z "$SUNSET_RAW" ]; then return 1