pyobs_weather.weather.stations.Observer

class Observer(station: pyobs_weather.weather.models.Station, *args, **kwargs)[source]

The Observer calculates the current solar altitude.

No configuration required.

create_sensors()[source]

Entry point for creating sensors for this station.

Only one sensor is created:

  • sunalt

update()[source]

Entry point for updating sensor values for this station.

This method fetches the current Temperature, Pressure and Relative Humidity from the Current station and uses those to calculate the current solar altitude, which it stores in a sensor.