pyobs_weather.weather.evaluators.SchmittTrigger

class SchmittTrigger(good: float, bad: float)[source]

A Schmitt trigger only changes its value when certain thresholds are reached.

Creates a new Schmitt Trigger.

For the example of a humidity sensor with good=80 and bad=85, this evaluates to False, when the value rises above 85, but only returns to True, when it goes below 80 again.

Parameters:
  • good – Value must be smaller than this to become good.

  • bad – Value must be larger than this to become bad.

__call__(sensor)[source]

Evaluates this evaluator.

Parameters:

sensor – Sensor to evaluate.

Returns:

Result of evaluation.

areas() list[source]

Returns list of areas for plot.