     
     // MARK: IB Actions
     @IBAction func serviceLocationsAction(sender: AnyObject) {
-        getServiceLocations()
+        getActuator()
     }
     
     @IBAction func actuatorOneOn(sender: AnyObject) {


    let smappeeController: SmappeeController
    var serviceLocation: ServiceLocation?
    var actuator: Actuator?
    
    var loginCompletion: ((SmappeeCredentialsResult) -> Void)?

    
    // MARK: SmappeeKit calls

    func getFirstServiceLocation(completion: (Result<ServiceLocation, String>) -> Void) {
        if let location = self.serviceLocation {
            completion(success(location))
        }
        else {
            smappeeController.sendServiceLocationRequest { r in
                let first = r.flatMap({ valueOrError($0.first, "No service locations found")})
                self.serviceLocation = first.value
                completion(first)
                self.updateButtonStates()
            }
        }
    }

    func getServiceLocationInfo(completion: (Result<ServiceLocationInfo, String>) -> Void) {
        if let locationInfo = self.serviceLocationInfo {
            completion(success(locationInfo))
        }
        else {
            getFirstServiceLocation { r in
                r.flatMap(self.smappeeController.sendServiceLocationInfoRequest) { r in
                    self.serviceLocationInfo = r.value
                    completion(r)
                }
            }
        }
    }


    func getActuator() {
        getServiceLocationInfo { r in
            self.actuator = r.value?.actuators.first
            self.updateButtonStates()
        }
    }
    
    func getEventsFromInfo(info: ServiceLocationInfo, completion: Result<[ApplianceEvent], String> -> Void) {
        self.smappeeController.sendEventsRequest(info.serviceLocation, appliances: info.appliances.filter({$0.name == "Nespresso"}), maxNumber: 10, from: NSDate(timeIntervalSinceNow: -3600*24), to: NSDate()) { r in
            completion(r)
        }
    }
    
