pyobs_weather.weather.stations.McDonaldLockeArchive

class McDonaldLockeArchive(fields: dict, url: str = 'http://weather.as.utexas.edu/cgi-bin/weather/weather-data.pl', *args, **kwargs)[source]

The McDonaldLockeArchive weather station reads current weather information from the Mt. Lock weather archive at http://weather.as.utexas.edu/cgi-bin/weather/weather-data.pl.

Creates a new McDonaldLockeArchive weather station.

Parameters
  • fields – Dictionary with field->SensorType data, e.g. {‘cloud-Sky-ambient’: {code=”skytemp”, name=”Temperature”, unit=”C”}}

  • time_offset – Offset in seconds to add to current time to get UTC.

create_sensors()[source]

Entry point for creating sensors for this station.

New sensors are created based on the configuration.

update()[source]

Entry point for updating sensor values for this station.

This method reads the Mt. Locke weather archive and extracts the latest values.