Weather (

Weather modules. TODO: write doc


class Weather(url: str, system_init_time: int = 300, **kwargs: Any)

Bases: Module, IWeather, IFitsHeaderBefore

Connection to pyobs-weather.

Initialize a new pyobs-weather connector.

  • url – URL to weather station

  • system_init_time – Time in seconds the full system needs to initialize

async get_current_weather(**kwargs: Any) Dict[str, Any][source]

Returns current weather.


Dictionary containing entries for time, good, and sensor, with the latter being another dictionary with sensor information, which contain a value and a good flag.

async get_fits_header_before(namespaces: List[str] | None = None, **kwargs: Any) Dict[str, Tuple[Any, str]][source]

Returns FITS header for the current status of this module.


namespaces – If given, only return FITS headers for the given namespaces.


Dictionary containing FITS headers.

async get_sensor_value(station: str, sensor: WeatherSensors, **kwargs: Any) Tuple[str, float][source]

Return value for given sensor.

  • station – Name of weather station to get value from.

  • sensor – Name of sensor to get value from.


Tuple of current value of given sensor or None and time of measurement or None.

async get_weather_status(**kwargs: Any) Dict[str, Any][source]

Returns status of object in form of a dictionary. See other interfaces for details.

async is_running(**kwargs: Any) bool[source]

Whether a service is running.

async is_weather_good(**kwargs: Any) bool[source]

Whether the weather is good to observe.

async open() None[source]

Open module.

async start(**kwargs: Any) None[source]

Starts a service.

async stop(**kwargs: Any) None[source]

Stops a service.