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

[#86] "area_id" and "deviced_id" can be set to execute_service #93

Merged
merged 1 commit into from
Jan 13, 2024

Conversation

jekalmin
Copy link
Owner

@jekalmin jekalmin commented Jan 13, 2024

#86

Objective

  • Add area_id and device_id to execute_services function
  • One of following is required to call execute_services
    • entity_id
    • area_id
    • device_id

Example

Prompt

Areas:
```csv
area_id,name
{% for area_id in areas() -%}
{{area_id}},{{area_name(area_id)}}
{% endfor -%}
```

Functions

- spec:
    name: execute_services
    description: Use this function to execute service of devices in Home Assistant.
    parameters:
      type: object
      properties:
        list:
          type: array
          items:
            type: object
            properties:
              domain:
                type: string
                description: The domain of the service
              service:
                type: string
                description: The service to be called
              service_data:
                type: object
                description: The service data object to indicate what to control.
                properties:
                  entity_id:
                    type: array
                    items:
                      type: string
                      description: The entity_id retrieved from available devices. It must start with domain, followed by dot character.
                  area_id:
                    type: array
                    items:
                      type: string
                      description: The id retrieved from areas. You can specify only area_id without entity_id to act on all entities in that area
            required:
            - domain
            - service
            - service_data
  function:
    type: native
    name: execute_service

@jekalmin jekalmin self-assigned this Jan 13, 2024
@jekalmin jekalmin merged commit d652d3d into v1.0.1 Jan 13, 2024
4 checks passed
@jekalmin jekalmin added this to the 1.0.1 milestone Jan 13, 2024
@jekalmin jekalmin deleted the add-area-id branch February 4, 2024 12:03
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

Successfully merging this pull request may close these issues.

1 participant