def drum_status(self, filter_supported: bool = True) -> Dict[str, Any]:
        """Return the state of all drums."""
        drum_status = {}
        for color in self.COLOR_NAMES:
            try:
                drum_stat = self.data.get('{}_{}'.format(SyncThru.DRUM, color),
                                          {})
                if filter_supported and drum_stat.get('opt', 0) == 0:
                    continue
                else:
                    drum_status[color] = drum_stat
            except (KeyError, AttributeError):
                drum_status[color] = {}
        return drum_status
def drum_status ( self , filter_supported : bool = True ) -> Dict [ str , Any ] : drum_status = { } for color in self . COLOR_NAMES : try : drum_stat = self . data . get ( '{}_{}' . format ( SyncThru . DRUM , color ) , { } ) if filter_supported and drum_stat . get ( 'opt' , 0 ) == 0 : continue else : drum_status [ color ] = drum_stat except ( KeyError , AttributeError ) : drum_status [ color ] = { } return drum_status
Return the state of all drums.