Skip to content
プロジェクト

概要

Perplexity integration for Home Assistant

AI・機械学習

この数値の測り方

できること

  • Conversation platform (beta)
  • AI Task platform
  • AI task evaluation (ai_task.evaluate) backed by the Perplexity Decisions API, answering yes/no, choice and score questions with probabilities instead of text; image attachments (PNG, JPEG, WebP) are evaluated together with state
  • Fast, Low, Medium and High Perplexity presets (Agent API); see what each preset does

計測したスター増加

24時間
0
7日間
履歴を収集中
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

CI Validate with hassfest codecov GitHub Release GitHub All Releases Buy me a coffee PayPal_Me Revolut.Me

Perplexity

Perplexity integration for Home Assistant.

obraz

Installation

You can install this integration from the Home Assistant Marketplace (Settings >> Marketplace) or manually.

Open your Home Assistant instance and open a repository in the Marketplace.

Configuration

To configure integration in Home Assistant, go to Settings >> Devices & services >> Add integration >> Perplexity or use My Home Assistant link.

Open your Home Assistant instance and start setting up a new integration.

To generate API key go to https://www.perplexity.ai/account/api/keys

Now you can add Perplexity conversation agent, AI task or AI task evaluation configuration.

obraz

To configure Perplexity as a conversation agent for you Voice assistant:

  • Go to Settings >> Voice assistants or use My Home Assistant link.

    Open your Home Assistant instance and show your voice assistants.

  • Select Add assistant.

  • Enter the assistant's name and select one of the Perplexity presets as the Conversation agent.

  • Now you can customize your conversation agent settings.

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

    obraz
  • You can use the Perplexity AI task evaluation for decisions in Home Assistant. Go to Settings >> Voice assistants >> AI and select it under Decisions.

Features

Perplexity integration supports:

  • Conversation platform (beta)
  • AI Task platform
  • AI task evaluation (ai_task.evaluate) backed by the Perplexity Decisions API, answering yes/no, choice and score questions with probabilities instead of text; image attachments (PNG, JPEG, WebP) are evaluated together with state
  • Fast, Low, Medium and High Perplexity presets (Agent API); see what each preset does
  • optional reasoning effort configuration (minimal, low, medium, high, extra high) for every preset; leave it empty to use the preset default
  • control of entities exposed to Assist through Home Assistant's LLM tools (the Assist API), the same way the built-in AI integrations work
  • live entity state through the GetLiveContext tool, so the assistant can answer questions about your home
  • timers and delayed commands (for example, turn off the light in 10 minutes) on voice devices that support timers; Home Assistant's default agent runs the delayed command when the timer ends

Migration from Sonar models

Perplexity retired the Sonar models, so the integration now uses the Perplexity Agent API and you choose a preset instead of a model. Existing entries are migrated automatically: sonar and sonar-pro become Fast, and sonar-reasoning-pro becomes Low. Presets always search the web, so the web search option is gone. If you see "Failed to connect" with a valid API key, upgrade the integration to the latest version.

AI Task examples

Generating a short description of weather conditions

action: ai_task.generate_data
data:
  task_name: Weather Description
  entity_id: ai_task.fast
  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

action: ai_task.generate_data
data:
  task_name: Number of cars
  entity_id: ai_task.fast
  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:

data:
  car_count: 42

Deciding whether to send a notification

action: ai_task.evaluate
data:
  task_name: Rain check
  entity_id: ai_task.decider
  state: >-
    Weather: {{ states('weather.home') }}, humidity
    {{ state_attr('weather.home', 'humidity') }}%, wind
    {{ state_attr('weather.home', 'wind_speed') }} km/h
  questions:
    rain:
      type: noul
      instructions: Will it rain within the next hour?
    severity:
      type: score
      instructions: How bad is the weather for a walk?
      criteria:
        - fine
        - unpleasant
        - dangerous

Response:

answers:
  rain:
    type: noul
    noul: 0.82
  severity:
    type: score
    score: 1.3
    probabilities:
      - 0.1
      - 0.5
      - 0.4

Checking a camera snapshot with questions

action: ai_task.evaluate
data:
  task_name: Driveway check
  entity_id: ai_task.decider
  state: Front driveway, 14:05
  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
  questions:
    van:
      type: noul
      instructions: Is a delivery van parked in the driveway?
    cars:
      type: choice
      instructions: How many cars are parked in the driveway?
      criteria:
        none: No cars parked
        one: Exactly one car
        two or more: Two or more cars

Response:

answers:
  van:
    type: noul
    noul: 0.91
  cars:
    type: choice
    choice: two or more
    probabilities:
      none: 0.05
      one: 0.25
      two or more: 0.70

How to debug

To debug the integration add this to your logger configuration:

# configuration.yaml file
logger:
  default: warning
  logs:
    custom_components.perplexity: debug
    perplexity: debug

How to create a dev environment

git clone https://github.com/bieniu/ha-perplexity.git
cd ha-perplexity
scripts/setup-local-env.sh

関連プロジェクトを探す

読み込み中…