OutdoorStats.py 833 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. class OutdoorStats(object):
  4. #TODO Umstellung auf properties
  5. Temperature = 20.0
  6. bWindy = False
  7. Pressure = 0.0
  8. Humidity = 0.0
  9. WindSpeed = 0.0
  10. WindDegree = 0
  11. Clouds = 0.0
  12. bRaining = False
  13. bSnowing = False
  14. MoonPhase = {
  15. "index" : 0,
  16. "phase" : 0,
  17. "pos" : 0,
  18. "name": ""
  19. }
  20. def getJson(self):
  21. return {
  22. "Temperature": self.Temperature,
  23. "bWindy": self.bWindy,
  24. "Pressure": self.Pressure,
  25. "Humidity": self.Humidity,
  26. "WindSpeed": self.WindSpeed,
  27. "WindDegree": self.WindDegree,
  28. "Clouds": self.Clouds,
  29. "bRaining": self.bRaining,
  30. "bSnowing": self.bSnowing,
  31. "Moon": self.MoonPhase
  32. }