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_current_weather(**kwargs: Any) Dict[str, Any] [source]¶
Returns current weather.
- Returns:
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.
- 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) Tuple[str, float] [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:
Tuple of current value of given sensor or None and time of measurement or None.