UNPKG

dirigera

Version:

A TypeScript client for IKEA's DIRIGERA smart home hub

19 lines (15 loc) 386 B
import type { Got } from 'got' import type { Hub } from '../types/device/Hub.ts' export default (got: Got) => { return { async status() { return await got.get(`hub/status`).json<Hub>() }, async checkFirmwareUpdate() { await got.put(`hub/ota/check`).json() }, async installFirmwareUpdate() { await got.put(`hub/ota/update`).json() }, } }