HomeyAPI~ManagerAlarms

Since:
  • 1.3.0

Methods

async getAlarms(optsopt) → {Promise.<Object.<string, HomeyAPI.ManagerAlarms.Alarm>>}

Required OAuth scopes:
- homey.alarm.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
filter HomeyAPI.ManagerAlarms.Alarm <optional>
A response filter (Using a filter will bypass all caches, use sparingely)
Returns:
Promise.<Object.<string, HomeyAPI.ManagerAlarms.Alarm>> - Successful response

async createAlarm(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.alarm

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
alarm HomeyAPI.ManagerAlarms.Alarm
Returns:
Promise.<void> - Successful response

async getAlarm(optsopt) → {Promise.<HomeyAPI.ManagerAlarms.Alarm>}

Required OAuth scopes:
- homey.alarm.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
Returns:
Promise.<HomeyAPI.ManagerAlarms.Alarm> - Successful response

async updateAlarm(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.alarm

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
alarm HomeyAPI.ManagerAlarms.Alarm
Returns:
Promise.<void> - Successful response

async deleteAlarm(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.alarm

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
Returns:
Promise.<void> - Successful response

destroy()

Unsubscribes to realtime events, clear all caches, and remove all event listeners for this manager and it's managed objects

Events

alarm.create

Fired when a managed Alarm is created
Parameters:
Name Type Description
alarm HomeyAPI.ManagerAlarms.Alarm The affected Alarm

alarm.update

Fired when a managed Alarm is changed
Parameters:
Name Type Description
alarm HomeyAPI.ManagerAlarms.Alarm The affected Alarm

alarm.delete

Fired when a managed Alarm has been deleted
Parameters:
Name Type Description
alarm HomeyAPI.ManagerAlarms.Alarm The affected Alarm

Classes

Error

Alarm