    struct Condition

    extension Condition : Copyable, Equatable, Escapable, Hashable, Identifiable, https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Node.html, Sendable, SendableMetatype

Base struct for all conditions in the automation graph.
- `


  ### [id](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Condition#/s:13GoogleHomeSDK9ConditionV2idSSvp)


  ` The stable identity of the entity associated with this instance.

  #### Declaration

  Swift

      let id: String

- `


  ### [expression](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Condition#/s:13GoogleHomeSDK9ConditionV10expressionAA10Expression_pvp)


  ` The expression that determines whether the condition passes or not.

  If the expression evaluates to `true`, the condition passes and
  the automation continues to execute. Otherwise, the condition evaluation
  fails and stops executing the automation.

  #### Declaration

  Swift

      let expression: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Expression.html

- `


  ### [duration](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Condition#/s:13GoogleHomeSDK9ConditionV8durations8DurationVSgvp)


  ` The duration the condition should be true for before proceeding.

  #### Declaration

  Swift

      let duration: Duration?

- `


  ### [==(_:_:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Condition#/s:13GoogleHomeSDK9ConditionV2eeoiySbAC_ACtFZ)


  ` 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: Condition, rhs: Condition) -> Bool

  #### Parameters

  |---|---|
  | ` lhs ` | A value to compare. |
  | ` rhs ` | Another value to compare. |

- `


  ### [isEqual(to:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/Condition#/s:13GoogleHomeSDK9ConditionV7isEqual2toSbAA4Node_p_tF)


  ` Returns true if the nodes are equal, false otherwise.

  #### Declaration

  Swift

      func isEqual(to other: any https://developers.home.google.com/reference/swift/GoogleHomeSDK/Protocols/Node.html) -> Bool