> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wattshift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shift Watts!

> Responding to Optimized Schedules

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/46106422.js" />

After onboarding a user, WattShift will regularly send optimized set-point schedules.

Updating the device behavior accordingly will generate
grid revenue, lower customer electric bills,
and reduce partner companies' scope 3 emissions!

During development, rather than having to wait, you can also
query the following endpoint to receive the data for the most recently sent webhook.

```typescript theme={null}
const hvacId = hvac.id;
const schedules = await wattshiftApiCall(
  `/devices/hvac/${hvacId}/set_point_schedule/get`,
);
```

See: [`/devices/hvac/:hvacId/set_point_schedule/get`](/api-reference/endpoint/hvac/get-set-point-schedule)

Here is an example output from a webhook.

```typescript theme={null}
{
  eventType: 'SET_POINT_SCHEDULE',
  data: {
    'ws_device_123efg': {
      blocks: [
        {
          startDatetime: '2024-08-03T12:00:00.000Z',
          endDatetime: '2024-08-04T00:00:00.000Z',
          targetTemp: '70',
          targetMode: 'AUTO', // AUTO, HEAT, COOL
        },
        {
          startDatetime: '2024-08-04T00:00:00.000Z',
          endDatetime: '2024-08-04T12:00:00.000Z',
          targetTemp: '68',
          targetMode: 'COOL',
        },
      ],
      startDatetime: '2024-08-03T12:00:00.000Z',
      endDatetime: '2024-08-04T12:00:00.000Z',
      tempUnits: 'F', // F, C
    },
  },
}
```
