Skip to content

Commit

Permalink
fix sensor model
Browse files Browse the repository at this point in the history
  • Loading branch information
Spriter committed Jul 1, 2016
1 parent 308e4c2 commit c78b2ed
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions Sources/Base/BridgeResourceModels/Sensors/Sensor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,68 +164,68 @@ public func ==(lhs: Sensor, rhs: Sensor) -> Bool {

extension Sensor {

func isDaylightSensor() -> Bool {
public func isDaylightSensor() -> Bool {
return type == .Daylight
}

func isGenericFlagSensor() -> Bool {
public func isGenericFlagSensor() -> Bool {
return type == .CLIPGenericFlag
}

func isGenericStatusSensor() -> Bool {
public func isGenericStatusSensor() -> Bool {
return type == .CLIPGenericStatus
}

func isHumiditySensor() -> Bool {
public func isHumiditySensor() -> Bool {
return type == .CLIPHumidity
}

func isOpenCloseSensor() -> Bool {
public func isOpenCloseSensor() -> Bool {
return type == .CLIPOpenClose
}

func isPresenceSensor() -> Bool {
public func isPresenceSensor() -> Bool {
return type == .CLIPPresence
}

func isSwitchSensor() -> Bool {
public func isSwitchSensor() -> Bool {
return type == .ZGPSwitch || type == .ZLLSwitch || type == .ClipSwitch
}

func isTemperatureSensor() -> Bool {
public func isTemperatureSensor() -> Bool {
return type == .CLIPTemperature
}

func asDaylightSensor() -> DaylightSensor? {
public func asDaylightSensor() -> DaylightSensor? {
return DaylightSensor(sensor: self)
}

func asGenericFlagSensor() -> GenericFlagSensor? {
public func asGenericFlagSensor() -> GenericFlagSensor? {

return GenericFlagSensor(sensor: self)
}

func asGenericStatusSensor() -> GenericStatusSensor? {
public func asGenericStatusSensor() -> GenericStatusSensor? {
return GenericStatusSensor(sensor: self)
}

func asHumiditySensor() -> HumiditySensor? {
public func asHumiditySensor() -> HumiditySensor? {
return HumiditySensor(sensor: self)
}

func asOpenCloseSensor() -> OpenCloseSensor? {
public func asOpenCloseSensor() -> OpenCloseSensor? {
return OpenCloseSensor(sensor: self)
}

func asPresenceSensor() -> PresenceSensor? {
public func asPresenceSensor() -> PresenceSensor? {
return PresenceSensor(sensor: self)
}

func asSwitchSensor() -> SwitchSensor? {
public func asSwitchSensor() -> SwitchSensor? {
return SwitchSensor(sensor: self)
}

func asTemperatureSensor() -> TemperatureSensor? {
public func asTemperatureSensor() -> TemperatureSensor? {
return TemperatureSensor(sensor: self)
}
}
4 changes: 2 additions & 2 deletions SwiftyHue.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = "SwiftyHue"
s.version = "0.1.15"
s.version = "0.1.16"
s.summary = "Philips Hue SDK written in swift."

# This description is used to generate tags and improve search results.
Expand All @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.authors = { "Marcel Dittmann" => "marceldittmann@gmx.de", "Jerome Schmitz" => "jerome.schmitz@gmx.net", "Nils Lattek" => "nilslattek@gmail.com" }
s.source = { :git => "https://github.com/Spriter/SwiftyHue.git", :tag => "v0.1.15" }
s.source = { :git => "https://github.com/Spriter/SwiftyHue.git", :tag => "v0.1.16" }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '8.0'
Expand Down

0 comments on commit c78b2ed

Please sign in to comment.