Disruptive Documentation

Structure Water​Present​Event

public struct WaterPresentEvent: Codable, Equatable  

An event that indicates whether or not water is present to a Water Detector sensor. This event is sent every heartbeat, and when the sensor is touched.

See the Developer Website for more details.

%191 WaterPresentEvent WaterPresentEvent Equatable Equatable WaterPresentEvent->Equatable Codable Codable WaterPresentEvent->Codable PublishableEvent PublishableEvent WaterPresentEvent->PublishableEvent

Nested Types

WaterPresentEvent.State

The water presence state of a sensor.

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(state:​timestamp:​)

public init(state: State, timestamp: Date)  

Creates a new WaterPresentEvent.

init(from:​)

public init(from decoder: Decoder) throws  

Properties

state

public let state: State

Whether or not water was detected close to the sensor.

timestamp

public let timestamp: Date

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

event​Type

public var eventType: EventType  

Methods

encode(to:​)

public func encode(to encoder: Encoder) throws