Assist: Create reminders by voice

Usecase

I wanted a way to replace the voice reminders that I previously used with a Google Nest mini. Now that I have this working I can finally deprecate my Google devices :slight_smile:

Main features

  • Create reminders using HA Assist using a sentence you can configure yourself
  • See the reminders as part of a todo list and optionally show them in your dashboard
  • Use OpenAI integration to parse the reminder time
  • Get the reminders via the HA Companion app when the set time arrives
  • Keep reminders until you dismiss them from the notification

Install guide

  1. Setup the prerequisites as described below.
  2. Import the blueprint
  3. Setup the automation using the blueprint
  4. Test by calling assist with your configured sentence

1. Prerequisites

For this blueprint to work you need a few things to be setup before setting up the blueprint:

2. Import blueprint

Github Gist: voice_reminders.yaml · GitHub

Importing

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Or import this Blueprint by using the Gist URL above.

3. Setup blueprint

Navigate to your automations section in HA, add a new automation and select the imported blueprint.
Set it up according to the instructions in the blueprint setup page.

This should result in a configured automation. And example for an automation I have setup myself you can find here:

automation:
  - id: "1703332219266"
    alias: Voice reminder to TTS english
    description: ""
    use_blueprint:
      path: homeassistant/voice_reminders.yaml
      input:
        notify_service: notify.mobile_app
        open_ai_config_entry: 50005158a4b775603223d530315c184f
        todo_list: todo.reminders
        assist_command:
          - Remind me to {reminderDescription} at {reminderTime}
        response_sentence_text: "You will receive a reminder about: {{trigger.slots.reminderDescription}} at {{response_from_ai.response.speech.plain.speech}} o' clock."

Testing

Open an Assist dialog screen and enter your configured sentence, if you follow the example this is:

Remind me to test HA voice reminders at 2

F.A.Q.

I have setup everything a described, but it still does not work

Try to debug your created automation in HA and see which step fails.
Post the debug logs here and I will try to help you.
Posting the generated automation in YAML form also helps.

Changelog

  • 2024-03-22: Initial version
  • 2024-03-23: Used a todo list instead of input helper entities to store the reminders

If you have any issues or questions, please let me know :slight_smile:

1 Like

Thanks for sharing this blueprint. Maybe you can help me with an error I am getting on 2024.7.0

Error: Invalid datetime specified: Sorry, I had a problem talking to OpenAI: Error code: 404 - {'error': {'message': 'The model `pt-3.5-turbo` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}} for dictionary value @ data['due_datetime']
Result:
params:
  domain: todo
  service: add_item
  service_data:
    item: pet the dog
    due_datetime: >-
      Sorry, I had a problem talking to OpenAI: Error code: 404 - {'error':
      {'message': 'The model `pt-3.5-turbo` does not exist or you do not have
      access to it.', 'type': 'invalid_request_error', 'param': None, 'code':
      'model_not_found'}}
    entity_id:
      - todo.reminders
  target:
    entity_id:
      - todo.reminders
running_script: false

It looks like you’ve got a typo in your config and the model is missing a g at the beginning. The error messages says:

The model pt-3.5-turbo does not exist

The name for the model ist gpt-3.5-turbo :slight_smile:

Hey there. I was looking for that kind of automation, and bumped into yours. Thank you!

I use a local Ollama instance, so I made a fork to enable it.

However, the automation is not working, and I don’t know if it’s a problem with my local AI, or something related to your blueprint. Can you please help me?

Save reminder in todo list
Executed: January 5, 2025 at 12:46:03 PM
Error: Invalid datetime specified: 2025-01-05 01:46:00. Since the time now is :00 and we need a time in the future closest to the current time, I will use 2025-01-05 01:47:00 as the output time. The output of this datetime string is '2025-01-05 01:47'. for dictionary value @ data['due_datetime']
Result:
params:
  domain: todo
  service: add_item
  service_data:
    item: test Home Assistant
    due_datetime: >-
      2025-01-05 01:46:00. Since the time now is :00 and we need a time in the
      future closest to the current time, I will use 2025-01-05 01:47:00 as the
      output time. The output of this datetime string is '2025-01-05 01:47'.
    entity_id:
      - todo.to_do_list
  target:
    entity_id:
      - todo.to_do_list
running_script: false

It seems the current time sensor is not there is your home assistant instance. This blueprint expects the {{states.sensor.time.state}} template to resolve to the current time. Perhaps setting this up can help you? Time & Date - Home Assistant

Awesome! I was able to make progress! Indeed adding that integration made it pass to the following step. But then the response I was getting from Ollama had some extra text, so I added an additional instruction to “Respond only with the datetime string, and nothing else.”.

Now, I have a couple of questions:

  1. When the script was initially failing, the voice assistant still responded with “Done”, even though it was not. Is there a way to detect those failures and make it respond accordingly?
  2. The voice assistant acknowledges the added task reading the full datetime string, ending with “o’clock”, which is a weird response. Is there a way to improve this?
  3. Is there a way to make the time calculation use something native to HA, without adding a new integration? If not, you might want to consider adding that information to your install instructions.

Thank you!

Ps.: This is my up to date version of your blueprint to work with Ollama.

This looks really promising. Does this work if you say something like

“Remind me to put out the bins in 3 hours.”

Rather than ‘at’ a specific time.

I appreciate I’d have to change the assistant sentence trigger a bit, but would the OpenAI work it out ?

EDIT:- Ignore me, just tested it and it works fine.

Seems to really struggle with setting specific dates and times together:

Also, I tweaked the final code that speaks the date to be much more human readable:-

You will receive a reminder about: {{trigger.slots.reminderDescription}} at {{ as_timestamp(response_from_ai.response.speech.plain.speech) | timestamp_custom('%A @ %-I:%M %p') }} o' clock.

I’ve tried tweaking the sentence, but that doesn’t work, I think I need to split the date and time component to make it easier.

I’ve tweaked my version of the blueprint to take sentences with a date parameter so you can better set things in the future. I can post my edits here if anyone cares. Seems to work ok.

2 Likes

Does this allow you to query the time left in an active timer?