Weather (pyobs.modules.weather)

Weather modules. TODO: write doc

Weather

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.

Parameters:
  • url – URL to weather station

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

async get_fits_header_before(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]

Returns FITS header for the current status of this module.

Parameters:

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

Returns:

Dictionary containing FITS headers.

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

Return value for given sensor.

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

  • sensor – Name of sensor to get value from.

Returns:

Current reading for the given sensor.

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

Whether a service is running.

async open() None[source]

Open module.

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

Starts a service.

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

Stops a service.