Structure
HumidityEvent
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.
Relationships
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:relativeHumidity:timestamp:)
public init(temperature: Float, relativeHumidity: Float, timestamp: Date)
Creates a new HumidityEvent
.
init(from:)
public init(from decoder: Decoder) throws
Properties
timestamp
public let timestamp: Date
The timestamp of when the humidity event was received by a Cloud Connector.
eventType
public var eventType: EventType
Methods
encode(to:)
public func encode(to encoder: Encoder) throws