Attributes

struct Attributes

Attributes for the EnergyEvseTrait.

  • A list of the attribute IDs of the attributes supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var attributeList: [UInt32]? { get }
  • The current status of the EVSE. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var state: Matter.EnergyEvseTrait.StateEnum? { get }
  • Indicates whether the electric vehicle is currently allowed to charge from the EVSE or discharge to the EVSE. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var supplyState: Matter.EnergyEvseTrait.SupplyStateEnum? { get }
  • The type of fault detected by the EVSE. When the supplyState attribute is DisabledError, the faultState attribute is one of the values listed in FaultStateEnum, except for NoError. For all values of the supplyState attribute other than DisabledError, the faultState attribute is noError. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var faultState: Matter.EnergyEvseTrait.FaultStateEnum? { get }
  • The time, in UTC, when the EVSE automatically stops current flow to the electric vehicle. If the value is null, charging is permanently enabled. If the value is in the past, charging is disabled. This attribute is set only as part of the payload of the EnableCharging command. This attribute is persisted, for example a temporary power failure should not stop the vehicle from charging. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var chargingEnabledUntil: UInt32? { get }
  • The time, in UTC, when the EVSE automatically stops current flow from the electric vehicle. If the value is null, discharging is permanently enabled. If the value is in the past or 0x0, discharging is disabled. This attribute is set only as part of the payload of the EnableDischarging command. This attribute is persisted, for example a temporary power failure should not stop the vehicle from discharging. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var dischargingEnabledUntil: UInt32? { get }
  • The capacity that the EVSE circuit can provide. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var circuitCapacity: Int64? { get }
  • The minimum current, in milliamps, that the EVSE can deliver to the electric vehicle. The attribute can be set using the EnableCharging command. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var minimumChargeCurrent: Int64? { get }
  • The maximum current, in milliamps, that the EVSE can deliver to the electric vehicle. The attribute can be initially set using the EnableCharging command or by adjusting the userMaximumChargeCurrent attribute. The value of the maximumChargeCurrent attribute is the minimum of: CircuitCapacity (the electrician’s installation setting), CableAssemblyCurrentLimit (detected by the EVSE when the cable is plugged in), the MaximumChargeCurrent field in the EnableCharging command, and the userMaximumChargeCurrent attribute. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var maximumChargeCurrent: Int64? { get }
  • The maximum current, in milliamps, that the EVSE can receive from the electric vehicle. The attribute can be set using the EnableDischarging command. The value of the maximumDischargeCurrent attribute is the minimum of: CircuitCapacity (the electrician’s installation setting), CableAssemblyCurrentLimit (detected by the EVSE when the cable is plugged in), and the MaximumDischargeCurrent field in the EnableDischarging command. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var maximumDischargeCurrent: Int64? { get }
  • The maximum current, in milliamps, that the consumer can set as a preference to further reduce the charging rate. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var userMaximumChargeCurrent: Int64? { get }
  • The time of a random window, in seconds, over which the EVSE randomizes the start of a charging session. For example, if the randomizationDelayWindow is 600 seconds and there is an energy rate starting at 00:30, then the EVSE must compute a random delay between 0-599 seconds and add this to its initial planned start time. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var randomizationDelayWindow: UInt32? { get }
  • The time, in UTC, when the EVSE is scheduled to start the next charge based on the charging preferences. A null value indicates that there is no scheduled charging or that the vehicle is not plugged in. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var nextChargeStartTime: UInt32? { get }
  • The time, in UTC, when the EVSE should complete the next scheduled charge based on the charging preferences. A null value indicates that there is no scheduled charging or that the vehicle is not plugged in. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var nextChargeTargetTime: UInt32? { get }
  • The amount of energy, in megawatt hours, that the EVSE will attempt to add to the vehicle in the next charging target. A null indicates that there is no scheduled charging or that the EVSE is using the target state of charge method to charge the vehicle. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var nextChargeRequiredEnergy: Int64? { get }
  • The target state of charge (SoC), in percent, that the EVSE will attempt to reach when the vehicle is next charged. A null value indicates that there is no scheduled charging or that the EVSE cannot obtain the current SoC from the vehicle. If the SoC feature is not supported, only the values null and 100 are supported. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var nextChargeTargetSoC: UInt8? { get }
  • The vehicle efficiency rating for a connected vehicle. This value is stored in kilometers per killowatt hours multiplied by a scaling factor of 1000. This can be used to help indicate to the user approximately how many miles or kilometers of range will be added. A null value indicates that the EV efficiency is unknown and the nextChargeRequiredEnergy attribute cannot be converted from megawatt hours to miles or kilometers. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var approximateEVEfficiency: UInt16? { get }
  • The state of charge (SOC) of the electric vehicle battery in one-percent increments. The values are in the range of 0-100%. This attribute is available only on EVSEs that can read the SoC from the vehicle and that support the SoC feature. If the SoC cannot be read from the vehicle, the value of the attribute is null. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var stateOfCharge: UInt8? { get }
  • The capacity of the electric vehicle battery in milliwatt hours. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var batteryCapacity: Int64? { get }
  • The vehicle ID read by the EVSE via ISO-15118 using the Plug & Charge (PnC) feature, if the EVSE supports this capability. The field may be based on the e-Mobility Account Identifier (EMAID). A null value indicates that the ID is unknown. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var vehicleID: String? { get }
  • A unique identifier for the current or most recent session. A default value of null indicates that no sessions have occurred. The sessionId gets incremented each time a plugin is detected. A session begins when the vehicle is plugged in and ends when the vehicle is unplugged. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var sessionID: UInt32? { get }
  • The duration, in seconds, for the current or most recent charging session. A default value of null indicates that no sessions have occurred. A charging session begins when the vehicle is plugged in and ends when the vehicle is unplugged. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var sessionDuration: UInt32? { get }
  • The energy, in milliwatt hours, delivered by the EVSE to the electric vehicle for the current or most recent charging session. A default value of null indicates that no sessions have occurred. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var sessionEnergyCharged: Int64? { get }
  • The energy, in milliwatt hours, received by the EVSE from the electric vehicle for the current or most recent charging session. A default value of null indicates that no sessions have occurred. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var sessionEnergyDischarged: Int64? { get }
  • A list of server-generated commands (server to client) which are supported by this cluster server instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var generatedCommandList: [UInt32]? { get }
  • A list of client-generated commands which are supported by this cluster server instance.

    Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var acceptedCommandList: [UInt32]? { get }
  • Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero). Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var featureMap: Matter.EnergyEvseTrait.Feature? { get }
  • The revision of the server cluster specification supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var clusterRevision: UInt16? { get }
  • The trait identifier.

    Declaration

    Swift

    static var identifier: String { get }
  • Writes this object to the given TraitEncoder. Throws HomeError.encodingFailed if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

    Declaration

    Swift

    static func == (lhs: Matter.EnergyEvseTrait.Attributes, rhs: Matter.EnergyEvseTrait.Attributes) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • Hashes the essential components of this value by feeding them into the given hasher.

    Implement this method to conform to the Hashable protocol. The components used for hashing must be the same as the components compared in your type’s == operator implementation. Call hasher.combine(_:) with each of these components.

    Important

    In your implementation of hash(into:), don’t call finalize() on the hasher instance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.

    Declaration

    Swift

    func hash(into hasher: inout Hasher)