https://github.com/bieniu/ha-perplexity
Perplexity integration for Home Assistant
https://github.com/bieniu/ha-perplexity
ai ai-task hass home-assistant perplexity sonar
Last synced: 3 months ago
JSON representation
Perplexity integration for Home Assistant
- Host: GitHub
- URL: https://github.com/bieniu/ha-perplexity
- Owner: bieniu
- License: apache-2.0
- Created: 2026-01-06T21:17:14.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2026-02-11T07:51:50.000Z (5 months ago)
- Last Synced: 2026-02-11T13:22:34.235Z (5 months ago)
- Topics: ai, ai-task, hass, home-assistant, perplexity, sonar
- Language: Python
- Homepage:
- Size: 127 KB
- Stars: 23
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/bieniu/ha-perplexity/actions/workflows/ci.yml?query=branch%3Amaster)
[](https://github.com/bieniu/ha-perplexity/actions/workflows/hassfest.yml)
[](https://codecov.io/gh/bieniu/ha-perplexity)
[![GitHub Release][releases-shield]][releases]
[![GitHub All Releases][downloads-total-shield]][releases]
[![Buy me a coffee][buy-me-a-coffee-shield]][buy-me-a-coffee]
[![PayPal_Me][paypal-me-shield]][paypal-me]
[![Revolut.Me][revolut-me-shield]][revolut-me]
# Perplexity
Perplexity integration for Home Assistant.

## Installation
You can install this integration manually or via [HACS](https://hacs.xyz).
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=bieniu&repository=ha-perplexity&category=integration)
## Configuration
To configure integration in Home Assistant, go to **Settings** >> **Devices & services** >> **Add integration** >> **Perplexity** or use My Home Assistant link.
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=perplexity)
To generate API key go to [https://www.perplexity.ai/account/api/keys](https://www.perplexity.ai/account/api/keys)
Now you can add Perplexity conversation agent or AI task configuration.

To configure Perplexity as a conversation agent for you Voice assistant:
- Go to **Settings** >> **Voice assistants** or use My Home Assistant link.
[](https://my.home-assistant.io/redirect/voice_assistants/)
- Select **Add assistant**.
- Enter the assistant's name and select one of the Perplexity models as the **Conversation agent**.
- Now you can customize your conversation agent settings.

- You can use the Perplexity AI task for AI suggestions in the Home Assistant interface. Go to **Settings** >> **General**.

## Features
Perplexity integration supports:
- [Conversation](https://www.home-assistant.io/integrations/conversation/) platform (beta)
- [AI Task](https://www.home-assistant.io/integrations/ai_task/) platform
- **Sonar**, **Sonar Pro** and **Sonar Reasoning Pro** models
- **reasoning effort** configuration (for models supporting reasoning)
- controlling **web search** option
- delayed actions - you can ask the assistant to perform an action (for example, turn on the light) after some time or at a specific time
- timers
## AI Task examples
### Generating a short description of weather conditions
```yaml
action: ai_task.generate_data
data:
task_name: Weather Description
entity_id: ai_task.sonar
instructions: >-
Based on this {{ states.weather.home }} and an image create short weather
description (ONLY ONE SENTENCE).
```
Response:
```
The sky is overcast with dark, ragged clouds on this chilly January morning, threatening rain and a brisk wind.
```
### Counting objects from a camera snapshot
```yaml
action: ai_task.generate_data
data:
task_name: Number of cars
entity_id: ai_task.sonar
instructions: In the attached photo, count the cars in the parking lot.
attachments:
media_content_id: media-source://camera/camera.parking
media_content_type: application/vnd.apple.mpegurl
metadata:
title: parking
thumbnail: /api/camera_proxy/camera.parking
media_class: video
navigateIds:
- media_content_type: app
media_content_id: media-source://camera
structure:
car_count:
required: true
selector:
number:
```
Response:
```yaml
data:
car_count: 42
```
## How to debug
To debug the integration add this to your `logger` configuration:
```yaml
# configuration.yaml file
logger:
default: warning
logs:
custom_components.perplexity: debug
perplexity: debug
```
## How to create a dev environment
```bash
git clone https://github.com/bieniu/ha-perplexity.git
cd ha-perplexity
scripts/setup-local-env.sh
```
[releases]: https://github.com/bieniu/ha-perplexity/releases
[releases-shield]: https://img.shields.io/github/release/bieniu/ha-perplexity.svg?style=popout
[downloads-total-shield]: https://img.shields.io/github/downloads/bieniu/ha-perplexity/total
[buy-me-a-coffee-shield]: https://img.shields.io/static/v1.svg?label=%20&message=Buy%20me%20a%20coffee&color=6f4e37&logo=buy%20me%20a%20coffee&logoColor=white
[buy-me-a-coffee]: https://www.buymeacoffee.com/QnLdxeaqO
[paypal-me-shield]: https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal
[paypal-me]: https://www.paypal.me/bieniu79
[revolut-me]: https://revolut.me/maciejbieniek
[revolut-me-shield]: https://img.shields.io/static/v1.svg?label=%20&message=Revolut&logo=revolut