HomeyAPI~ManagerZones

Methods

async getZones(optsopt) → {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:
Object.<string, HomeyAPI.ManagerZones.Zone> - Successful response

async createZone(optsopt)

Required OAuth scopes:
- homey.zone

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
zone HomeyAPI.ManagerZones.Zone

async getZone(optsopt) → {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:
HomeyAPI.ManagerZones.Zone - Successful response

async updateZone(optsopt)

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

async deleteZone(optsopt)

Required OAuth scopes:
- homey.zone

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string

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