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

add new function #239

Open
royrogermcfreely opened this issue Dec 19, 2024 · 0 comments
Open

add new function #239

royrogermcfreely opened this issue Dec 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@royrogermcfreely
Copy link

hello,

i got your addon working in home assistant and its doing very well.

now i want to dive deeper into it.
is there a way to add my own function like in the "extended_openai_conversation" addon?
there you have a window to set your own function.
for example:

- spec:
    name: execute_chore
    description: Use this function to execute a chore in Home Assistant.
    parameters:
      type: object
      properties:
        chore_id:
          type: string
          description: The ID of the chore to be executed.
      required:
      - chore_id
  function:
    type: script
    sequence:
    - service: script.execute_chore
      data:
        chore_id: "{{ chore_id }}"

and then add to your configuration.yaml:
script:
  execute_chore:
    alias: "Execute Chore"
    sequence:
      - service: grocy.execute_chore
        data:
          chore_id: "{{ chore_id }}"

best regards roy

@royrogermcfreely royrogermcfreely added the enhancement New feature or request label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant