Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate promote for AI conversation agent #611

Open
itispip opened this issue Jun 30, 2024 · 1 comment
Open

Generate promote for AI conversation agent #611

itispip opened this issue Jun 30, 2024 · 1 comment

Comments

@itispip
Copy link

itispip commented Jun 30, 2024

With HA added Open AI, Google Gen AI as conversation agent, user now use Template in promote box to list out all rooms, device, entity for AI. Is that possible to be done by PyScript?

@ALERTua
Copy link
Contributor

ALERTua commented Jun 30, 2024

Without the examples I can only show you how to list all HA devices:

from homeassistant.helpers import device_registry
from homeassistant.helpers.device_registry import DeviceEntry
from typing import List

registry = device_registry.async_get(hass)
devices: List[DeviceEntry] = registry.devices.values()

The devices object is filled like so: https://github.com/home-assistant/core/blob/2024.6.4/homeassistant/helpers/device_registry.py#L977
The DeviceEntry object is described here: https://github.com/home-assistant/core/blob/2024.6.4/homeassistant/helpers/device_registry.py#L977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants