<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Aidan Maurin-Jones | Apple Home</title><link>https://blog.aidanmaurinjones.com/tags/apple-home/</link><description>Apple Home</description><language>en</language><atom:link href="https://blog.aidanmaurinjones.com/tags/apple-home/index.xml" rel="self" type="application/rss+xml"/><item><title>It Is Time to Wake Up</title><link>https://blog.aidanmaurinjones.com/posts/it-is-time-to-wake-up/</link><guid isPermaLink="true">https://blog.aidanmaurinjones.com/posts/it-is-time-to-wake-up/</guid><pubDate>Sat, 17 Oct 2026 00:00:00 +0000</pubDate><description><![CDATA[<p><em>How I used Home Assistant, Google Home, and Apple Home to automate one of the most annoying parts of my morning routine.</em></p>
<p>I am not a morning person.</p>
<p>Unfortunately, that is no one&rsquo;s problem except my own.</p>
<p>For years, I&rsquo;ve relied on a rather excessive collection of alarms to get myself out of bed in the morning. Not one alarm. Not two alarms. An entire series of alarms, spaced fifteen minutes apart, designed to make absolutely certain that I eventually acknowledge the unfortunate reality that I have to go to work.</p>
<p>It&rsquo;s not particularly elegant, but it works.</p>
<p>What doesn&rsquo;t work quite as well is having to manage those alarms manually. My work schedule varies depending on the day, and my wake-up routine needs to accommodate that. On weekdays, I need to be awake earlier than I do on weekends. On days when I&rsquo;m not working, I&rsquo;d rather not have my alarm clock screaming at me before sunrise.</p>
<p>I&rsquo;ve spent a considerable amount of time automating various aspects of my home with <a href="https://www.home-assistant.io/">Home Assistant</a>. My lights, curtains, television, chargers, and countless other devices are all integrated into a system that largely operates without requiring my attention.</p>
<p>And yet, until recently, I was still manually setting my alarms.</p>
<p>That seemed like something worth fixing.</p>
<h2 id="the-problem-with-smart-alarm-clocks">The Problem with Smart Alarm Clocks</h2>
<p>For something as seemingly straightforward as an alarm clock, the smart home industry has done a remarkably poor job of making them genuinely useful.</p>
<p>There are plenty of smart speakers that can set alarms. Lenovo Smart Alarm Clocks, for example, have supported voice-controlled alarms for years. You can ask Google to wake you up at a particular time, create multiple alarms, or cancel them entirely.</p>
<p>That&rsquo;s all well and good, but there&rsquo;s a catch.</p>
<p>Google doesn&rsquo;t provide a straightforward way for Home Assistant to manage the alarms stored on a Nest speaker.</p>
<p>I can control my lights, television, and curtains from Home Assistant. I can monitor the battery level of a wireless keypad and automatically charge it when necessary. I can even control my television using three entirely different communication protocols.</p>
<p>But asking Google to set an alarm?</p>
<p>Apparently, that&rsquo;s where things get complicated.</p>
<p>Fortunately, Google Home has a feature that makes this possible, albeit somewhat indirectly.</p>
<p>It&rsquo;s called the <strong>Google Home Script Editor</strong>, and it turns out to be the missing piece of the puzzle.</p>
<h2 id="making-google-home-talk-to-home-assistant">Making Google Home Talk to Home Assistant</h2>
<p>My smart home is built around Home Assistant, but I also use Apple Home and Google Home when they offer functionality that Home Assistant doesn&rsquo;t provide directly.</p>
<p>Rather than treating these platforms as competing ecosystems, I&rsquo;ve found it much more useful to make them work together.</p>
<p>For this particular project, Home Assistant handles the logic, Google Home manages the alarms, and Apple Home contributes a separate automation that I&rsquo;ll get to shortly.</p>
<p>The first step was creating three helpers in Home Assistant.</p>
<p>These are simple input booleans, which are essentially virtual switches that can be turned on or off.</p>
<p>I created three:</p>
<ul>
<li><strong>Weekday Alarms</strong> &ndash; <code>input_boolean.weekday_alarms</code></li>
<li><strong>Weekend Alarms</strong> &ndash; <code>input_boolean.weekend_alarms</code></li>
<li><strong>Cancel My Alarms</strong> &ndash; <code>input_boolean.cancel_my_alarms</code></li>
</ul>
<p>Each helper serves a single purpose.</p>
<p>When Home Assistant turns on the Weekday Alarms helper, Google Home sets my weekday alarms. When it turns on Weekend Alarms, Google sets a slightly later collection of alarms. And when Cancel My Alarms is activated, Google cancels the alarms.</p>
<p>The clever part is that these helpers are exposed to Google Home as devices.</p>
<p>From Google&rsquo;s perspective, they&rsquo;re ordinary switches. It doesn&rsquo;t need to know that they exist solely to trigger an automation.</p>
<p>This is where the Script Editor comes in.</p>
<h3 id="setting-my-weekday-alarms">Setting My Weekday Alarms</h3>
<p>Google Home&rsquo;s Script Editor allows you to write automations in YAML, which should be immediately familiar to anyone who has spent much time working with Home Assistant.</p>
<p>My weekday alarm automation looks like this:</p>
<pre><code>metadata:
  name: Set weekday alarms
  description: Send the alarm command when Weekday Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Weekday Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Set alarm every 15 minutes from 4:30 AM to 6:30 AM&quot;
</code></pre>
<p>The automation watches the virtual switch exposed by Home Assistant.</p>
<p>When the switch turns on, Google Home sends a command to the Google Assistant associated with my Lenovo Smart Alarm Clock.</p>
<p>The command is exactly what I would say if I were speaking to Google myself:</p>
<p><em>Set alarm every 15 minutes from 4:30 AM to 6:30 AM.</em></p>
<p>And just like that, Google creates my alarms.</p>
<p>Nine of them, to be precise.</p>
<p>Yes, nine.</p>
<p>I told you I wasn&rsquo;t a morning person.</p>
<p>What&rsquo;s particularly useful about this approach is that Google Assistant already understands the command. I&rsquo;ve used this exact phrasing myself countless times, so I&rsquo;m not relying on an unfamiliar or untested way of creating alarms.</p>
<p>I&rsquo;m simply automating something I already know works.</p>
<p>The speaker also announces when it has finished setting the alarms, providing audible confirmation that the command was processed.</p>
<h3 id="weekends-are-a-little-different">Weekends Are a Little Different</h3>
<p>My weekend automation is nearly identical, with one important difference.</p>
<pre><code>metadata:
  name: Set weekend alarms
  description: Send the alarm command when Weekend Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Weekend Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Set alarm every 15 minutes from 5:30 AM to 7:30 AM&quot;
</code></pre>
<p>On weekends, my alarms begin at 5:30 AM rather than 4:30 AM.</p>
<p>That extra hour of sleep is appreciated.</p>
<p>The important distinction here is that these aren&rsquo;t recurring weekday and weekend alarms configured directly on the speaker.</p>
<p>Instead, Home Assistant decides which collection of alarms I need based on my work schedule, and Google creates them for that particular morning.</p>
<p>That means I don&rsquo;t have to maintain separate sets of permanently enabled alarms or remember to disable them when my schedule changes.</p>
<p>Google simply does what Home Assistant tells it to do.</p>
<h3 id="cancelling-the-alarms">Cancelling the Alarms</h3>
<p>Of course, creating alarms is only half the problem.</p>
<p>Once I&rsquo;m awake and getting ready for work, I don&rsquo;t particularly want my Lenovo Smart Alarm Clock continuing to announce that it&rsquo;s time to wake up every fifteen minutes.</p>
<p>So I created a third automation.</p>
<pre><code>metadata:
  name: Cancel my alarms
  description: Cancel all alarms when Cancel My Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Cancel My Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Cancel all of my alarms&quot;
</code></pre>
<p>Again, nothing particularly complicated.</p>
<p>Home Assistant activates a virtual switch, Google receives the command, and my alarms are cancelled.</p>
<p>The result is a surprisingly flexible system.</p>
<p>Home Assistant doesn&rsquo;t need direct access to Google&rsquo;s alarm functionality. It simply needs a way to ask Google to perform an action that Google already supports.</p>
<p>It&rsquo;s a workaround, certainly, but a rather effective one.</p>
<h2 id="putting-home-assistant-in-charge">Putting Home Assistant in Charge</h2>
<p>With the Google Home automations configured, I needed to connect everything to my work schedule.</p>
<p>Fortunately, I already had a Home Assistant sensor that determines whether I&rsquo;m working.</p>
<p>It&rsquo;s called <code>sensor.am_i_working</code>, and it reports one of two states: <code>Working</code> or <code>Not Working</code>.</p>
<p>I also have a separate sensor, <code>sensor.weekend</code>, that identifies whether the current day is a weekday or weekend.</p>
<p>Together, these sensors provide everything Home Assistant needs to determine which alarms should be set.</p>
<p>My primary automation is called <strong>Set My Alarms</strong>.</p>
<p>It triggers whenever my work-status sensor changes from <code>Not Working</code> to <code>Working</code>.</p>
<p>Once triggered, the automation performs two tasks.</p>
<p>First, it checks whether my iPad mini charger is turned off.</p>
<p>If it is, Home Assistant turns the charger on for ten seconds before turning it off again.</p>
<p>This briefly powers my iPad alarm clock setup, which is integrated with Apple Shortcuts.</p>
<p>I already had this part of the system working before introducing Google Home, and I saw no reason to abandon it.</p>
<p>After handling the iPad, Home Assistant checks whether the upcoming workday falls on a weekday or weekend.</p>
<p>If it&rsquo;s a weekday, Home Assistant turns on the Weekday Alarms helper.</p>
<p>If it&rsquo;s a weekend, it turns on the Weekend Alarms helper.</p>
<p>The corresponding Google Home automation then executes.</p>
<p>Thirty seconds later, Home Assistant turns the helper off again, leaving it ready for the next time it&rsquo;s needed.</p>
<p>That last step is important.</p>
<p>Google Home&rsquo;s automation is triggered by the switch changing to its on state. Leaving the switch on permanently would prevent the same transition from occurring the next time Home Assistant needed to set my alarms.</p>
<p>By automatically resetting the helper, I can use it repeatedly without ever having to interact with it myself.</p>
<p>And because the entire process is triggered by my work schedule, I don&rsquo;t even need to remember to initiate it.</p>
<p>That&rsquo;s the whole point.</p>
<h2 id="automatically-cancelling-my-alarms">Automatically Cancelling My Alarms</h2>
<p>Setting alarms automatically is convenient, but I wanted the entire process to manage itself.</p>
<p>That includes cancelling them.</p>
<p>For this, I created another Home Assistant automation called <strong>Cancel My Alarms</strong>.</p>
<p>It runs at two different times depending on the day:</p>
<table>
	<thead>
			<tr>
					<th>Day</th>
					<th>Cancellation Time</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Monday&ndash;Friday</td>
					<td>8:00 AM</td>
			</tr>
			<tr>
					<td>Saturday&ndash;Sunday</td>
					<td>9:00 AM</td>
			</tr>
	</tbody>
</table>
<p>There&rsquo;s one additional condition: Home Assistant must confirm that I&rsquo;m working.</p>
<p>If I&rsquo;m not working, the automation does nothing.</p>
<p>If I am working, Home Assistant activates the Cancel My Alarms helper, waits thirty seconds, and then turns it off again.</p>
<p>It also resets the weekday and weekend alarm helpers, ensuring everything is ready for the next cycle.</p>
<p>The Google Home automation receives the cancellation request and tells my Lenovo Smart Alarm Clock to cancel all its alarms.</p>
<p>In other words, the system now handles both ends of the process.</p>
<p>It creates the alarms when they&rsquo;re needed and cancels them when they&rsquo;re no longer useful.</p>
<p>I don&rsquo;t need to open an app, speak to Google, or remember which alarms are currently enabled.</p>
<p>There is one limitation worth acknowledging: the cancellation command applies to all alarms on that speaker, not just those created by this automation. That&rsquo;s fine for my setup, but it might be less desirable for someone who also uses their speaker for unrelated alarms.</p>
<h2 id="a-little-help-from-apple-home">A Little Help from Apple Home</h2>
<p>There is one more component to this setup, and it involves Apple Home.</p>
<p>I&rsquo;ve been using Apple Home alongside Home Assistant for years, primarily because I appreciate its interface and how well it integrates with my Apple devices.</p>
<p>Although Home Assistant is responsible for nearly all the actual logic in my smart home, Apple Home still has a few useful tricks.</p>
<p>One of those is presence detection.</p>
<p>I have an Apple Home automation configured to turn off my lights whenever the last person leaves home.</p>
<p>This isn&rsquo;t directly responsible for setting my alarms, but it&rsquo;s another example of how I use the different smart home platforms together.</p>
<p>Home Assistant provides centralized control and complex automation logic. Google Home provides access to Google Assistant commands. Apple Home handles certain presence-based actions.</p>
<p>Each platform does what it&rsquo;s good at.</p>
<p>I&rsquo;m not particularly interested in forcing everything into one ecosystem simply for the sake of doing so.</p>
<p>If Apple Home can reliably handle a particular task, I&rsquo;ll use Apple Home.</p>
<p>If Google Assistant can do something Home Assistant can&rsquo;t, I&rsquo;ll find a way to make them communicate.</p>
<p>And if Home Assistant can coordinate the entire process, even better.</p>
<h2 id="waking-up-shouldnt-be-quite-so-abrupt">Waking Up Shouldn&rsquo;t Be Quite So Abrupt</h2>
<p>There&rsquo;s one final piece of this project that doesn&rsquo;t involve Google Home at all.</p>
<p>My bedroom lighting.</p>
<p>I have two additional Home Assistant automations that turn on my TV lights at specific times, provided I&rsquo;m working that day.</p>
<p>On weekdays, the lights turn on at <strong>6:00 AM</strong>.</p>
<p>On weekends, they turn on at <strong>6:30 AM</strong>.</p>
<p>Both automations check my work-status sensor and the weekday/weekend sensor before doing anything.</p>
<p>If I&rsquo;m not working, the lights stay off.</p>
<p>This means that while my Lenovo Smart Alarm Clock is doing its best to convince me to get out of bed, Home Assistant is also turning on the lights.</p>
<p>It&rsquo;s not exactly a sophisticated sunrise simulation, but it does make the transition from sleeping to getting ready for work a little more deliberate.</p>
<p>And, importantly, it&rsquo;s another thing I no longer have to think about.</p>
<h3 id="the-beauty-of-a-virtual-switch">The Beauty of a Virtual Switch</h3>
<p>One of my favourite things about this project is how little specialized hardware it requires.</p>
<p>I didn&rsquo;t need to buy a new alarm clock.</p>
<p>I didn&rsquo;t need another ESP32.</p>
<p>I didn&rsquo;t need to replace my Lenovo Smart Alarm Clock or install some obscure third-party integration.</p>
<p>All I needed were three virtual switches and a handful of automations.</p>
<p>That&rsquo;s it.</p>
<p>The entire system works because Home Assistant can expose a virtual device to Google Home, and Google Home can use that device as the trigger for a Google Assistant command.</p>
<p>It&rsquo;s a simple idea with some surprisingly useful implications.</p>
<p>There are plenty of things Google Assistant can do through voice commands that aren&rsquo;t exposed through a conventional smart home integration.</p>
<p>The Script Editor provides a way to bridge that gap.</p>
<p>And once Home Assistant can trigger those commands, they become part of a much larger automation system.</p>
<p>For me, that means alarm management.</p>
<p>For someone else, it could mean something entirely different.</p>
<p>The underlying concept remains the same: <strong>use a virtual device to turn an otherwise inaccessible voice command into an automatable action.</strong></p>
<p>It&rsquo;s not the same as having a proper alarm-management API. Home Assistant can&rsquo;t inspect the resulting alarms or independently confirm that every requested alarm was created.</p>
<p>But for my purposes, the approach is practical, and the speaker&rsquo;s audible confirmation is a useful indication that the command has been processed.</p>
<h3 id="the-best-automation-is-the-one-you-forget-about">The Best Automation Is the One You Forget About</h3>
<p>I&rsquo;ve built quite a few Home Assistant automations over the years.</p>
<p>Some are relatively simple, like automatically charging my Ring keypad when its battery drops below 20%.</p>
<p>Others are considerably more involved, such as my television control system, which uses infrared, HDMI-CEC, and RS-232 to control an LG OLED television without connecting it to the internet.</p>
<p>I enjoy those projects because they&rsquo;re interesting technical challenges.</p>
<p>But there&rsquo;s something particularly satisfying about an automation that solves an ordinary, everyday annoyance.</p>
<p>Setting my alarms isn&rsquo;t difficult.</p>
<p>It takes a few seconds to ask Google to create them.</p>
<p>Cancelling them isn&rsquo;t difficult either.</p>
<p>But those are still tasks I have to remember to perform, and they&rsquo;re tasks that serve absolutely no purpose beyond preparing for the following morning.</p>
<p>Now, Home Assistant can handle them.</p>
<p>When my work schedule indicates that I need to work, the system prepares my alarms. It selects the appropriate times, sends the commands to Google, and resets the virtual switches.</p>
<p>The following morning, my alarms go off, my lights turn on, and eventually the system cancels the remaining alarms.</p>
<p>All without requiring me to do anything.</p>
<p>That&rsquo;s the kind of automation I appreciate most.</p>
<p>Not because it&rsquo;s particularly complicated or technically impressive, but because it removes one more small responsibility from my day.</p>
<p>There are still a few things I&rsquo;d like to improve. In particular, I&rsquo;d love for Google to expose its alarm functionality through a proper API so Home Assistant could create, inspect, and cancel individual alarms directly.</p>
<p>Until that happens, the Script Editor provides a surprisingly capable alternative.</p>
<p>And while I&rsquo;ll continue keeping an eye on how reliably the entire system performs, I&rsquo;m optimistic that I&rsquo;ve finally reached the point where I won&rsquo;t need to manually set my alarms again.</p>
<p>Now, if only Home Assistant could convince me that getting out of bed at 4:30 in the morning is a good idea.</p>
<p>That might be asking a little too much.</p>
<div class="amj-cta" aria-label="Support and subscription links">
  <div class="amj-cta__item amj-cta__item--coffee">
    <a class="amj-cta__button amj-cta__button--coffee" href="https://www.buymeacoffee.com/AidanMJ25" target="_blank" rel="noopener">
      <span>Buy Me a Coffee</span>
    </a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--rss" href="https://blog.aidanmaurinjones.com/posts/index.xml" target="_blank" rel="noopener" aria-label="Subscribe via RSS">
      <svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.18 17.82a1.82 1.82 0 1 1 0-3.64 1.82 1.82 0 0 1 0 3.64Zm-3-8.18v2.73a8.64 8.64 0 0 1 8.64 8.64h2.73A11.36 11.36 0 0 0 3.18 9.64Zm0-4.09v2.73A15.45 15.45 0 0 1 18.55 23h2.73C21.27 11.73 12.45 2.91 3.18 5.55Z"/></svg>
      <span>Subscribe via RSS</span>
    </a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--newsletter" href="https://buttondown.com/AidanMJ25" target="_blank" rel="noopener">Newsletter via Email</a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--rss" href="https://blog.aidanmaurinjones.com/newsletter/index.xml" target="_blank" rel="noopener" aria-label="Newsletter via RSS">
      <svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.18 17.82a1.82 1.82 0 1 1 0-3.64 1.82 1.82 0 0 1 0 3.64Zm-3-8.18v2.73a8.64 8.64 0 0 1 8.64 8.64h2.73A11.36 11.36 0 0 0 3.18 9.64Zm0-4.09v2.73A15.45 15.45 0 0 1 18.55 23h2.73C21.27 11.73 12.45 2.91 3.18 5.55Z"/></svg>
      <span>Newsletter via RSS</span>
    </a>
  </div>
</div>

]]></description><content:encoded><![CDATA[<p><em>How I used Home Assistant, Google Home, and Apple Home to automate one of the most annoying parts of my morning routine.</em></p>
<p>I am not a morning person.</p>
<p>Unfortunately, that is no one&rsquo;s problem except my own.</p>
<p>For years, I&rsquo;ve relied on a rather excessive collection of alarms to get myself out of bed in the morning. Not one alarm. Not two alarms. An entire series of alarms, spaced fifteen minutes apart, designed to make absolutely certain that I eventually acknowledge the unfortunate reality that I have to go to work.</p>
<p>It&rsquo;s not particularly elegant, but it works.</p>
<p>What doesn&rsquo;t work quite as well is having to manage those alarms manually. My work schedule varies depending on the day, and my wake-up routine needs to accommodate that. On weekdays, I need to be awake earlier than I do on weekends. On days when I&rsquo;m not working, I&rsquo;d rather not have my alarm clock screaming at me before sunrise.</p>
<p>I&rsquo;ve spent a considerable amount of time automating various aspects of my home with <a href="https://www.home-assistant.io/">Home Assistant</a>. My lights, curtains, television, chargers, and countless other devices are all integrated into a system that largely operates without requiring my attention.</p>
<p>And yet, until recently, I was still manually setting my alarms.</p>
<p>That seemed like something worth fixing.</p>
<h2 id="the-problem-with-smart-alarm-clocks">The Problem with Smart Alarm Clocks</h2>
<p>For something as seemingly straightforward as an alarm clock, the smart home industry has done a remarkably poor job of making them genuinely useful.</p>
<p>There are plenty of smart speakers that can set alarms. Lenovo Smart Alarm Clocks, for example, have supported voice-controlled alarms for years. You can ask Google to wake you up at a particular time, create multiple alarms, or cancel them entirely.</p>
<p>That&rsquo;s all well and good, but there&rsquo;s a catch.</p>
<p>Google doesn&rsquo;t provide a straightforward way for Home Assistant to manage the alarms stored on a Nest speaker.</p>
<p>I can control my lights, television, and curtains from Home Assistant. I can monitor the battery level of a wireless keypad and automatically charge it when necessary. I can even control my television using three entirely different communication protocols.</p>
<p>But asking Google to set an alarm?</p>
<p>Apparently, that&rsquo;s where things get complicated.</p>
<p>Fortunately, Google Home has a feature that makes this possible, albeit somewhat indirectly.</p>
<p>It&rsquo;s called the <strong>Google Home Script Editor</strong>, and it turns out to be the missing piece of the puzzle.</p>
<h2 id="making-google-home-talk-to-home-assistant">Making Google Home Talk to Home Assistant</h2>
<p>My smart home is built around Home Assistant, but I also use Apple Home and Google Home when they offer functionality that Home Assistant doesn&rsquo;t provide directly.</p>
<p>Rather than treating these platforms as competing ecosystems, I&rsquo;ve found it much more useful to make them work together.</p>
<p>For this particular project, Home Assistant handles the logic, Google Home manages the alarms, and Apple Home contributes a separate automation that I&rsquo;ll get to shortly.</p>
<p>The first step was creating three helpers in Home Assistant.</p>
<p>These are simple input booleans, which are essentially virtual switches that can be turned on or off.</p>
<p>I created three:</p>
<ul>
<li><strong>Weekday Alarms</strong> &ndash; <code>input_boolean.weekday_alarms</code></li>
<li><strong>Weekend Alarms</strong> &ndash; <code>input_boolean.weekend_alarms</code></li>
<li><strong>Cancel My Alarms</strong> &ndash; <code>input_boolean.cancel_my_alarms</code></li>
</ul>
<p>Each helper serves a single purpose.</p>
<p>When Home Assistant turns on the Weekday Alarms helper, Google Home sets my weekday alarms. When it turns on Weekend Alarms, Google sets a slightly later collection of alarms. And when Cancel My Alarms is activated, Google cancels the alarms.</p>
<p>The clever part is that these helpers are exposed to Google Home as devices.</p>
<p>From Google&rsquo;s perspective, they&rsquo;re ordinary switches. It doesn&rsquo;t need to know that they exist solely to trigger an automation.</p>
<p>This is where the Script Editor comes in.</p>
<h3 id="setting-my-weekday-alarms">Setting My Weekday Alarms</h3>
<p>Google Home&rsquo;s Script Editor allows you to write automations in YAML, which should be immediately familiar to anyone who has spent much time working with Home Assistant.</p>
<p>My weekday alarm automation looks like this:</p>
<pre><code>metadata:
  name: Set weekday alarms
  description: Send the alarm command when Weekday Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Weekday Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Set alarm every 15 minutes from 4:30 AM to 6:30 AM&quot;
</code></pre>
<p>The automation watches the virtual switch exposed by Home Assistant.</p>
<p>When the switch turns on, Google Home sends a command to the Google Assistant associated with my Lenovo Smart Alarm Clock.</p>
<p>The command is exactly what I would say if I were speaking to Google myself:</p>
<p><em>Set alarm every 15 minutes from 4:30 AM to 6:30 AM.</em></p>
<p>And just like that, Google creates my alarms.</p>
<p>Nine of them, to be precise.</p>
<p>Yes, nine.</p>
<p>I told you I wasn&rsquo;t a morning person.</p>
<p>What&rsquo;s particularly useful about this approach is that Google Assistant already understands the command. I&rsquo;ve used this exact phrasing myself countless times, so I&rsquo;m not relying on an unfamiliar or untested way of creating alarms.</p>
<p>I&rsquo;m simply automating something I already know works.</p>
<p>The speaker also announces when it has finished setting the alarms, providing audible confirmation that the command was processed.</p>
<h3 id="weekends-are-a-little-different">Weekends Are a Little Different</h3>
<p>My weekend automation is nearly identical, with one important difference.</p>
<pre><code>metadata:
  name: Set weekend alarms
  description: Send the alarm command when Weekend Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Weekend Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Set alarm every 15 minutes from 5:30 AM to 7:30 AM&quot;
</code></pre>
<p>On weekends, my alarms begin at 5:30 AM rather than 4:30 AM.</p>
<p>That extra hour of sleep is appreciated.</p>
<p>The important distinction here is that these aren&rsquo;t recurring weekday and weekend alarms configured directly on the speaker.</p>
<p>Instead, Home Assistant decides which collection of alarms I need based on my work schedule, and Google creates them for that particular morning.</p>
<p>That means I don&rsquo;t have to maintain separate sets of permanently enabled alarms or remember to disable them when my schedule changes.</p>
<p>Google simply does what Home Assistant tells it to do.</p>
<h3 id="cancelling-the-alarms">Cancelling the Alarms</h3>
<p>Of course, creating alarms is only half the problem.</p>
<p>Once I&rsquo;m awake and getting ready for work, I don&rsquo;t particularly want my Lenovo Smart Alarm Clock continuing to announce that it&rsquo;s time to wake up every fifteen minutes.</p>
<p>So I created a third automation.</p>
<pre><code>metadata:
  name: Cancel my alarms
  description: Cancel all alarms when Cancel My Alarms turns on.

automations:
  - starters:
      - type: device.state.OnOff
        device: Cancel My Alarms - Aidan's Room
        state: on
        is: true

    actions:
      - type: assistant.command.OkGoogle
        devices:
          - Aidan's Room speaker - Aidan's Room
        okGoogle: &quot;Cancel all of my alarms&quot;
</code></pre>
<p>Again, nothing particularly complicated.</p>
<p>Home Assistant activates a virtual switch, Google receives the command, and my alarms are cancelled.</p>
<p>The result is a surprisingly flexible system.</p>
<p>Home Assistant doesn&rsquo;t need direct access to Google&rsquo;s alarm functionality. It simply needs a way to ask Google to perform an action that Google already supports.</p>
<p>It&rsquo;s a workaround, certainly, but a rather effective one.</p>
<h2 id="putting-home-assistant-in-charge">Putting Home Assistant in Charge</h2>
<p>With the Google Home automations configured, I needed to connect everything to my work schedule.</p>
<p>Fortunately, I already had a Home Assistant sensor that determines whether I&rsquo;m working.</p>
<p>It&rsquo;s called <code>sensor.am_i_working</code>, and it reports one of two states: <code>Working</code> or <code>Not Working</code>.</p>
<p>I also have a separate sensor, <code>sensor.weekend</code>, that identifies whether the current day is a weekday or weekend.</p>
<p>Together, these sensors provide everything Home Assistant needs to determine which alarms should be set.</p>
<p>My primary automation is called <strong>Set My Alarms</strong>.</p>
<p>It triggers whenever my work-status sensor changes from <code>Not Working</code> to <code>Working</code>.</p>
<p>Once triggered, the automation performs two tasks.</p>
<p>First, it checks whether my iPad mini charger is turned off.</p>
<p>If it is, Home Assistant turns the charger on for ten seconds before turning it off again.</p>
<p>This briefly powers my iPad alarm clock setup, which is integrated with Apple Shortcuts.</p>
<p>I already had this part of the system working before introducing Google Home, and I saw no reason to abandon it.</p>
<p>After handling the iPad, Home Assistant checks whether the upcoming workday falls on a weekday or weekend.</p>
<p>If it&rsquo;s a weekday, Home Assistant turns on the Weekday Alarms helper.</p>
<p>If it&rsquo;s a weekend, it turns on the Weekend Alarms helper.</p>
<p>The corresponding Google Home automation then executes.</p>
<p>Thirty seconds later, Home Assistant turns the helper off again, leaving it ready for the next time it&rsquo;s needed.</p>
<p>That last step is important.</p>
<p>Google Home&rsquo;s automation is triggered by the switch changing to its on state. Leaving the switch on permanently would prevent the same transition from occurring the next time Home Assistant needed to set my alarms.</p>
<p>By automatically resetting the helper, I can use it repeatedly without ever having to interact with it myself.</p>
<p>And because the entire process is triggered by my work schedule, I don&rsquo;t even need to remember to initiate it.</p>
<p>That&rsquo;s the whole point.</p>
<h2 id="automatically-cancelling-my-alarms">Automatically Cancelling My Alarms</h2>
<p>Setting alarms automatically is convenient, but I wanted the entire process to manage itself.</p>
<p>That includes cancelling them.</p>
<p>For this, I created another Home Assistant automation called <strong>Cancel My Alarms</strong>.</p>
<p>It runs at two different times depending on the day:</p>
<table>
	<thead>
			<tr>
					<th>Day</th>
					<th>Cancellation Time</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Monday&ndash;Friday</td>
					<td>8:00 AM</td>
			</tr>
			<tr>
					<td>Saturday&ndash;Sunday</td>
					<td>9:00 AM</td>
			</tr>
	</tbody>
</table>
<p>There&rsquo;s one additional condition: Home Assistant must confirm that I&rsquo;m working.</p>
<p>If I&rsquo;m not working, the automation does nothing.</p>
<p>If I am working, Home Assistant activates the Cancel My Alarms helper, waits thirty seconds, and then turns it off again.</p>
<p>It also resets the weekday and weekend alarm helpers, ensuring everything is ready for the next cycle.</p>
<p>The Google Home automation receives the cancellation request and tells my Lenovo Smart Alarm Clock to cancel all its alarms.</p>
<p>In other words, the system now handles both ends of the process.</p>
<p>It creates the alarms when they&rsquo;re needed and cancels them when they&rsquo;re no longer useful.</p>
<p>I don&rsquo;t need to open an app, speak to Google, or remember which alarms are currently enabled.</p>
<p>There is one limitation worth acknowledging: the cancellation command applies to all alarms on that speaker, not just those created by this automation. That&rsquo;s fine for my setup, but it might be less desirable for someone who also uses their speaker for unrelated alarms.</p>
<h2 id="a-little-help-from-apple-home">A Little Help from Apple Home</h2>
<p>There is one more component to this setup, and it involves Apple Home.</p>
<p>I&rsquo;ve been using Apple Home alongside Home Assistant for years, primarily because I appreciate its interface and how well it integrates with my Apple devices.</p>
<p>Although Home Assistant is responsible for nearly all the actual logic in my smart home, Apple Home still has a few useful tricks.</p>
<p>One of those is presence detection.</p>
<p>I have an Apple Home automation configured to turn off my lights whenever the last person leaves home.</p>
<p>This isn&rsquo;t directly responsible for setting my alarms, but it&rsquo;s another example of how I use the different smart home platforms together.</p>
<p>Home Assistant provides centralized control and complex automation logic. Google Home provides access to Google Assistant commands. Apple Home handles certain presence-based actions.</p>
<p>Each platform does what it&rsquo;s good at.</p>
<p>I&rsquo;m not particularly interested in forcing everything into one ecosystem simply for the sake of doing so.</p>
<p>If Apple Home can reliably handle a particular task, I&rsquo;ll use Apple Home.</p>
<p>If Google Assistant can do something Home Assistant can&rsquo;t, I&rsquo;ll find a way to make them communicate.</p>
<p>And if Home Assistant can coordinate the entire process, even better.</p>
<h2 id="waking-up-shouldnt-be-quite-so-abrupt">Waking Up Shouldn&rsquo;t Be Quite So Abrupt</h2>
<p>There&rsquo;s one final piece of this project that doesn&rsquo;t involve Google Home at all.</p>
<p>My bedroom lighting.</p>
<p>I have two additional Home Assistant automations that turn on my TV lights at specific times, provided I&rsquo;m working that day.</p>
<p>On weekdays, the lights turn on at <strong>6:00 AM</strong>.</p>
<p>On weekends, they turn on at <strong>6:30 AM</strong>.</p>
<p>Both automations check my work-status sensor and the weekday/weekend sensor before doing anything.</p>
<p>If I&rsquo;m not working, the lights stay off.</p>
<p>This means that while my Lenovo Smart Alarm Clock is doing its best to convince me to get out of bed, Home Assistant is also turning on the lights.</p>
<p>It&rsquo;s not exactly a sophisticated sunrise simulation, but it does make the transition from sleeping to getting ready for work a little more deliberate.</p>
<p>And, importantly, it&rsquo;s another thing I no longer have to think about.</p>
<h3 id="the-beauty-of-a-virtual-switch">The Beauty of a Virtual Switch</h3>
<p>One of my favourite things about this project is how little specialized hardware it requires.</p>
<p>I didn&rsquo;t need to buy a new alarm clock.</p>
<p>I didn&rsquo;t need another ESP32.</p>
<p>I didn&rsquo;t need to replace my Lenovo Smart Alarm Clock or install some obscure third-party integration.</p>
<p>All I needed were three virtual switches and a handful of automations.</p>
<p>That&rsquo;s it.</p>
<p>The entire system works because Home Assistant can expose a virtual device to Google Home, and Google Home can use that device as the trigger for a Google Assistant command.</p>
<p>It&rsquo;s a simple idea with some surprisingly useful implications.</p>
<p>There are plenty of things Google Assistant can do through voice commands that aren&rsquo;t exposed through a conventional smart home integration.</p>
<p>The Script Editor provides a way to bridge that gap.</p>
<p>And once Home Assistant can trigger those commands, they become part of a much larger automation system.</p>
<p>For me, that means alarm management.</p>
<p>For someone else, it could mean something entirely different.</p>
<p>The underlying concept remains the same: <strong>use a virtual device to turn an otherwise inaccessible voice command into an automatable action.</strong></p>
<p>It&rsquo;s not the same as having a proper alarm-management API. Home Assistant can&rsquo;t inspect the resulting alarms or independently confirm that every requested alarm was created.</p>
<p>But for my purposes, the approach is practical, and the speaker&rsquo;s audible confirmation is a useful indication that the command has been processed.</p>
<h3 id="the-best-automation-is-the-one-you-forget-about">The Best Automation Is the One You Forget About</h3>
<p>I&rsquo;ve built quite a few Home Assistant automations over the years.</p>
<p>Some are relatively simple, like automatically charging my Ring keypad when its battery drops below 20%.</p>
<p>Others are considerably more involved, such as my television control system, which uses infrared, HDMI-CEC, and RS-232 to control an LG OLED television without connecting it to the internet.</p>
<p>I enjoy those projects because they&rsquo;re interesting technical challenges.</p>
<p>But there&rsquo;s something particularly satisfying about an automation that solves an ordinary, everyday annoyance.</p>
<p>Setting my alarms isn&rsquo;t difficult.</p>
<p>It takes a few seconds to ask Google to create them.</p>
<p>Cancelling them isn&rsquo;t difficult either.</p>
<p>But those are still tasks I have to remember to perform, and they&rsquo;re tasks that serve absolutely no purpose beyond preparing for the following morning.</p>
<p>Now, Home Assistant can handle them.</p>
<p>When my work schedule indicates that I need to work, the system prepares my alarms. It selects the appropriate times, sends the commands to Google, and resets the virtual switches.</p>
<p>The following morning, my alarms go off, my lights turn on, and eventually the system cancels the remaining alarms.</p>
<p>All without requiring me to do anything.</p>
<p>That&rsquo;s the kind of automation I appreciate most.</p>
<p>Not because it&rsquo;s particularly complicated or technically impressive, but because it removes one more small responsibility from my day.</p>
<p>There are still a few things I&rsquo;d like to improve. In particular, I&rsquo;d love for Google to expose its alarm functionality through a proper API so Home Assistant could create, inspect, and cancel individual alarms directly.</p>
<p>Until that happens, the Script Editor provides a surprisingly capable alternative.</p>
<p>And while I&rsquo;ll continue keeping an eye on how reliably the entire system performs, I&rsquo;m optimistic that I&rsquo;ve finally reached the point where I won&rsquo;t need to manually set my alarms again.</p>
<p>Now, if only Home Assistant could convince me that getting out of bed at 4:30 in the morning is a good idea.</p>
<p>That might be asking a little too much.</p>
<div class="amj-cta" aria-label="Support and subscription links">
  <div class="amj-cta__item amj-cta__item--coffee">
    <a class="amj-cta__button amj-cta__button--coffee" href="https://www.buymeacoffee.com/AidanMJ25" target="_blank" rel="noopener">
      <span>Buy Me a Coffee</span>
    </a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--rss" href="https://blog.aidanmaurinjones.com/posts/index.xml" target="_blank" rel="noopener" aria-label="Subscribe via RSS">
      <svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.18 17.82a1.82 1.82 0 1 1 0-3.64 1.82 1.82 0 0 1 0 3.64Zm-3-8.18v2.73a8.64 8.64 0 0 1 8.64 8.64h2.73A11.36 11.36 0 0 0 3.18 9.64Zm0-4.09v2.73A15.45 15.45 0 0 1 18.55 23h2.73C21.27 11.73 12.45 2.91 3.18 5.55Z"/></svg>
      <span>Subscribe via RSS</span>
    </a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--newsletter" href="https://buttondown.com/AidanMJ25" target="_blank" rel="noopener">Newsletter via Email</a>
  </div>

  <div class="amj-cta__item">
    <a class="amj-cta__button amj-cta__button--rss" href="https://blog.aidanmaurinjones.com/newsletter/index.xml" target="_blank" rel="noopener" aria-label="Newsletter via RSS">
      <svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.18 17.82a1.82 1.82 0 1 1 0-3.64 1.82 1.82 0 0 1 0 3.64Zm-3-8.18v2.73a8.64 8.64 0 0 1 8.64 8.64h2.73A11.36 11.36 0 0 0 3.18 9.64Zm0-4.09v2.73A15.45 15.45 0 0 1 18.55 23h2.73C21.27 11.73 12.45 2.91 3.18 5.55Z"/></svg>
      <span>Newsletter via RSS</span>
    </a>
  </div>
</div>

]]></content:encoded></item></channel></rss>