GitHub

Work in progress: this is a simple setup to handle caldav from home assistant via a service.

I created the python package CalDAV-Tasks-API and wanted to use the Voice Assistant to create task. Something like Okay Nabu. I have to do the dishes and have it automatically added to my TODO lists. That lists being part of my Nextcloud Tasks app, which uses caldav so is synced on my phone to Tasks.org.

How to

  1. Have a Home Assistant instance.
  2. Install HACS.
  3. Use HACS to install pyscript.
  4. Have a way to access Home Assistant's files. I use addon-ssh.
  5. Not sure this is needed: add to /root/homeassistant/configuration.yaml:
pyscript:
  allow_all_imports: true
  hass_is_global: true
  1. Create the folder /config/pyscript
  2. Inside that pyscript folder, add the requirements.txt file (this will install my package CalDAV-Tasks-API). Same for caldav.py. You can add a caldav_password.secret text file containing your password to avoid hardcoding it in the Web UI.
  3. Restart Home Assistant (might not be needed but just to be safe)

Testing everything works

  1. Open Home Assistant > Settings > Automations & scenes > Create automation > Create new automation > Add action > search for caldav_add.
  2. Fill in the values then click on the kebab menu then Run action.
  3. In the Home Assistant shell, cat /root/homeassistant/homeassistant.log to look for any issues.

Giving access to LLMs

I'm so far using Extended OpenAI Conversation. To give access to caldav to your LLM, modify the hardcoded values at the bottom of the file function_spec.yaml then paste it in the Functions section of the config of Extended OpenAI Conversation.

Notes

  • Feedbacks welcome
  • I didn't create intents or things like that because I use LLMs directly

Read the original on github.com ↗