Index: leahi_dialin/td/modules/buttons.py =================================================================== diff -u -r1f2bf6d939eb4033dbedb7d7005494cc12fccbc6 -r313abfccbc36a4af235361c7a3961ccf7a74bd8d --- leahi_dialin/td/modules/buttons.py (.../buttons.py) (revision 1f2bf6d939eb4033dbedb7d7005494cc12fccbc6) +++ leahi_dialin/td/modules/buttons.py (.../buttons.py) (revision 313abfccbc36a4af235361c7a3961ccf7a74bd8d) @@ -74,11 +74,14 @@ self.logger.debug("Poweroff message id detected, but was the wrong length.") return - mode = struct.unpack(DataTypes.U16.unpack_attrib(), bytearray( - message["message"][MsgFieldPositions.START_POS_FIELD_1: MsgFieldPositions.START_POS_FIELD_1 + 2])) + msg_list = [] + msg_list.append(('mode', DataTypes.U16)) - if len(mode) > 0: - self.poweroff_timeout_expired = bool(mode[0]) + result = self.process_into_vars(decoder_list = msg_list, + message = message) + + if len(result['mode']) > 0: + self.poweroff_timeout_expired = bool(result['mode'][0]) self.td_power_off_timestamp = timestamp