Tibber · Arazzo Workflow

Tibber Consumption Report

Version 1.0.0

Discover the viewer's homes over GraphQL, then pull the most recent hourly consumption nodes with cost for the chosen home.

1 workflow 1 source API 1 provider
View Spec View on GitHub EnergySmartHomeSmartMeterElectricityPricingElectricVehicleChargingHeatPumpSolarInverterHomeBatteryGraphQLOAuth2NordicArazzoWorkflows

Provider

tibber

Workflows

consumption-report
Resolve a home and pull its most recent hourly consumption nodes with cost.
Runs a viewer/homes discovery query to capture a home id, then runs an hourly consumption query to return the most recent consumption nodes, each with consumption, unit, cost, and currency.
2 steps inputs: accessToken outputs: homeId, nodes
1
discoverHomes
executeGraphQL
Resolve the authenticated viewer and the list of homes, capturing the first home id for context.
2
getConsumption
executeGraphQL
Pull the most recent hourly consumption nodes for the viewer's home, including consumption, unit, cost, and currency.

Source API Descriptions

Arazzo Workflow Specification

tibber-consumption-report-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Tibber Consumption Report
  summary: Discover the viewer's homes over GraphQL, then pull the most recent hourly consumption nodes with cost for the chosen home.
  description: >-
    Two chained GraphQL operations against Tibber's legacy /gql endpoint. The
    first resolves the authenticated viewer and the list of homes, capturing a
    home id; the second pulls the most recent hourly consumption time series for
    the viewer, returning per-node consumption, unit, cost, and currency. Because
    the GraphQL API exposes a single POST operation, every step reuses the
    executeGraphQL operation with a distinct documented query payload. Each step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: tibberGraphqlApi
  url: ../openapi/tibber-graphql-api-openapi.yml
  type: openapi
workflows:
- workflowId: consumption-report
  summary: Resolve a home and pull its most recent hourly consumption nodes with cost.
  description: >-
    Runs a viewer/homes discovery query to capture a home id, then runs an
    hourly consumption query to return the most recent consumption nodes,
    each with consumption, unit, cost, and currency.
  inputs:
    type: object
    required:
    - accessToken
    properties:
      accessToken:
        type: string
        description: Tibber personal access token (bearer) issued at developer.tibber.com.
  steps:
  - stepId: discoverHomes
    description: >-
      Resolve the authenticated viewer and the list of homes, capturing the
      first home id for context.
    operationId: executeGraphQL
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        query: "{ viewer { homes { id appNickname } } }"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      homeId: $response.body#/data/viewer/homes/0/id
  - stepId: getConsumption
    description: >-
      Pull the most recent hourly consumption nodes for the viewer's home,
      including consumption, unit, cost, and currency.
    operationId: executeGraphQL
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        query: "{ viewer { homes { consumption(resolution: HOURLY, last: 24) { nodes { from to consumption consumptionUnit cost currency } } } } }"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      nodes: $response.body#/data/viewer/homes/0/consumption/nodes
  outputs:
    homeId: $steps.discoverHomes.outputs.homeId
    nodes: $steps.getConsumption.outputs.nodes