class Switch(threshold: float, invert: bool = False)[source]

A simple Switch that changes its value whenever a given threshold is reached.

Creates a new Switch.

The switch evaluates to True (False, if invert is True), if its value is smaller than the given threshold.

  • threshold – Threshold for switch.

  • invert – If True, invert result of evaluation.


Evaluates this evaluator.


sensor – Sensor to evaluate.


Result of evaluation.

areas() list[source]

Returns list of areas for plot.