diff --git a/lib/logitech/unifying_receiver/status.py b/lib/logitech/unifying_receiver/status.py index 3fe68a86..7f2ca374 100644 --- a/lib/logitech/unifying_receiver/status.py +++ b/lib/logitech/unifying_receiver/status.py @@ -62,9 +62,9 @@ class ReceiverStatus(dict): def __str__(self): count = len(self._receiver) - return ('No devices found.' if count == 0 else - '1 device found.' if count == 1 else - '%d devices found.' % count) + return ('No paired devices.' if count == 0 else + '1 paired device.' if count == 1 else + '%d paired devices.' % count) __unicode__ = __str__ def _changed(self, alert=ALERT.NOTIFICATION, reason=None): diff --git a/lib/solaar/ui/icons.py b/lib/solaar/ui/icons.py index 84e2fbd7..4e13076d 100644 --- a/lib/solaar/ui/icons.py +++ b/lib/solaar/ui/icons.py @@ -27,14 +27,14 @@ APP_ICON = { 1: 'solaar', 2: 'solaar-mask', 0: 'solaar-init', -1: 'solaar-fail' # # -def battery(level): - if level < 0: +def battery(level=None): + if level is None or level < 0: return 'battery_unknown' return 'battery_%03d' % (10 * ((level + 5) // 10)) -def lux(level): - if level < 0: +def lux(level=None): + if level is None or level < 0: return 'light_unknown' return 'light_%03d' % (20 * ((level + 50) // 100))