Alarms are typically set to specific times, but it's possible to create alerts based on the dynamic sunrise and sunset times in your area. This can be done with a Google Assistant routine on Android.

If you're interested in doing this on an iPhone, it's possible through a Shortcuts automation. On Android, however, we'll be utilizing a Google Assistant routine and the sunrise/sunset action. Keep in mind that this is not a typical "alarm," but more like an alert.

Related: How to Trigger Routines at Sunrise/Sunset on Google Assistant

First, we'll launch Google Assistant by either saying "Hey Google" or by swiping in from the bottom-left or -right corner.

swipe to open google assistant
Launching Google Assistant on Android

Next, tap your profile icon in the top-right corner to open the Assistant settings.

tap your profile icon to open the menu

Scroll through the list of settings and select "Routines."

select Routines in the list

Tap the "New" button at the top of the screen.

tap the New button

First, we'll need to decide how to trigger the routine. This is where sunrise and sunset will come in. Tap "Add Starter."

add starter to begin

Now, we can select "Sunrise/Sunset."

select sunrise/sunset

Choose whether you want the routine to start at "Sunrise" or "Sunset."

choose sunrise or sunset

In order for Google to know when sunrise and sunset occur, you'll need to choose your location first.

choose a location

You'll be able to choose from your saved locations or enter a new one. Tap "Done" when you've made the selection.

select a location and tap done

Next, you can decide how to use the sunrise/sunset time. Select "When the Sun Sets" or "When the Sun Rises."

when the sun sets

If you don't want the alarm to be exactly at sunrise or sunset, you can choose an offset here. Select "Done" when you've made a selection.

choose a time based on sunrise or sunset

The next thing to do is to decide which days the routine will run on. Tap the days to select them.

choose which days to run on

This process creates an alert on your Android device, but you can also choose to play the alert over any Google smart speakers.

choose a smart speaker for the alert

Lastly (and this is the important part if you want the alert on your Android device), toggle on "Get notified on your phone when this routine starts." Tap "Done" to finish.

choose a smart speaker for the alert

At the time of writing, Google requires a voice command to be associated with every routine. We won't be using this to start the routine, but it's still needed. This is also what the name of the routine will be. Tap "Add Voice Starter."

add voice starter

Enter a command phrase and tap "Done."

enter a command phrase and tap done

In order for the routine to run, it needs something to do. Tap "Add Action" to get started.

tap add action

Select "Communicate and Announce."

select communicate and annouce

Next, check the box for "Say Something" and tap the arrow icon.

check say something

Enter anything you'd like here. If you added a smart speaker, this is the phrase that Google Assistant will announce. Tap "Done" when you're ready.

enter a phrase and tap done

Select the "Done" button again on the next screen.

tap Done

Now, you can select "Save" to finalize the routine.

tap Save to finish

If you didn't select a speaker during setup, Google will ask to make sure that you don't want to use one. Tap "No Speaker" if you're sure.

tap No Speaker

A notification will ask you to add a speaker when this routine runs. You can ignore it, as it's not necessary for our situation.

That's it! The routine will now run at your desired time, and you will get a notification when it does. While this might not be quite the same as an "alarm," it does still alert you.