 		}
 
 		if dirty {
-			for observer in observers {
-				observer.stateDidUpdateHandler()
-			}
+			notifyObservers()
 		}
 	}
 


	public func setPower(power: Bool, duration: Float = 1.0, completionHandler: ((results: [Result], error: NSError?) -> Void)? = nil) {
		self.power = power
		client.session.setLightsPower(selector.toString(), power: power, duration: duration) { [unowned self] (request, response, results, error) in
			if error == nil {
				self.client.updateLightsWithLights(self.lights.map { (light) in return light.lightWithPower(power) })

	private func deriveCount() -> Int {
		return lights.count
	}

	private func notifyObservers() {
		for observer in observers {
			observer.stateDidUpdateHandler()
		}
	}
}
