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) throwsParameters
dataThe data to create from
-
Create attributes from values
Declaration
Swift
public init( latitude: Double, longitude: Double, radius: Measurement<UnitLength>, isPassive: Bool )Parameters
latitudeThe center point latitude
longitudeThe center point longitude
radiusThe radius of the zone
isPassiveWhether the zone is passive
View on GitHub