Skip to content

Google calendar#229

Merged
Rizwan-095 merged 27 commits intoopenhome-dev:devfrom
Mmiless:google-calendar
Mar 31, 2026
Merged

Google calendar#229
Rizwan-095 merged 27 commits intoopenhome-dev:devfrom
Mmiless:google-calendar

Conversation

@Mmiless
Copy link
Copy Markdown
Contributor

@Mmiless Mmiless commented Mar 28, 2026

What does this Ability do?

Suggested Trigger Words

  • Note: Make sure to use these in a complete sentence so that the ability can parse your intent. Don't just say "Calendar" or "Schedule". Say something like "Please schedule a meeting for tomorrow"

Calendar
Schedule
What is on my
Reschedule
Invite
Uninvite
Push back
What do I have going on
Who's on
Who's going to be
Cancel
Meeting
Remind me about

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):

Uses Google Calendar API requiring some Google Cloud setup. Instructions in README.

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Checklist

  • Files are in community/my-ability-name/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

@Mmiless Mmiless requested a review from a team as a code owner March 28, 2026 05:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2026

🔀 Branch Merge Check

PR direction: google-calendardev

Passedgoogle-calendardev is a valid merge direction

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2026

✅ Ability Validation Passed

📋 Validating: community/google-calendar
  ✅ All checks passed!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions github-actions bot added the community-ability Community-contributed ability label Mar 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 28, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/google-calendar/background.py community/google-calendar/main.py

✅ Flake8 — Passed

✅ All checks passed!

Removed hardcoded OAuth credentials and updated token retrieval method.

Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Refactor timezone handling and improve error messages.

Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Set LOCAL_TZ to None initially and update it in call() using the SDK's get_timezone() method.

Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Signed-off-by: Uzair Ullah <uzairullahmail@gmail.com>
Copy link
Copy Markdown
Contributor

@uzair401 uzair401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Mmiless , I’ve updated this PR to align with the latest SDK practices.

OAuth handling has been simplified by removing all manual token logic and switching to self.capability_worker.get_token("google"), which is the recommended SDK approach for retrieving tokens instead of handling refresh tokens manually. You can refer to the docs here: https://docs.openhome.com/OpenHome_SDK_Reference#get_token-platform

Timezone handling is now taken from the SDK using get_timezone() instead of hardcoding it at the module level. I also wrapped the main flow in a proper try/finally block to ensure resume_normal_flow() is always called, even if something fails.

These same updates were applied consistently in both main.py and background.py.

If you’re building or updating abilities, it’s important to rely on SDK methods like get_token() and get_timezone() instead of handling these manually, as this keeps everything consistent and avoids runtime issues.

Great work on this, I am approving it for the community.

As part of our process, abilities go through a 30-day evaluation period where we monitor performance, identify any issues, and make necessary improvements. Once everything meets our quality standards, we proceed with publishing to the marketplace with full credit to the original author.

We truly appreciate your effort and encourage you to keep building and submitting more abilities. Contributions like yours help strengthen the ecosystem, and we look forward to seeing more of your work.

@Rizwan-095 Rizwan-095 merged commit 29a3f22 into openhome-dev:dev Mar 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants