Skip to content

[Feature]: Add optional "Auto-Update" interval to send tab data automatically #51

@Iniaki-Boudiaf

Description

@Iniaki-Boudiaf

Problem or Use Case

I want to use this extension to track my active browser tab in Home Assistant for productivity dashboards (e.g., tracking time spent in "Arc" vs "VS Code"). Currently, the extension only sends data when I manually click the icon. This makes it impossible to get a "live" view of what I am browsing without constant manual intervention.

Proposed Solution

Have an option in the settings to enable "Auto-Update" with a configurable interval (e.g., every 60 seconds).

When enabled, the extension should automatically check the active tab and send the payload to the configured Webhook without user interaction. This would allow for "presence-like" sensing of browser activity in Home Assistant.

Alternative Solutions

I considered using external shell scripts on macOS (osascript) to poll the browser active window, or using heavier tools like ActivityWatch. However, doing this directly in the browser extension is much cleaner, cross-platform, and doesn't require complex local permissions (like Screen Recording on macOS).

Priority

High (significantly improves workflow)

Home Assistant Integration

This would allow me to create a sensor in Home Assistant that updates in near real-time.

Example Config:

template:
  - trigger:
      - platform: webhook
        webhook_id: "my_browser_hook"
    sensor:
      - name: "Active Browser Tab"
        state: "{{ trigger.json.title }}"

With auto-updates, this sensor becomes a live feed of activity, allowing for automations like "Turn on Focus Mode when on GitHub" or "Dim lights when on YouTube".

Additional Context

I have already successfully tested a local modification using setInterval in background.js that achieves this. I plan to fork the repo, add a "checkbox" for this feature in the Options UI so it remains optional for users, and submit a Pull Request. Just opening this issue to track the feature!

Pre-submission Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • This feature aligns with the extension's purpose of sending data to Home Assistant
  • I have provided a clear description of the problem and proposed solution

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions