pyobs_weather.weather.evaluators.Switch¶
- 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.
- Parameters:
threshold – Threshold for switch.
invert – If True, invert result of evaluation.