Derives alarm history from an existing DeviceInfo response. This is a pure function that extracts alarm data without API calls.
Use this when you already have a DeviceInfo object (e.g., from a previous deviceInfo() call) to avoid making an additional API request.
The device info response object.
const info = await api.deviceInfo(token, mac);const alarms = deriveAlarmHistory(info);// No additional API call needed Copy
const info = await api.deviceInfo(token, mac);const alarms = deriveAlarmHistory(info);// No additional API call needed
Derives alarm history from an existing DeviceInfo response. This is a pure function that extracts alarm data without API calls.
Use this when you already have a DeviceInfo object (e.g., from a previous deviceInfo() call) to avoid making an additional API request.