HAEntityAttributesZone
public struct HAEntityAttributesZone : HADataDecodable
Entity attributes for Zones
-
The latitude of the center point of the zone.
Declaration
Swift
public var latitude: Double
-
The longitude of the center point of the zone.
Declaration
Swift
public var longitude: Double
-
The radius of the zone. The underlying measurement comes from meters.
Declaration
Swift
public var radius: Measurement<UnitLength>
-
To only use the zone for automation and hide it from the frontend and not use the zone for device tracker name.
Declaration
Swift
public var isPassive: Bool
-
Create attributes from data
Throws
When the data is missing any required fieldsDeclaration
Swift
public init(data: HAData) throws
Parameters
data
The data to create from
-
Create attributes from values
Declaration
Swift
public init( latitude: Double, longitude: Double, radius: Measurement<UnitLength>, isPassive: Bool )
Parameters
latitude
The center point latitude
longitude
The center point longitude
radius
The radius of the zone
isPassive
Whether the zone is passive