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