Skip to content

Commit

Permalink
Remove Whisper
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Apr 20, 2017
1 parent ce8be49 commit 0c73b5f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 30 deletions.
8 changes: 0 additions & 8 deletions HomeAssistant.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1892,8 +1892,6 @@
"-framework",
"\"FontAwesomeKit\"",
"-framework",
"\"IKEventSource\"",
"-framework",
"\"MBProgressHUD\"",
"-framework",
"\"PermissionScope\"",
Expand All @@ -1907,8 +1905,6 @@
"\"SystemConfiguration\"",
"-framework",
"\"UIKit\"",
"-framework",
"\"Whisper\"",
"$(inherited)",
);
PRODUCT_NAME = "Home Assistant";
Expand Down Expand Up @@ -1947,8 +1943,6 @@
"-framework",
"\"FontAwesomeKit\"",
"-framework",
"\"IKEventSource\"",
"-framework",
"\"MBProgressHUD\"",
"-framework",
"\"PermissionScope\"",
Expand All @@ -1962,8 +1956,6 @@
"\"SystemConfiguration\"",
"-framework",
"\"UIKit\"",
"-framework",
"\"Whisper\"",
"$(inherited)",
);
PRODUCT_NAME = "Home Assistant";
Expand Down
16 changes: 0 additions & 16 deletions HomeAssistant/HAAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import AlamofireImage
import PromiseKit
import SwiftLocation
import CoreLocation
import Whisper
import AlamofireObjectMapper
import ObjectMapper
import DeviceKit
Expand Down Expand Up @@ -522,8 +521,6 @@ public class HomeAssistantAPI {
).validate().responseObject { (response: DataResponse<Entity>) in
switch response.result {
case .success:
let murmurTitle = response.result.value!.Domain+" state set to "+response.result.value!.State
self.showMurmur(title: murmurTitle)
// self.storeEntities(entities: [response.result.value!])
fulfill(response.result.value!)
case .failure(let error):
Expand All @@ -545,7 +542,6 @@ public class HomeAssistantAPI {
switch response.result {
case .success:
if let jsonDict = response.result.value as? [String : String] {
self.showMurmur(title: eventType+" created")
fulfill(jsonDict["message"]!)
}
case .failure(let error):
Expand All @@ -559,7 +555,6 @@ public class HomeAssistantAPI {
}

func CallService(domain: String, service: String, serviceData: [String:Any]) -> Promise<[ServicesResponse]> {
// self.showMurmur(title: domain+"/"+service+" called")
let queryUrl = baseAPIURL+"services/"+domain+"/"+service
return Promise { fulfill, reject in
_ = self.manager!.request(queryUrl,
Expand Down Expand Up @@ -587,33 +582,26 @@ public class HomeAssistantAPI {
}

func turnOn(entityId: String) -> Promise<[ServicesResponse]> {
self.showMurmur(title: entityId+" turned on")
return CallService(domain: "homeassistant", service: "turn_on", serviceData: ["entity_id": entityId])
}

func turnOnEntity(entity: Entity) -> Promise<[ServicesResponse]> {
self.showMurmur(title: "\(entity.Name) turned on")
return CallService(domain: "homeassistant", service: "turn_on", serviceData: ["entity_id": entity.ID])
}

func turnOff(entityId: String) -> Promise<[ServicesResponse]> {
self.showMurmur(title: entityId+" turned off")
return CallService(domain: "homeassistant", service: "turn_off", serviceData: ["entity_id": entityId])
}

func turnOffEntity(entity: Entity) -> Promise<[ServicesResponse]> {
self.showMurmur(title: "\(entity.Name) turned off")
return CallService(domain: "homeassistant", service: "turn_off", serviceData: ["entity_id": entity.ID])
}

func toggle(entityId: String) -> Promise<[ServicesResponse]> {
let entity = realm.object(ofType: Entity.self, forPrimaryKey: entityId)
self.showMurmur(title: "\(entity!.Name) toggled")
return CallService(domain: "homeassistant", service: "toggle", serviceData: ["entity_id": entityId])
}

func toggleEntity(entity: Entity) -> Promise<[ServicesResponse]> {
self.showMurmur(title: "\(entity.Name) toggled")
return CallService(domain: "homeassistant", service: "toggle", serviceData: ["entity_id": entity.ID])
}

Expand Down Expand Up @@ -1061,10 +1049,6 @@ public class HomeAssistantAPI {
return permissionsContainer
}

func showMurmur(title: String) {
show(whistle: Murmur(title: title), action: .show(2.0))
}

func CleanBaseURL(baseUrl: URL) -> (hasValidScheme: Bool, cleanedURL: URL) {
if (baseUrl.absoluteString.hasPrefix("http://") || baseUrl.absoluteString.hasPrefix("https://")) == false {
return (false, baseUrl)
Expand Down
1 change: 0 additions & 1 deletion HomeAssistant/Views/RootTabBarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import UIKit
import MBProgressHUD
import Whisper
import ObjectMapper
import PromiseKit
import KeychainAccess
Expand Down
1 change: 0 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ target 'HomeAssistant' do
pod 'SwiftGen'
pod 'SwiftLint'
pod 'SwiftLocation'
pod 'Whisper'
end

target 'HomeAssistantTests' do
Expand Down
5 changes: 1 addition & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ PODS:
- SwiftGen (4.2.0)
- SwiftLint (0.18.1)
- SwiftLocation (2.0.2)
- Whisper (4.0.0)

DEPENDENCIES:
- Alamofire
Expand All @@ -62,7 +61,6 @@ DEPENDENCIES:
- SwiftGen
- SwiftLint
- SwiftLocation
- Whisper

EXTERNAL SOURCES:
Eureka:
Expand Down Expand Up @@ -107,8 +105,7 @@ SPEC CHECKSUMS:
SwiftGen: b6bfed151243348e4603b91bf5bc4eb2486c9d5b
SwiftLint: b467d08f5b25dc3b3cfed243d8e1b74b91714c67
SwiftLocation: 887fa007f6f0567dfd00543c3fb356c4c793c2a6
Whisper: '08be92623311f8e53201e62e17f6d7b9599a4714'

PODFILE CHECKSUM: 1572bd7fee76509307d6692840d51060e9fee211
PODFILE CHECKSUM: 802ce6474e24ddee98515d607095c9b380f9bc58

COCOAPODS: 1.1.1

0 comments on commit 0c73b5f

Please sign in to comment.