HomeyAPI~ManagerZones

Methods

async getZones(optsopt) → {Promise.<Object.<string, HomeyAPI.ManagerZones.Zone>>}

Required OAuth scopes:
- homey.zone.readonly

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

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

Required OAuth scopes:
- homey.zone

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
zone HomeyAPI.ManagerZones.Zone
Returns:
Promise.<void> - Successful response

async getZone(optsopt) → {Promise.<HomeyAPI.ManagerZones.Zone>}

Required OAuth scopes:
- homey.zone.readonly

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

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

Required OAuth scopes:
- homey.zone

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

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

Required OAuth scopes:
- homey.zone

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

zone.create

Fired when a managed Zone is created
Parameters:
Name Type Description
zone HomeyAPI.ManagerZones.Zone The affected Zone

zone.update

Fired when a managed Zone is changed
Parameters:
Name Type Description
zone HomeyAPI.ManagerZones.Zone The affected Zone

zone.delete

Fired when a managed Zone has been deleted
Parameters:
Name Type Description
zone HomeyAPI.ManagerZones.Zone The affected Zone

Classes

Error

Zone