Disruptive Documentation

Structure Humidity​Event

public struct HumidityEvent: Codable, Equatable  

A humidity event that is sent for humidity sensors every heartbeat, and whenever the sensor is touched. This event contains both the measured temperature as well as the relative humidity.

See the Developer Website for more details.

%183 HumidityEvent HumidityEvent PublishableEvent PublishableEvent HumidityEvent->PublishableEvent Codable Codable HumidityEvent->Codable Equatable Equatable HumidityEvent->Equatable

Conforms To

PublishableEvent

Used by event types (such as TouchEvent) to indicate that they can be published to the device emulator.

Codable
Equatable

Initializers

init(temperature:​relative​Humidity:​timestamp:​)

public init(temperature: Float, relativeHumidity: Float, timestamp: Date)  

Creates a new HumidityEvent.

init(from:​)

public init(from decoder: Decoder) throws  

Properties

temperature

public let temperature: Float

The temperature value in celsius.

relative​Humidity

public let relativeHumidity: Float

The relative humidity as a percentage.

timestamp

public let timestamp: Date

The timestamp of when the humidity event was received by a Cloud Connector.

event​Type

public var eventType: EventType  

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws