Merge branch 'city'

This commit is contained in:
Alex 2018-11-02 10:06:16 +01:00
commit 1b6568016a

View file

@ -32,8 +32,8 @@ class Module(bumblebee.engine.Module):
self._apikey = self.parameter("apikey", "af7bfe22287c652d032a3064ffa44088") self._apikey = self.parameter("apikey", "af7bfe22287c652d032a3064ffa44088")
self._location = self.parameter("location", "auto") self._location = self.parameter("location", "auto")
self._city = self.parameter("location", "") self._city = self.parameter("location", "")
self._showcity = bumblebee.util.asbool(self.parameter("showcity", True))
self._unit = self.parameter("unit", "metric") self._unit = self.parameter("unit", "metric")
self._showcity = self.parameter("showcity", "true")
self._valid = False self._valid = False
self.interval(15) self.interval(15)
@ -56,10 +56,10 @@ class Module(bumblebee.engine.Module):
def output(self, widget): def output(self, widget):
if not self._valid: if not self._valid:
return u"?" return u"?"
if self._showcity == "false": if self._showcity:
return self.temperature()
else:
return self.city() + self.temperature() return self.city() + self.temperature()
else:
return self.temperature()
def state(self, widget): def state(self, widget):
if self._valid: if self._valid: