feat!: move config storage to python file

Should help with micropython in the future.
Also fix indentation in main
This commit is contained in:
2022-01-16 20:30:52 +01:00
parent 320b1a2362
commit 1440112dab
4 changed files with 29 additions and 28 deletions

View File

@@ -1,5 +1,7 @@
#!/usr/bin/python
import config
import datetime
import json
import logging
@@ -224,14 +226,15 @@ class AirSegment(DisplaySegment):
self.temperature = measurement["value"]
if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG)
segments = [
config.configure_env()
logging.basicConfig(level=logging.DEBUG)
segments = [
ClockSegment(),
WeatherSegment(),
TrafficSegment(),
AirSegment()
]
for segment in segments:
print(segment.get_data_text())
print("---")
for segment in segments:
print(segment.get_data_text())
print("---")