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

[#94] add energy, statistics function #149

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

jekalmin
Copy link
Owner

@jekalmin jekalmin commented Feb 18, 2024

Objective

  • Get energy information

Example

스크린샷 2024-02-21 오후 10 34 59

Function

get_energy_statistic_ids

- spec:
    name: get_energy_statistic_ids
    description: Get statistics
    parameters:
      type: object
      properties:
        dummy:
          type: string
          description: Nothing
  function:
    type: composite
    sequence:
      - type: native
        name: get_energy
        response_variable: result
      - type: template
        value_template: "{{result.device_consumption | map(attribute='stat_consumption') | list}}"

get_statistics

- spec:
    name: get_statistics
    description: Get statistics
    parameters:
      type: object
      properties:
        start_time:
          type: string
          description: The start datetime
        end_time:
          type: string
          description: The end datetime
        statistic_ids:
          type: array
          items:
            type: string
            description: The statistic ids
        period:
          type: string
          description: The period
          enum:
            - day
            - week
            - month
      required:
        - start_time
        - end_time
        - statistic_ids
        - period
  function:
    type: native
    name: get_statistics

@jekalmin jekalmin self-assigned this Feb 18, 2024
@jekalmin jekalmin force-pushed the add-energy-statistics branch from 6555210 to 98792f8 Compare February 18, 2024 15:38
@jekalmin jekalmin added this to the 1.0.3 milestone Feb 19, 2024
@jekalmin jekalmin merged commit 752786c into v1.0.3 Feb 19, 2024
4 checks passed
@jekalmin jekalmin deleted the add-energy-statistics branch February 21, 2024 13:43
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