[modules/redshift] Try to improve transition removal

For some reason, the transition state info sticks around even at night
This commit is contained in:
tobi-wan-kenobi 2020-04-21 20:43:34 +02:00
parent 771eaf331e
commit 3bb7cf51ec

View file

@ -46,7 +46,7 @@ def get_redshift_value(module):
except Exception: except Exception:
res = '' res = ''
widget.set('temp', 'n/a') widget.set('temp', 'n/a')
widget.set('transition', None) widget.set('transition', '')
widget.set('state', 'day') widget.set('state', 'day')
for line in res.split('\n'): for line in res.split('\n'):
line = line.lower() line = line.lower()
@ -87,7 +87,7 @@ class Module(core.module.Module):
def text(self, widget): def text(self, widget):
val = widget.get('temp', 'n/a') val = widget.get('temp', 'n/a')
transition = widget.get('transition', None) transition = widget.get('transition', '')
if transition: if transition:
val = '{} {}'.format(val, transition) val = '{} {}'.format(val, transition)
return val return val