circuit_condition¶
- class CircuitConditionMixin(
- circuit_condition: Any =
NOTHING, - *,
- extra_keys: dict[str, Any] | None =
None, Allows the Entity to have an circuit condition (usually to enable it’s function).
- circuit_condition : Condition¶
Serialized
This attribute is imported/exported from blueprint strings.
The circuit condition that must be passed in order for this entity to function, if configured to do so.
- set_circuit_condition(
- first_operand: SignalID | None =
None, - comparator: '>' | '<' | '=' | '==' | '≥' | '>=' | '≤' | '<=' | '≠' | '!=' =
'<', - second_operand: SignalID | int =
0, Sets the circuit condition of the Entity.
comparatorcan be specified as stored as the single unicode character which is used by Factorio, or you can use the Python-style 2-character equivalents:# One of: [">", "<", "=", "≥", "≤", "≠"] # Or, alternatively: [">", "<", "==", ">=", "<=", "!="]If specified in the second format, they are converted to and stored as the first format.
- Parameters:
- Raises:
DataFormatError – If
first_operandis not a valid signal name, ifcomparatoris not a valid operation, or ifsecond_operandis neither a valid signal name nor a constant.