Added option to disable city display

This commit is contained in:
Alex 2018-11-01 22:15:00 +01:00
parent 85bcc7164f
commit 19e6abc8ca

View file

@ -33,6 +33,7 @@ class Module(bumblebee.engine.Module):
self._location = self.parameter("location", "auto")
self._city = self.parameter("location", "")
self._unit = self.parameter("unit", "metric")
self._showcity = self.parameter("showcity", "true")
self._valid = False
self.interval(15)
@ -55,6 +56,9 @@ class Module(bumblebee.engine.Module):
def output(self, widget):
if not self._valid:
return u"?"
if self._showcity == "false":
return self.temperature()
else:
return self.city() + self.temperature()
def state(self, widget):