ZoneManager

class aaa_modules.layout_model.zone_manager.ZoneManager[source]

Contains a set of Zone instances.

static addZone(zone)[source]

Adds a zone.

Parameters:zone (Zone) – a Zone instance
static getZoneById(zoneId)[source]

Returns the zone associated with the given zoneId.

Parameters:zoneId (string) – the value returned by Zone::getId()
Returns:the associated zone or None if the zoneId is not found
Return type:Zone
static getZones()[source]

Returns a new list contains all zone.

Return type:list(Zone)
static onMotionSensorTurnedOn(events, itemName)[source]

Dispatches the motion sensor turned on event to each zone.

Returns:True if at least one zone processed the event; False otherwise
Return type:bool
static onSwitchTurnedOff(events, itemName)[source]

Dispatches the switch turned off event to each zone.

Returns:True if at least one zone processed the event; False otherwise
Return type:bool
static onSwitchTurnedOn(events, itemName)[source]

Dispatches the switch turned on event to each zone.

Returns:True if at least one zone processed the event; False otherwise
Return type:bool
static onTimerExpired(events, itemName)[source]

Dispatches the timer expiry event to each zone.

Parameters:
  • events (scope.events) – the global events object
  • itemName (str) –
Returns:

True if at least one zone processed the event; False otherwise

Return type:

bool

static removeAllZones()[source]

Removes all zone.

static removeZone(zone)[source]

Removes a zone.

Parameters:zone (Zone) – a Zone instance