minor clean-ups
This commit is contained in:
parent
2829acd6f5
commit
c3718d22d6
|
|
@ -2,6 +2,7 @@
|
||||||
*.pyo
|
*.pyo
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.log
|
*.log
|
||||||
|
*.mo
|
||||||
|
|
||||||
/lib/Solaar.egg-info/
|
/lib/Solaar.egg-info/
|
||||||
/build/
|
/build/
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ class NamedInts(object):
|
||||||
|
|
||||||
|
|
||||||
def strhex(x):
|
def strhex(x):
|
||||||
|
assert x is not None
|
||||||
"""Produce a hex-string representation of a sequence of bytes."""
|
"""Produce a hex-string representation of a sequence of bytes."""
|
||||||
return _hexlify(x).decode('ascii').upper()
|
return _hexlify(x).decode('ascii').upper()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,8 @@ class DeviceStatus(dict):
|
||||||
|
|
||||||
# Devices lose configuration when they are turned off,
|
# Devices lose configuration when they are turned off,
|
||||||
# make sure they're up-to-date.
|
# make sure they're up-to-date.
|
||||||
for s in self._device.settings:
|
# _log.debug("%s settings %s", d, d.settings)
|
||||||
|
for s in d.settings:
|
||||||
s.apply()
|
s.apply()
|
||||||
|
|
||||||
if self.get(KEYS.BATTERY_LEVEL) is None:
|
if self.get(KEYS.BATTERY_LEVEL) is None:
|
||||||
|
|
@ -285,7 +286,7 @@ class DeviceStatus(dict):
|
||||||
self.updated = timestamp
|
self.updated = timestamp
|
||||||
|
|
||||||
# if _log.isEnabledFor(_DEBUG):
|
# if _log.isEnabledFor(_DEBUG):
|
||||||
# _log.debug("device %d changed: active=%s %s", self._device.number, self._active, dict(self))
|
# _log.debug("device %d changed: active=%s %s", d.number, self._active, dict(self))
|
||||||
self._changed_callback(d, alert, reason)
|
self._changed_callback(d, alert, reason)
|
||||||
|
|
||||||
# def poll(self, timestamp):
|
# def poll(self, timestamp):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue