Skip to content

Commit

Permalink
try custom integration
Browse files Browse the repository at this point in the history
  • Loading branch information
yp87 committed Jan 31, 2025
1 parent 7627889 commit ba6b956
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions hass/custom_components/gemini_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#imports
import json
import socket
import ast
import base64
import requests
import json

from homeassistant.core import SupportsResponse
from homeassistant.helpers import SupportsResponse

DOMAIN = 'gemini_api'

Expand Down Expand Up @@ -52,6 +51,4 @@ def generate_text(call):
"text": response.json()["candidates"][0]["content"]["parts"][0]["text"]
}


hass.services.register(DOMAIN, 'generate_text', generate_text, supports_response=SupportsResponse.ONLY)
return True

0 comments on commit ba6b956

Please sign in to comment.