Skip to main content
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.
const hvacId = hvac.id;
const schedules = await wattshiftApiCall(
  `/devices/hvac/${hvacId}/set_point_schedule/get`,
);
See: /devices/hvac/:hvacId/set_point_schedule/get Here is an example output from a webhook.
{
  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
    },
  },
}